View Full Version : Transparency based on mesh volume
07 July 2011, 04:15 PM
I have a mesh from realflow and would like to make transparent areas not so large in size, say some splash areas of the hole mesh (the difference from other areas is that the volume of those areas is small).
Any mental ray or maya trick to do that? I don't want all the hole mesh to be transparent.THANKS
07 July 2011, 07:45 PM
Use the Physical Glass preset for the mia_material_x. Not the water preset, and just change the IOR back to water 1.33.
But anyways, the setting you are looking for in the material is under "Advanced Refraction". Check "Use Max Distance". And Color at Max Distance if you want some sort of tint instead of just fade to black.
This setting will cause light to diminish the further it travels into the substance, just like in real life.
Play with the distance value to get the real-world scale you desire.
07 July 2011, 10:26 PM
thanks for your reply.
I know about use max distance but what I were expecting is a sort of mesh volume pass and use that in comp. I think I will dg deeper in the use of max distance to get something. Thanks
07 July 2011, 11:35 PM
Well if you're going for physically accurate rendering of the liquid, you want it to be based on max distance, not a volumetric pass. Just play with the distance value to determine how fast your liquid absorbs light. You don't need to be controlling how transparent smaller drops are compared to bigger ones in post, max distance does it accurately for you.
If you don't have a proper lighting setup though, it may not look right, or you may not be seeing the true effect. For instance if you're just rendering with a single light shining on the simulation and nothing else, it's going to look weird and unrealistic.
Also, makes sure your Shadow Method is set to Segments in your render settings. And that you have a good amount of refractive trace steps.
07 July 2011, 08:23 AM
I agree with Kakkoii. However, if you really really want a pass for the volume for whatever reason, you could make such a pass with the mib_volume shader.
Just make a lambert. assign it to your mesh, connect a transmat material to the miMaterialShader input for the shading group. then make a mib_volume shader and connect it to the miVolumeShader input of the same SG. set the color of the mib_volume to white and play with the "max" setting to get desired result.
07 July 2011, 10:29 AM
Thanks to all of you. I think I have what I need in your answers.
07 July 2011, 10:29 AM
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.