[Sidefx-houdini-list] Get life attribute with fluid

Steve Tucker Steve.Tucker at Starz.com
Fri Oct 9 09:59:45 EDT 2009


Sounds like you've got it worked out now, but there's also this file you can take a look at.  I can't remember if there is an actual age field in this or not, but I remember setting up a life field in dops using advected points to generate the field.  http://www.sidefx.com/index.php?option=com_wrapper&Itemid=150 *might* not contain a life field, but it does contain a Cd field which was generated using the same set-up.  Birth points, give them an attribute, advect them, and use them to generate your field.

 - Steve

Stephen Tucker, VFX Artist
p: 416.682.5200 x 5363  | f: 416.682.5209
Starz Media Canada Co. | 230 Richmond Street East | Toronto, ON M5A 1P4
www.starzanimation.com
 

-----Original Message-----
From: sidefx-houdini-list-bounces at sidefx.com [mailto:sidefx-houdini-list-bounces at sidefx.com] On Behalf Of François Duchesneau
Sent: Friday, October 09, 2009 8:50 AM
To: sidefx-houdini-list at sidefx.com
Subject: Re: [Sidefx-houdini-list] Get life attribute with fluid

I understand now with your explanations. I did something yesterday that 
was similar to what you're saying here but the myLife field spread out 
beyond the density field. Not sure if I have to do something else.

However, before I posted my question I tried using the "heat" field 
instead of density for rendering and I was able to control the diffusion 
of it but I found the shape looked too much like a fire and I lost all 
the details of the fading tips on the smoke even close to the emission. 
I must say that my smoke is pushed heavily by a strong wind in X. What I 
did instead is in sop I subtracted the density field with a bunch of 
metaballs converted to volume. This allows me to fade out the smoke 
where it gets too long while keeping all the subtleties along its way. 
It works great so far.

Also, I've analysed the way the "heat" is diminished over time and I've 
noticed it's just its field being subtracted by a certain factor over 
time. I've applied the same rule to the smoke density and again I'm 
losing all the details along its way.

Conclusion, I had what I wanted from the beginning but not what I 
needed, as if I were the client ;) I think what I really need is the 
density to fade away based on time but also based on the speed. I will 
test that an other time and use my workaround for now.

Thanks again

François

Sebastian H. Schmidt wrote:
> hey francois
>
>
> one thing i've forgot i dont know if you realised it,
> make sure that the scalar field that you've created in 1, has the same
> dimensions/resolution & position as your fluid field
>
> about the gas calculate node:
> you can do some basic maths on a certain field with it so
> increasing/decreasing values through pre/post adds or multiplies (thats d)
> and of course do some maths with other fields as well (thats c)
>
> so my idea behind it was,
> .... for each timestep increment all current field values by the timestep
> (or e.g. 1) that is the aging process
> ... and than to add the "new-born"-fluid to it use the calculation method
> minimum:
>      what that thing does,  ... for each "voxel-cell" in both fields it
> takes the one with the smallest ammount and puts it into the "myLife" pass.
>     that can lead to problems if it takes the zero-density voxels which are
> not emitting any water, and therefore the life in that cells will always be
> set to zero
>
>
> Seb
>
> On Thu, Oct 8, 2009 at 10:37 PM, Francois Duchesneau <sidefx at trinix.ca>wrote:
>
>   
>> Thanks for the answer Sebastian,
>>
>> I think I've almost set it up except for point c and d. I will try to
>> understand better how the Gas Calculate work because it doesn't seem to
>> work and I can't figure out the logic you told me.
>>
>> Here are the parameters I've set for the Gas Calculate
>> Dest Field=myLife
>> Source Field=source
>> Calculation=Add
>> Dest-pre add=$TIMESTEP
>>
>>
>> François
>>
>>     
>>> hey francois,
>>>
>>> here how i would do it, ... just freestyling i have no H at my disposal
>>>       
>> at
>>     
>>> the moment
>>>
>>> 1) create a new scalar field & name it "myLife" and maybe set its initial
>>> value to something increadibly high
>>> 1.b) you can use a scalar-field vizualization node piped into this scalar
>>> field to visualize the field!
>>> 2) apply this to your fluid field using the apply-data dop
>>>
>>> 3) on your fluid solver create a gas calculate node
>>>    a) which adds the contents of the source field "source"
>>>    b) into the destination field "myLife"
>>>    c) the calculation method you want to use could be "min", so all the
>>> fluid that is added comes in with a life value of something like 1
>>>    d) what you also can do is setting the dest-(pre or post) add to your
>>> timestep so destiny field "myLife" gets incremented each calculation step
>>>    one thing on c) i'm not sure what happens if your source field
>>>       
>> contains
>>     
>>> any  fields with zero as content, if that sets all the myLife to zero
>>> though
>>> ?? worth trying, maybe some kind of mask or something is arround that you
>>> can missuse ;)
>>> 4) use an gas-advect node to advect the "myLife" Field using the "vel" -
>>> Velocity Field
>>>
>>> give it a try
>>>
>>> Seb
>>>
>>>
>>>
>>> On Thu, Oct 8, 2009 at 8:53 PM, Francois Duchesneau
>>> <sidefx at trinix.ca>wrote:
>>>
>>>       
>>>> Hi everybody,
>>>>
>>>> I'm trying to get the life of a voxel fluid simulation in order to fade
>>>> off the opacity at some point like I would do with particles. How can I
>>>> do
>>>> that?
>>>>
>>>> Thanks for your ideas.
>>>>
>>>> François
>>>>
>>>> _______________________________________________
>>>> Sidefx-houdini-list mailing list
>>>> Sidefx-houdini-list at sidefx.com
>>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>>>
>>>>         
>>> _______________________________________________
>>> Sidefx-houdini-list mailing list
>>> Sidefx-houdini-list at sidefx.com
>>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>>
>>>       
>> _______________________________________________
>> Sidefx-houdini-list mailing list
>> Sidefx-houdini-list at sidefx.com
>> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>>
>>     
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>
>   
_______________________________________________
Sidefx-houdini-list mailing list
Sidefx-houdini-list at sidefx.com
https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list



More information about the Sidefx-houdini-list mailing list