Jump to content
Pancho

Mixing liquids

Recommended Posts

I need to layer a colored/tranparent material with a milky one, e.g. a layer of honey and yoghurt in a glass on top of each other.

I guess there are are three ways to do that.

a) Having one geometry with two different textures assigned.

PRO - The transition can be smooth, since both materials can be mixed
CON - If I look through the transparent texture into the area/region of the milky one, it'll remain transparent since this isn't a volumetric approach. The textures will be assigned on the outside, so no change inside of the material.

B) Having one geometry for each material

PRO - The texture will always change at the boundary of each material. Looking through the honey into the yoghurt works.
CON - It's an abrupt change from one material to the other, no gradient. Unnatural look.

c) Having a volumetric approach.

BUT how would it work? With VDBs or with particles carrying the information on how much each material is represented at this location?
Wouldn't this keep me from rendering with the regular materials (Redshift)? I wonder if this works at all?

 

Anybody an idea???

 

Cheers
Tom
 

Share this post


Link to post
Share on other sites

You can use an attribute to cross fade between two Redshift materials. In this image I am blending between Opaque and Glass driven by the @Alpha attribute. Use the rsMaterialBlender for this type of material work.

Untitled-3.jpg

Edited by Atom

Share this post


Link to post
Share on other sites

Thanks for the quick reply!

I guess the problem with this approach would be if you look at a flat angle into the object in the clear area, it'll remain clear. It won't become opaque towards the opaque area since the material influence is defined at the outside.

This approach works great, as long as you keep the view from the side, since it doesn't reveal that the textures aren't volumetric.

 

Share this post


Link to post
Share on other sites

I guess I don't see the problem. You can view this from any angle and it works. There are no textures in the posted image. It is merely picking up Refraction/Reflection from the scene elements.

Honey will have it's own IOR and you may want to blend in a SSS for the yogurt instead of a basic material.

Is this a product shot? How locked is the camera?

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

×