MASH problem: instance orientation with world node gets reset

MASH problem: instance orientation with world node gets reset

Anonymous
Not applicable
6,576 Views
26 Replies
Message 1 of 27

MASH problem: instance orientation with world node gets reset

Anonymous
Not applicable

New to Maya and MASH so bear with me please. 

 

Adding instances to a surface using MASH. Distribute some instances using a Placer node, and they are snapped to the surface mesh perfectly (Y up, relative to the surface normals).  However, when I add a World node to create some clusters around them the seed instances re-orient so they are all pointing Y-down in world space.  See attached pic.

 

The clusters created by the world node align to the mesh, but not the source objects. Very irritating.  I can sort of fix it with an Offset node above the World node, snapping everything to nearest face, but then I lose the ability to rotate and move the original placed objects properly.

 

Am I missing something?

 

Thanks in advance

 

0 Likes
6,577 Views
26 Replies
Replies (26)
Message 2 of 27

sean.heasley
Alumni
Alumni

Hi @Anonymous

 

Thanks for providing repro steps on your issue! I am getting the same result but it's a bit confusing cause I'm not sure what end result you're going for. If you can describe or show the look you are trying to achieve I'll be able to test with MASH and see if this is indeed an issue or if we just need to change your workflow and/or what MASH nodes you use to achieve the result.

 

Please let me know if anything changes!

 

 

0 Likes
Message 3 of 27

Anonymous
Not applicable
Thanks for the reply Sean.

I am experimenting with using MASH to scatter water droplets. I have a set of hi-res meshes I am using. What i need is to create a baseline scattering of larger drops, and was trying out using the World node in ecosystem mode to see if I could get a nice organic distribution of smaller droplets around the larger ones.

I am having problems with the mesh instances losing alignment as noted in the example, and having a few other odds and ends problems with controlling rotation with the Placer node etc, but this one is the biggest issue at the moment.

Thanks for your help with it.
/b
0 Likes
Message 4 of 27

sean.heasley
Alumni
Alumni

Hi @Anonymous

 

Ah ok. We can look more into that but in the meantime I thought I'd show you this helpful script that can handle water droplets Smiley Happy

 

 

 

 

0 Likes
Message 5 of 27

Anonymous
Not applicable
Thanks - I will have a look. However, I will need the ability to use my own
meshes and fine-tune the placements by hand (clients can be super picky
about this stuff). As well, fully random distributions do not look all that
natural, which is why I was pretty keen to try the ecosystem approach.

I have some other problems/queries with MASH nodes - the placer in
particular. Should I start another thread on those?

Thanks again
0 Likes
Message 6 of 27

sean.heasley
Alumni
Alumni

Hi @Anonymous

 

I think that tool should give you some solid control but let me know when you get a chance to take a look at it.

 

As for your other questions yes if they aren't specific to this issue please make another thread Smiley Happy

 

 

 

 

0 Likes
Message 7 of 27

Anonymous
Not applicable

I had a look, thanks for the share. it's a nice effect for general use where you just need it to look wet, but it can't replace what I am trying to do.  I really need the control and flexibility of doing it with MASH or some other scattering tool.  

 

MASH seems very close, if I can figure out a few hurdles.  Please let me know what you find with the World node query.

 

re other questions - will do.

/b

0 Likes
Message 8 of 27

Anonymous
Not applicable

Getting closer for sure.

 

I gave up on using the ecosystem mode for now - it has potential I think, but the tendency is (correctly for what it's meant for) to scatter the same objects around the seed object. That means I end up with one drop style surrounded mostly with little clones - which doesn't work all that well.

 

I have been playing with the world node in cluster setting but have that same issue with the orientation.  I can fix it with an Offset node, but the problem with that is I end up with a lot of intersections/collisions which were avoided in the World Node, but created by the offset "fix".  If we can figure out how to get the World Node to lock everyhing to the ground mesh without the offset it should work great.

 

 

0 Likes
Message 9 of 27

sean.heasley
Alumni
Alumni

Hi @Anonymous

 

That's looking pretty solid!

 

I think I know how to fix this. Can you try adding an orient node and then use the sphere/model as the input mesh? This should force everything to orient to the spheres normals correctly like how your set up was before adding the world node.

 

Please let me know if this works!

 

 

 

 

0 Likes
Message 10 of 27

Anonymous
Not applicable

Thanks Sean - 

 

I gave it a try and it does help with the orientation, but I'm getting a clearer picture of the problem now and it still requires an Offset node.

 

What happens when I turn on the World node is the seed meshes created with the Placer node get rotated back to their root orientation. When I add some Clustering I get a kind of weird problem where none of the "2D" cluster modes (circle, disc, Fibonacci spiral) respect the distribution mesh too. So I get all the meshes floating in the air around the distribution object:

 

floating_meshes.png

 

 

The Orient node does the job of orienting them to the object normals, but it needs an Offset node to snap them to the surface - and that is where the collisions occur.  

From what I saw online, the World node should create clusters around my seed points (from the Placer node) and respect the distribution mesh. If that could work I think that would solve the problem.

0 Likes
Message 11 of 27

Anonymous
Not applicable

Just to clarify:  This is what happens when I use circle of disc cluster mode:

 

disc.png

0 Likes
Message 12 of 27

sean.heasley
Alumni
Alumni

Hi @Anonymous

 

Thanks for the detailed post and screenshots!

 

I do see the issue now and it looks like we're getting closer!

 

I did some testing and I think you can get around the world node issue by adding the sphere to the Input Mesh tab under Map Settings. From there simply lower the radius and you should be able to get them to sit on top of the mesh. I also added another orient node on top of this to make them face the right direction.

mash.png

 

 

 

Let me know if this helps!

 

 

0 Likes
Message 13 of 27

Anonymous
Not applicable

Thanks Sean.  I tried that route out.  It basically does the same thing as the offset node though, because the ball type clusters just do not seem to respect the collision settings:

 

Using ball mode for cluster, with sphere as input meshUsing ball mode for cluster, with sphere as input mesh

I have tried many combinations of radius and cluster radius and minimum separation settings but cannot get the result to work well.  I am wondering if it is a limitation of the ball-type cluster distribution because they are based in 3D space vs the ones that seem to operate on a more "2d" surface approach?  

For now it seems I'm sort of stuck with either hand-placing every drop (but then I have the problem of the rotation tool not working in the placer node, so it's pretty limited for creating variation) or using a Visibility node to manually remove all the collisions at the end (which is pretty tedious).

