PDA

View Full Version : some particle Driven fluid question....


YY3010966
10-20-2007, 05:18 PM
hi all ,there is some question pulling my hair out ...


1. i wanna uses the velocity to driven the opacity of the fluid ,but everytime I use the getFluidAttr ,maya told me :// Error: invalid fluid attribute name //

now , i know the getFluidAttr cant get transparency or opacity,

so how can i uses the velocity to driven the opacity ????

2. when i use particles PP attribute to driven fluid velocity, it seem only velocity can used. i created vector PP attribute to get the difference of particles position between two frames ,and multiply 24 (24 fps, time setting) to fake velocity ,the value alomst same ,but it didnt work.... (keep the velocity 0) i dknow why
hope someone kind can light me !! thank you so much !!

Duncan
10-22-2007, 07:02 PM
If you want to use particle velocity to set the fluid opacity, then you would need to do setAttr on some grid value( like density or temperature ) and then on the fluid use this grid as the opacity input.

If instead you are rendering with a fluid assigned as a particle shader (typically texture only and no grids when doing this) then you would need to drive the fluid transparency attribute( or opacity input bias ) with the particle velocity from a particle sampler info node.

Duncan

apoc519
10-22-2007, 08:45 PM
Why not set the opacity graph to speed? That way you can control the transparency of the fluid based on its velocity

Might save you some scripting time

darktding
10-22-2007, 09:02 PM
Why not set the opacity graph to speed? That way you can control the transparency of the fluid based on its velocity

Might save you some scripting time

because she is trying to add/remove density values based on the speed of the particles; atleast from what I can understand...
And duncan is right, there is no such thing as adding or removing opacity... there is only adding and removal of temperature and density values and their opacity is determined by the graph via the shader.

YY3010966
10-23-2007, 12:37 PM
thank you so much Duncan,apoc519 and darktding! you are the lifesaver!

Paul, do you mind to explain more detail your method? what meaning that you said "set the opacity graph to speed" ,How?

by the way,Duncan ,do you remember me (:) ,haw-haw)

Duncan
10-23-2007, 03:20 PM
One can set the opacity input on the fluid to "speed" in which case the fluid will be more opaque where the velocity grid magnitude is higher. You would still need to set the fluid velocity from the particle velocity, and this assumes one has a single large fluid that is rendering, instead of a fluid shader applied to particles.

YY3010966... the name doesn't ring any bells for me. Is that your photo? (sorry if I'm being dense)

Duncan

CGTalk Moderation
10-23-2007, 03:20 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.