4
$\begingroup$

When I render out my rather sharp volumetrics, I get the kinds of artifacts shown in the images and links below. They are obviously produced by step size, and samples stepping through the volume, and the easy answer is to decrease step size ad infinitum and increase volume bounces until your computer explodes. What I don't understand is the concept behind these artifacts are produced in the first place. If the dark bands are where light never gets to, why does more light get to the end/beginning of each step in the first place? it suggests cycles has some kind of bias near the step, and more samples/bounces don't help somehow. if someone knows a way to fundamentally limit or stop their occurrence, it would be grand, too.

enter image description here

$\endgroup$
  • 1
    $\begingroup$ Please can you clarify which artifacts you are refering to? Is it the banding along the sides of the cube? How have you generated your volumetrics - is it something you could share (upload to blend-exchange?) $\endgroup$ – Rich Sedman Sep 25 '18 at 22:03
  • $\begingroup$ pasteall.org/blend/index.php?id=50404 here's the file. to get the volume you just need to play it past 217 or so frames. Note that this file was made specifically to expose the artifact as clearly as possible. The artifact has been noticed as "step size banding" by everyone and is rather well known... but why does no one question why is exists? I haven't seen this artifact from other render engines. $\endgroup$ – Nubnubbud Sep 26 '18 at 8:13
2
$\begingroup$

The banding in the smoke on the side of the cube is due to the volumetric Step Size and is an artifact due to the way in which rays that travel through a volume are calculated.

In the same way that your Render settings define the resolution of the resultant image (eg, 1920x1080) - and higher resolution results in more 'pixels' in the image and therefore considerably more "work" to render - the Step Size effectively defines the "resolution" of volumetrics. However, rather than define the resolution the setting controls how small or large the steps should be between samples of the volume. The smaller the Step Size, the higher the effective resolution.

For each ray that travels through the volume Blender will allow the ray to travel Step Size scene units through the volume before it samples the volume to determine the outcome (whether it scatters, is absorbed, results in additional emission, etc.). The smaller the step size, the more often samples of the volume will be taken and the more complicated the render (and subsequently longer render times) - so this setting is a trade-off between render speed and volumetric quality.

In your scene you have the Step Size set to 0.1. This is in Blender Units and the cube is only actually around 0.5 blender units in size - so any artifacts of the volume are quite considerable compared to the size of the cube.

Typically you should reduce the Step Size to something that would not be significantly noticeable for your scene. This depends on the size of the objects in your scene, the position of the camera, the "fluffiness" of your volumetrics (soft edges will hide any artifacts), etc. so there is no 'one size fits all' best value.

I'm sure all other render engines must use a similar setting - although it might be hidden/masked from the user and possibly even automatically determined. However, in Blender it is one of those settings you need to be aware of and tune based on the available render time and desired quality, scale, etc.

The banding you are seeing is effectively an interference pattern due to the range of factors that you have set up your scene to highlight this particular problem - in particular that your Smoke Domain resolution is only 32 (low for such a large domain viewed at close range), your Step Size is 0.1 (around 20% of the size of the cube that takes up most of the visible frame), your camera is purposefully positioned on the corner of the domain (which is forcing the largest angle between simulation cells and the camera rays). All of this together is creating a perfect storm of interference. As the rays pass trough the domain they either 'hit' a cell at a sample-point along their length (the 0.1 step size) or they don't. Due to how all the factors interact, the position along the ray where it interacts with a cell progresses along the ray based on all the other factors, resulting in some 'bands' hitting one set of cells (closer in so more likely to have denser smoke) whereas slight changes in angle or start point (due to camera ray angle or due to how the domain surface (the start of the volumetric ray) is a different distance at that angle.

Your domain resolution (32) is not a practical value for such a scene - increasing the resolution significantly reduces the banding due to higher resolution smoke simulation causing less interference.

$\endgroup$
  • $\begingroup$ I understand, but I wasn't asking what a step was, I was asking for what was causing these stepping artifacts, and "...an artifact due to the way in which rays that travel through a volume are calculated" isn't terribly useful. would you mind explaining how the rays through a volume are calculated, with reference to how it causes banding on the volume? $\endgroup$ – Nubnubbud Sep 26 '18 at 23:47
  • 1
    $\begingroup$ Apologies if this wasn't clear. I've updated my answer with additional information. The banding is effectively an interference pattern caused by your very low resolution smoke simulation, extreme viewing angle, and high step size. $\endgroup$ – Rich Sedman Sep 27 '18 at 7:10
  • $\begingroup$ that is not the cause. I still get the artifacts at a 240 resolution simulation with 3 divisions, and because I can pan and change angles, I would have noticed it it was only happening at one angle. I still would like to know, though, why some parts of the smoke (not the cube, unless it is linked) are brighter than others when they all receive the same light. $\endgroup$ – Nubnubbud Sep 28 '18 at 8:10
  • $\begingroup$ I've tried your example scene at 240 smoke resolution and 3 divisions. The higher resolution seems to mask the banding due to the softer smoke edges so I cannot see banding with the camera in that initial location. Adding a material fed from the Camera Info 'Distance' socket via a Modulo function to the Cube surface seems to indicate that the banding is indeed due to how the ray length is interacting with the Step Size (the banding on the cube closely matched the direction and spacing of the a banding of the smoke). I still maintain that the Step Size is simply too high for the desired detail. $\endgroup$ – Rich Sedman Sep 29 '18 at 6:46
  • $\begingroup$ I've submitted a request, it was confirmed by a dev and added to the blender todo list as a rather important fix/patch. So far as I know, Other engines don't seem to have this issue, and I wonder if just jittering the start points of the rays back and forth between samples would help. On the other hand, I'm a terrible coder, and it's most likely better to find the root cause, as an incorrect algorithm can have other effects than just this, down the line. I've confirmed a similar effect is also occurring in both EEVEE and the viewport, so I'm starting to doubt part of cycles that's causing it.. $\endgroup$ – Nubnubbud Sep 30 '18 at 7:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.