Frustrating - as it is soooo close!  MASH is a very cool tool. Just needs some tweaks maybe?

 

/b

0 Likes
Message 14 of 27

sean.heasley
Alumni
Alumni

Hi @Anonymous

 

Yeah this is a bit frustrating cause we are super close haha.

 

What about using Map Based Cluster Mode in the World node settings?

 

I did this and tweaked the points, radius and collision iterations and while I get a few problem ones that collide with the bigger spheres most of them don't collide.

mash.png

 

 

 

 

 

0 Likes
Message 15 of 27

mspeer
Consultant
Consultant

Hi!

 

I did not read all here, but increasing collision radius and iterations as suggested by @sean.heasley and maybe using dynamics should help.

Message 16 of 27

Anonymous
Not applicable
I’m away from my studio for a few days but will try it when I get back. Thanks!
Message 17 of 27

Anonymous
Not applicable

Sorry for the delay.   Map-based doesn't really solve the problem as it seems that it does not use the initial Placer or Distribution nodes as a seed for clustering etc.  It just generates its own set of instances.  I'd have to hand-paint the patterns into a map and I think fine-tuning would be a hassle.

 

 

0 Likes
Message 18 of 27

Anonymous
Not applicable

I basically gave up on the world node being able to do it at this stage.  What seems best is just hand placing using the Placer node and then only using the World node (in ball mode) making a basic "filler" spray of instances to make up the smallest stuff. If I use it sparingly it doesn't generate a lot of collisions. It's working pretty well (see attached).

 

One last hurdle though:  the rotation tool for the Placer node is not working properly, so I cannot rotate the drops by hand. Also: no matter what I do with the Placer node settiings they always seem to get locked in to one orientation. Even if I use a Random node placed on top of everything else (so after the Offset node that locks them to the mesh) I cannot rotate any of the instances.  Is there a trick to that, or is the rotation bug from the Placer node just preventing any rotation at all?

 

 

0 Likes
Message 19 of 27

sean.heasley
Alumni
Alumni

Hi @Anonymous

 

Can you post a screenshot/video of the random node not working above the placer and orientation? I just tried this and had no issues so I wonder if its something specifically with your set up and/or if you need to delete a node and re do it before placing the random to cover the rotations.

 

 

0 Likes
Message 20 of 27

Anonymous
Not applicable

I think the issue is connected to using the "stick to mesh" option on the placer move tool. Check this clip:

 

https://www.dropbox.com/s/49kgiyh0axa3drv/placer-stick_to_mesh_problem.mov?dl=0

 

There is definitely something wrong with the rotation system that is playing a part. If I just place the instances normally, using the distribution surface as a paint mesh, and even when adding some random Y-rotation it works okay, but every point has a scrambled pivot so fine tuning their rotation is a mess. Also getting some weirdness when holding down the M key to try and manually orient on creation - the instances lose their surface orientation and revert to world Y-up. I can re-attach them to the mesh using the move tool set to "stick to paint surface", but once that option is activated the rotation is frozen - which is the issue I was having before. I can go back and turn off "stick to paint surface", but rotating is a mess and eventually I have to snap them back to the mesh.

https://www.dropbox.com/s/49kgiyh0axa3drv/placer-stick_to_mesh_problem.mov?dl=0

 

A different example of the rotation weirdness:

https://www.dropbox.com/s/pv39laq7kqc8q0n/rotate_not_working_sphere.mov?dl=0

 

 

 

0 Likes