Jump to content

Flip viscosity driven by age


br1

Recommended Posts

I'd like to generate a stack of objects falling on each other over time.

The effect I want is that when they fall on the ground they are close to solid, but then loose viscosity while aging :

- First object is solid at frame 10, and at frame 20 gets liquid while the second object (newly born and falling) is solid.

I'm not sure where I can control the viscosity so that it's affected by the age of the particles.

Can someone point me to tips/suggestions or an example file ?

thanks

Bruno

Link to comment
Share on other sites

pipe the age into an attribute create...

This is the step that I don't get.

My initial setup is created from the Flip Fluid from Object shelf tool. In the sopsolver I haven't see any presence of "age" or "life" while examining the nodes with the detail view, and I'm not sure how I am supposed to get it into the attribute create.

Link to comment
Share on other sites

This is the step that I don't get.

My initial setup is created from the Flip Fluid from Object shelf tool. In the sopsolver I haven't see any presence of "age" or "life" while examining the nodes with the detail view, and I'm not sure how I am supposed to get it into the attribute create.

I'm not sure if you want the attribute 'age' or something custom. With age you will have points dying/disappearing. But if you use the particle fluid emitter you can create a birth group, in the sop solver set an attribute for birth to the birth group equal to time; $BIRTH = $T. Then create another attribute that is $T-$BIRTH, this will give you how long it's been alive.

make sense?

Link to comment
Share on other sites

I'm not sure if you want the attribute 'age' or something custom. With age you will have points dying/disappearing. But if you use the particle fluid emitter you can create a birth group, in the sop solver set an attribute for birth to the birth group equal to time; $BIRTH = $T. Then create another attribute that is $T-$BIRTH, this will give you how long it's been alive.

make sense?

My issue is that I have been unable to get/use birth groups, age or life attributes with FLIP particles. If I follow your suggestion and add an attribute like $BIRTH = $T, that attribute evolves over time, so the result is always the same and all my particles loose they viscosity at the same time whether they have been born early or late.

Link to comment
Share on other sites

Yeah, as the particles in FLIP these days are not really particles (as in POPs), but "just" points with attributes, they don't have an age by default.

Here's a hip where I've gone and modified the DOP sourcing to add birth time, check the added AttribCreate DOP in /obj/AutoDopNetwork/source_surface_from_sphere_object1/source_particles/attribcreate_BIRTHTIME

Then I set the viscosity in a SOP Solver DOP to be ($T - $BIRTH) * multiplier

ageflipt.jpg

ageflip.mov (5Mb)

ee_flip_age_v002.hip

  • Like 6
Link to comment
Share on other sites

Thanks Eetu !

Exactly what I was looking for ! I Didn't think about digging deep in the sourcevolume.

By the way I followed your WIP thread and was wondering with your viscosity setup (ala *sand solver*) why the sopsolver works as intended when using the flipfluidobject referencing a SOP Path, but not when using a sourcevolume. Any tips ?

Link to comment
Share on other sites

By the way I followed your WIP thread and was wondering with your viscosity setup (ala *sand solver*) why the sopsolver works as intended when using the flipfluidobject referencing a SOP Path, but not when using a sourcevolume. Any tips ?

Forget this question. I just had to reconnect the point position to the noise in the vopsop.

Link to comment
Share on other sites

Here's a hip where I've gone and modified the DOP sourcing to add birth time, check the added AttribCreate DOP in /obj/AutoDopNetwork/source_surface_from_sphere_object1/source_particles/attribcreate_BIRTHTIME

Then I set the viscosity in a SOP Solver DOP to be ($T - $BIRTH) * multiplier

Nice effect, eetu!

FWIW, there's a way to create an age attribute fully in DOPs that's very lightweight (if a bit obscure). Use a GasLinearCombination DOP with the following parameters:

Destination: age

Geometry: Geometry

Combine Operation: Add

Source1: age

Constant: 1

then set the Constant scale factor (right next to it) to Timestep.

This does the equivalent of age = age + Timestep for every particle, with a default age of 0 for new particles.

In general GasLinearCombination can be a fast way to perform simple math on particle attributes in H12 (note that you won't get a local variable for an attribute created this way).

  • Like 1
Link to comment
Share on other sites

Nice effect, eetu!

FWIW, there's a way to create an age attribute fully in DOPs that's very lightweight (if a bit obscure). Use a GasLinearCombination DOP with the following parameters:

Destination: age

Geometry: Geometry

Combine Operation: Add

Source1: age

Constant: 1

then set the Constant scale factor (right next to it) to Timestep.

This does the equivalent of age = age + Timestep for every particle, with a default age of 0 for new particles.

In general GasLinearCombination can be a fast way to perform simple math on particle attributes in H12 (note that you won't get a local variable for an attribute created this way).

Neat trick! This should be in the help docs. :)

  • Like 1
Link to comment
Share on other sites

Yeah. In general whenever I see a node starting with "Gas..." my eyes roll...there are so many of them and they look like little secrets

Remarkably, GasLinearCombination is actually a simplification of the behemoth that is GasCalculate, with the addition of OpenCL support for fields, as well as fast, large-scale operations on particles attributes (useful for FLIP among other things).

Link to comment
Share on other sites

Hi Johner, I tried doing this trick with the Gas Linear Combination and it looks like it´s not creating anything at all.

Then again, I know squat about gas microsolvers, so I´m sure I´m setting up this wrong...could you show a really fast and simple example on how to set this up and how to access to this attribute (seeing how we cannot use its local variable)?

For the latter I was thinking on dopfields expressions, combined with an Attribute Create inside a SOP Solver so I can generate myself the variable for convenience...

am I on the right track?

Edited by Netvudu
Link to comment
Share on other sites

  • 6 months later...

I usually add "birthframe" to the points before they go to the sim. It's just an attribcreate set to $FF. In the sim if I need to drive an attribute based on 'age' I just reference it using $BIRTHFRAME in a sop solver, or inside a vop in the sop solver.

Link to comment
Share on other sites

  • 6 months later...

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