PDA

View Full Version : Fluid Shading -> Mesh


vfxectropy
03-02-2011, 02:50 AM
As many of you are fully aware there's dozens of posts about how to get fluid shading onto particles. But! How do you get fluid shaders onto a poly mesh?

I'll write a script to have my object be a bucket of evenly spaced particles if need be but I was hoping that there was a more effective way to do this.

My simple tests of "just trying it" yielded this:
// Warning: Mesh shape pCylinderShape1 has no valid surface shader. Not tessellated.

Duncan
03-02-2011, 06:32 PM
Currently you can't use a fluid shader on a mesh, at least not the way I think you want to. One can use fluids as textures on meshes, or can use a fluid shader on a volume primitive. One can apply a fluid as a surface material (instead of a volume material) on a shading group, but this will not work the way you presumably want, i.e. to have the internal volume of the object shaded with the fluid's volumetric shading. In the Maya sw renderer it samples a volume span through the fluid starting at the hit point(surface) and extending in the ray direction a distance defined by a special attribute on the fluid: surfaceShaderDepth. This does provide a limited volume sampling near the surface, but has two major problems: ray spans are a fixed depth instead of continuing to the next hit point, thus it does not become transparent at the boundaries and secondly the shadows ignore the mesh, tracing the shadow ray through the full fluid rather than the portion inside the mesh. The mental ray render when applying a fluid this way does something different... I think it simply does a point transparency and color sample of the fluid, instead of shading a volume span. Either way neither behavior is likely to help you.

Duncan

CGTalk Moderation
03-02-2011, 06:32 PM
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.