Jump to content

Never ending melting object


Korben

Recommended Posts

Hello everyone,

 

I'm kind of new to Houdini and am facing a little problem...

I would like an object to melt indefinitely.

 

Here is my workflow ( hip file attached ) :

- create an animated ( mountain ) object

- add particles flowing on the object

- delete non needed particles then convert to VDB -> to poly.

 

My problem is that I have a "flowingparticles" group in which particles are added when they meet the surface of a volume ( volume sample < 0 )

When I convert this particles to vdb then to mesh, the mesh is "poping" at the place where particles are added. I think this is a normal behaviour.

 

My question is :

- Can I add some attributes that can be used as something like "if the particle has just been added to the group, it's influence to the meshing is 0 and slowy increase its influence...

 

I don't know if I'm clear about that. 

Please If you can just do a flipbook of the joined hip scene, you will see the poping at the top of the melting object.

 

Thanks a lot !

neverEndingMeltingObject.002.hip

Edited by Korben
Link to comment
Share on other sites

After your pop vop, throw down a pop wrangle with this:

float frameduration = 30;
float maxscale = 1;

if (abs(@v.x)+abs(@v.z)<.01)
{
    @startframe = @Frame;
    @endframe = @Frame + frameduration;
    @pscale = 0;
}
else
{
    @pscale = fit(@Frame,@startframe,@endframe,0,maxscale);
}
  

now that you are using pscale, place a point wrangle above the "peak2" node with this:

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

Yes perfect ! Thx !

 

Just a few others questions for curiosity purpose :

 

- Is it possible to achieve the same thing with only nodes ? ( no vex )

- I don't know VEX :

- what is @v.x ? and @v.z ? I think you test if the velocityX and velocityY are zero but I don't understand the @.

- frameduration is the duration (in frames) in which pscale go from 0 to 1, right ?

 

Thanks a lot.

Link to comment
Share on other sites

You can mimic this behavior with a pop vop, which turns into compiled vex code anyways. Embrace vex, it is your future friend.

the @ symbol says that the variable will be an attribute. normally you write i@myInt; @myInt = 42; and myInt becomes an integer attribute. For a temp variable you can write int myTempInt; myTempInt = 99; myInt will appear in the node spreadsheet, myTempInt will not. Since velocity already exists as an attribute v we can directly access it with @v = myVector; or @v.z = myTempInt;

you can view the generated vex code of your vop nets with a right click. the docs are great for learning and sesi has a free video about the pop wrangle from Ari. Check it out and send him a thank you!

I just keep setting the start frame to the current frame as long as there is no x or z velocity. Once there is some x or z velocity, your particles are flowing down your object, so I stop setting the start frame. If you did this in sops the start frame would get set back to 0, and it wouldn't work.

You are correct about the v and frameduration.

Cheers

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...