PDA

View Full Version : Maya Fluid and Z-Depht


optimus008
08-16-2007, 02:48 PM
I have been having some problems trying to get Mental Ray to render out Z-depth on fluids.
Can mental Ray handle fluid z-depth or do I have to use Software to get my Z-depth info.
Duncan or anyone else can you help me on this issue.

Duncan
08-16-2007, 03:58 PM
It is currently difficult to get a good Z value out of a fluid render. You can set the depthType to nearestVisible, which will allow volumes and objects with transparency to appear in the depth buffer. However with fluids the depth value will not be the point at which the fluid becomes relatively opaque, but instead the nearest face of its cube shape(there is an existing bug on this). Also in Mental ray the fluid does not seem to appear at all in the depth buffer, regardless of the depthType setting( I'll log a bug ).

A possible workaround might be to convert fluid to poly just for a depth pass render.

Duncan

darktding
08-16-2007, 04:13 PM
Duncan,
A small suggestion on this matter...
If somehow users can do more with the color method section of the fluid. So we can connect other variables than simply color, one could solve this problem.
What I am hinting at is, if there was a distance node that could be connected to a ramp and this distance node is between the camera and the point it hits a density and temperature value it stores a color in that color section of the fluidbox.
Also there can be more uses other than depth if one could manipulate the color section, just a thought.

oh and please make maya fluids look better than fumeFx, I get really pissed when I see 3dmax users show off their fumefx sims...
thank you

Duncan
08-16-2007, 04:31 PM
You can currently use shading network textures, expressions and such on fluids, but they only get evaluated for the near bounds of the fluid( unless one increases the volume samples override).

Also it is possible to do things like directly write into the color grid using setFluidAttr. Basically walk through each fluid voxel, use fluidVoxelInfo to get the worldspace position of the voxel then find the distance between this and the camera then remap this to the desired color space and do setFluidAttr on the voxel color. However the iff zbuffer output is more accurate, being a full floating point value. Converting the fluid to poly and using that is still the best workaround I know.

Duncan

optimus008
08-16-2007, 04:45 PM
A possible workaround might be to convert fluid to poly just for a depth pass render.

Thanks Duncan

CGTalk Moderation
08-16-2007, 04:45 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.