Jump to content

Different mesh settings for particles from different groups


Whatsinaname

Recommended Posts

Is there a way to apply different settings for particles coming from different groups during the meshing phase?

 

An Example:

 

I've got a particle system, consisting of three groups: Starters, Leaders, Trails.

 

Now, I do not want to see any of the particles in Starters, want those in Leaders to be meshed with a slightly larger radius and the ones in Trails with a smaller radius.

 

In order to mesh the particles, I basically use a VDBfromparticles SOP, filter those using VDBReshapeSDF and VDBSmoothSDF and then use a convertVDB in order to create polygons.I know I can maks certain areas of the mesh but it was way more convenient if I somehow could grab the group the particles are in.

Edited by Phlok
Link to comment
Share on other sites

Append an AttribWrangle or PointWrangle before VDBfromparticles or VDBFromParticleFluid to vary pscale on groups.

 

Then use this code:

if(inpointgroup(0, "leaders", @ptnum))
    @pscale = 0.05; // set pscale value


if(inpointgroup(0, "trail", @ptnum)) //use your own group
    @pscale = 0.02;


// and so on.........


else
    @pscale *= 1;
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...