Page 1 of 1

Scatter polygons on a terrain using the MOPs Instancer node

Posted: Sat Jun 24, 2023 1:35 pm
by RedWolf
Hello,


I am trying to instance a grass polygon onto a heightfield I made to save performance instead of using the copy to points node. It doesn't work when I try to do it. I joined the zip file of my scene to help you understand my issue.


Thank you,


RedWolf
Layout_Scene_0224_support.zip

Re: Scatter polygons on a terrain using the MOPs Instancer node

Posted: Sat Jun 24, 2023 2:24 pm
by toadstorm
This scene file doesn't include any attempt at instancing or copying to points, so I'm just guessing at what you're going for exactly.

My advice would be to simulate a clump of grass rather than a single blade, and then cache that simulation to disk via Alembic output. You'd then load that Alembic file via the Alembic SOP and copy that to points. Alembics are instanced by default so there's no need to do anything fancier than a scatter and a Copy to Points. You can of course use the MOPs Instancer as well, but you don't need to use the Instancer to work with the rest of MOPs... MOPs will work on any template points or packed primitives.

If you want to offset the grass clumps in time, you can use MOPs Set Sequence Time to randomize the timing of each copied Alembic. Alternatively, you could do the instancing in LOPs and use the Retime LOP to offset the timings if you want to render in Karma.

Re: Scatter polygons on a terrain using the MOPs Instancer node

Posted: Sat Jun 24, 2023 3:55 pm
by RedWolf
Does this help show what I'm trying to do?
Layout_Scene_0225_support.zip

Re: Scatter polygons on a terrain using the MOPs Instancer node

Posted: Fri Jun 30, 2023 4:39 pm
by toadstorm
Here's your file back. This is what I had in mind when I was telling you to try instancing clumps of grass rather than individual blades. I animated the clumps using procedural noise instead of Vellum, then cached the animation to disk and instanced them on the heightfield as a Packed Disk Sequence.
MOPs Set Sequence Time then applies a discretized random time offset to the sequences so they move more randomly.
If you wanted to do this in Solaris you could cache your animation to a USD sequence, then scatter the grass in LOPs using an Instance LOP and then randomize timing using a Retime LOP in a similar manner.