Jump to content

Relation between volume quality and stochastic sample?


Recommended Posts

Hi awesome guys on odforce,

I am currently trying to optimize my volume render and I am a bit confused what is the relationship between volume quality and stochastic samples? How they contribute to the final sample beings send on the volume? How should I balance them? Any ideas are welcome! 

Edited by ranw0477
Link to comment
Share on other sites

here's my understanding:

volume quality relates to the number of samples created along the path of the ray.  at ray quality 1, the volume is sampled once for each voxel along the camera ray.  at .25 it's sampled roughly once every 4 voxels.  since it's along the camera ray, it's not very noticeable really, until you get very low.  the result is that you have fewer transparency calculations along your ray since you have fewer intersections with your volume.

stochastic sampling is a modified screen-door technique applied to all transparency (not just volumes).  the idea with stochastic transparency isn't to reduce the number of ray intersections, the idea is to stop the path tracer early for some rays.  so what it does it to treat some portion of your shading samples as opaque, even if they're partially transparent.  i'm a bit vague on how the actual samples number is utilized other than more gives better results.

i tend to not mess too much with volume quality.  usually you try the lowest stochastic samples you can get away with.  if you're ray tracing shadows in your volume, i would suggest you increase ray samples and turn off ray variance.

 

Edited by fathom
Link to comment
Share on other sites

I'd like clarification on this, but by enabling stochastic, I believe that you are telling mantra to split off the opacity sampling from how it would have been sampled without stochastic enabled (which would be along with the uniformly-lengthed volume quality sampling) -- So this means that it now has to calculate opacity much less frequently (from 1 to whatever your stochastic set to), and speeds up the render. That is why by enabling stochasic, it instantly makes the render more 'noisey' (or more randomly scattered opacity sampled). Just from intuition, I'd guess the values you plug in the stochastic parm are multiplicative, like the volume quality.

Link to comment
Share on other sites

documentation states that quite clearly:

"Stochastic transparency samples - The number of transparent samples to be shaded as a ray travels through translucent objects. Increasing this value will result in less noise in translucent objects and is generally less costly than increasing Pixel samples, Volume Quality, or Min and Max ray samples. Stochastic Sampling will not have any effect on noise from Indirect Sources however. This may make the image noisier than without stochastic transparency, so you may need to compensate by, for example, increasing the pixel samples. You should generally leave this option on."

So to answer your question, there is no direct relation. Volume quality is related to the volume resolution and Stochastic sampling is related to the image sampling quality. In many cases it can help to render volumes faster (when the noise is coming mostly from transparency) but if you are getting the noise mostly from indirect samples (like volume bounce), you may want to turn this off because you need to crank up the pixel samples anyway.

The thing what fathom was talking about, the one with terminating a transparent samples early, is called Opacity Limit. That can speed up your render dramatically but it may suffer from reduced accuracy (especially with thin volumes). Usually you don't want to change this setting unless the speed is your main concern.

 

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