Jump to content
sebkaine

New Particle Fluid Surface how to use @v to create tension in the mesh.

Recommended Posts

Hi guys , 

H15 comes with a new Particle Fluid Surface node. I can't see how i can use the @v to stretch the mesh like

in the old one. Does this feature has been deleted or does i have miss something in the new node ?

Is it possible to call the old version of the nodes in H15 ?

Thanks for your time

Cheers 

E

Share this post


Link to post
Share on other sites

It's still there but hidden.

In an hscript textport, type:

opunhide

and you will see a long list of hidden operators.

Then again use opunhide to unhide your operator of choice for the given scene file. Now you can add the operator to your scene.

Are they supported? Well yeah but there is a reason they are hidden as they have been superseded but not removed so users like yourself can still access them, and scene files from older versions can still work.

 

  • Like 1

Share this post


Link to post
Share on other sites

Many Thanks for your answer old school ! 

But unfortunalty i can't find particle fluid surface in the Sop hidden node.

Here is what i get :

ophide Sop loadslices
ophide Sop sssscatter
ophide Sop bakevex
ophide Sop vopsop
ophide Sop shatter
ophide Sop drawhair
ophide Sop pop
ophide Sop vopsoptype
ophide Sop unpaste
ophide Sop polyextrude
ophide Sop network
ophide Sop shop
ophide Sop paste
ophide Sop tristrip
ophide Sop gluepieces
ophide Sop wavevelocity
ophide Sop attribfind
ophide Sop vectordeform
ophide Sop bridge

 

i have try a 

opunhide Sop particlefluidsurface

it doesn't return any error , but i still have only access to the new Fluid Surface Node.

Do you have any idea on what i am doing wrong ?

Cheers 

E

 

Share this post


Link to post
Share on other sites

Well the new Particle Fluid Surface SOP is actually not a new node, its just version 2.0 of the old one. 

Share this post


Link to post
Share on other sites

Thanks for your answer David !

I  might have miss some options , but i would like to use @v to stretch my meshes according to vel.

Thus each small isolated sphere appears as a straight line.

This option exist in the old one and i can't find how to do this in 2.0.

 

 

Edited by sebkaine
foobar

Share this post


Link to post
Share on other sites

Oh yeah this is an asset so things are deprecated a bit differently.

In hscript if you cd to a SOP type directory then type in opadd you will see both versions of particlefluidsurface in there: particlefluidsurface and particlefluidsurface::2.0

So use the -e to use the explicit name to add the first version of paticlefluidsurface:

opadd -e particlefluidsurface

This will add the original version of particle fluid surface SOP in to the current SOP network. This means you can have two different versions of an asset in your scene. Just MMB on the two to see the asset pointing to the correct definition.

  • Like 3

Share this post


Link to post
Share on other sites

In response to the thread, if all you want is a velocity trail you can do that with this one. Just set the Method to "spherical", unlock the asset and go inside, find "vdbfromparticles1" and switch Particle Footprint to Velocity Trail.

Share this post


Link to post
Share on other sites

There's an existing RFE to add this functionality to ParticleFluidSurface::2.0.  Skybar's suggestion is good, but if you want extra control you can create the extra "stretched" particles yourself before sending them into the asset.  More info:

 

The following VEX code is very close to what the original speed stretching does. You can paste this into an AttribWrangle then press the little button to the right of the text box to auto-create the spare parameters. I found the following values worked fairly well.

Stretch Scale: 1/96 (or 1/48)
Max Stretch: 1
Min Size: 0.4
Particle Density: 2
 
float stretchscale = chf("stretch_scale");
float maxstretch = chf("max_stretch");
float minsize = chf("min_size");
float particledensity = chf("particle_density");

vector stretchvec = -v@v * stretchscale;
float len = length(stretchvec);
if (len > maxstretch)
        stretchvec *= (maxstretch / len);

float radius = @pscale;
vector origpos = @P;
int nparticles = int(particledensity * len / radius) - 1;
if (!nparticles)
    return;

for (int i=1; i <= nparticles; i++)
{
    float duplicatepos = float(i) / float(nparticles);
    float duplicatepscale = lerp(radius, radius * minsize, duplicatepos);
    int newpt = addpoint(geoself(), @ptnum);
    setpointattrib(geoself(), "P", newpt, origpos + duplicatepos * stretchvec);
    setpointattrib(geoself(), "pscale", newpt, duplicatepscale);
}

 

If you're using the Spherical surfacing Method, you'll need to unlock the ParticleFluidSurface asset and change the Minimum Radius in Voxels on the vdbfromparticles1 node to something smaller like 0.25 to handle the smaller radius sizes for the stretched particles.

For Average Position this is not required.
  • Like 2

Share this post


Link to post
Share on other sites

This is great! I have been trying to find out how to get the old PolyExtrude and Scatter SOPs. Thanks, David!

Share this post


Link to post
Share on other sites

Thanks for your answers guys ! 

David i find that the velocity trail include by default is extremely slow , but i will do some extra test !

John thx a lot your code looks to be exactly what i need , a simple vex wrangle that do stretch along v.

thanks again for all those very helpful answers ! 

Cheers 

E

 

 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×