Jump to content

Shaders for Coloured Water or liquid


bhaveshpandey

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

Link to comment
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
Link to comment
Share on other sites

  • 2 years later...

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

Link to comment
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?

Link to comment
Share on other sites

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