Jump to content
bhaveshpandey

Shaders for Coloured Water or liquid

Recommended Posts

hi everyone..

i'm working on a fluid particle simulation where i need the fluid to be coloured red or orange like an Ink.. i.e a bit transparent and yet retaining the colour and water type look....right now i have a normal "Basic Liquid" shader on it, which i guess, is over-riding the colour info, this is making it look worse that some sort of clay(..my renders are not showing any transparency in the material)

here's a test file....i have left a BASIC LIQUID shader in the Shop

What I have Done:

i have just added a color node to the particle node and promoted it up to the Particle Fluid Surfacer..

What I want:

i want to make this look like a coloured liquid..

I tried my way thorugh it and was a bit successful..i just multiplied the color i wanted in the BASIC LIQUID shader network..

the issue is that if i have another set of particle fluid and i wished to mix their colors, using the above method will be a pain..

I want the shader to consider the Cd attribute on the Particle Surface while rendering..

any help would be great

cheers

test.hip

Share this post


Link to post
Share on other sites

Oddly enough this is something I've just been giving a crack myself.

To set up the particle fluid emitters:

1) Make a copy of first particle fluid emitter and place it so the fluids collide.

1) In the new particle fluid emitter change the birth group to a new group (in the file blue).

2) Inside the new particle fluid emitter change the source group on the color to the new group.

3) Add a gas diffuse solver to mix the colors.

4) Finally in the basic liquid shader add a parameter and use a "color" as type and "Cd" as the parameter name.

And then it should be all good :-)

I've attached my .hipnc file, since it will probably make more sense. All the nodes I've changed are in red and the particlefluidemitter has some comments on it (basically the same as the above).

gas_diffuse.hipnc

Edited by jujoje

Share this post


Link to post
Share on other sites

What about if I have a fluid that I want to simulate that it is underwater. I want the fluid to diffuse/mix with the water, but I'm not actually simulating water (it's in the ocean). I just want the

fluid to be surrounded by water instead of air. Do you have any suggestions for this?

Oddly enough this is something I've just been giving a crack myself.

To set up the particle fluid emitters:

1) Make a copy of first particle fluid emitter and place it so the fluids collide.

1) In the new particle fluid emitter change the birth group to a new group (in the file blue).

2) Inside the new particle fluid emitter change the source group on the color to the new group.

3) Add a gas diffuse solver to mix the colors.

4) Finally in the basic liquid shader add a parameter and use a "color" as type and "Cd" as the parameter name.

And then it should be all good :-)

I've attached my .hipnc file, since it will probably make more sense. All the nodes I've changed are in red and the particlefluidemitter has some comments on it (basically the same as the above).

Share this post


Link to post
Share on other sites

Just a quick thought....

Do it with particles but advect it with a fluid sim.

What about if I have a fluid that I want to simulate that it is underwater. I want the fluid to diffuse/mix with the water, but I'm not actually simulating water (it's in the ocean). I just want the

fluid to be surrounded by water instead of air. Do you have any suggestions for this?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×