Change the Color of Maya Fluid

Change the Color of Maya Fluid

Anonymous
Not applicable
860 Views
2 Replies
Message 1 of 3

Change the Color of Maya Fluid

Anonymous
Not applicable

Hi guys,

 

I want to change the color of maya fluid by python. I used the following command:

 

cmds.setFluidAttr( 'fluidShape2', at='color', vv = (0,0,0), xi=x, yi=y, zi=z ); 

 

Unfortunately, it doesn't really change anything and there is no error.

 

Do you have any idea? And anyone knows how to set color for each cell? I want to assign specific color value to the cell according to its density.

 

Cheers!

0 Likes
Accepted solutions (1)
861 Views
2 Replies
Replies (2)
Message 2 of 3

mspeer
Consultant
Consultant
Accepted solution

Hi!

 

1. Your command needs values for x, y, z and i would choose a better color for a test like red:

cmds.setFluidAttr( 'fluidShape1', at='color', vv = (1,0,0), xi=0, yi=0, zi=0 );

2. Make sure you have Density on the Fluid or you will see nothing ("Gradient" is enough for a test)

3. Set Color Method to "Static Grid" or "Dynamic Grid"

 

0 Likes
Message 3 of 3

Anonymous
Not applicable

Thanks

0 Likes