Halo Effect Rendering Problem

Started by ejgodwin, January 15, 2014, 07:12:25 PM

Previous topic - Next topic

ejgodwin

Hi,

After reading this post about specks in the atmosphere from a light source:
     http://www.planetside.co.uk/forums/index.php/topic,16690.msg163060.html#msg163060
I thought I'd try using a small, localized cumulus cloud layer to get a "halo" effect around a torch object & light source. I achieved some fairly decent results:

[attach=1]

The problem is that when I go to do the final render, the progress grinds to a near halt when it reaches the area of the halo. I left it running overnight, and it was still struggling through that one halo. In fact, I couldn't even tell if it had made any progress at all. It blazed through the sky part of the render in no time, so I know it's not just the render settings.

To be fair, the scene is complex, with lots of objects and the sun low on the horizon to the left, not to mention a water shader beneath the bridge. (Wave scale is at 3 to depict a rough mountain river; I did a cropped, lower-quality render with the water shader turned off for the above example.) I also tried setting the water shader transparency to 0, but it didn't seem to have much effect. I'm also not sure the problem's caused by that or even the "atmosphere halo" shader itself, as the immediate area has all those objects (torch, bridge, horse, etc).

I'm kinda stumped, so I thought I'd post the parameters of the atmosphere shader, the light source, and the render itself. Maybe this scene is too ambitious, but I'm hoping some of you more experienced users can spot something out of whack. Basically, I'm looking for the minimum settings to get a nice halo effect like above yet still finish before the next Mayan calender recycles. :D

Low level Cumulus shader settings (only those changed from default):

Main tab:

  • Cloud depth: 4
  • Localized: checked
  • Radius: 2
  • Falloff: 0.1
  • No density shader
  • Edge Sharpness: 0.4
  • Cloud density: 0.001
Lighting:

  • Light propogation mix: 0.125
Quality tab:

  • Quality: 0.6
  • Sample jitter: 0.5
  • Ray fuzziness 0.2
Optimization tab:

  • Acceleration cache: None

Light source settings:

  • Source radius: 0.1
  • Strength: 20
  • Max distance: 20
  • Cast shadows: checked
  • Shadows of surfaces: checked
  • Shadows of atmosphere: unchecked
  • Soft shadows: checked
  • Soft shadow samples: 9
  • Glow in atmosphere: checked
  • Specular highlights: unchecked
  • Visible Object: unchecked

Render settings:

  • 3840 x 2160
  • Detail: 0.7
  • AA: 5
  • Ray trace objects
  • Defer atmo/cloud
  • GI settings: 2/2/8 with supersample prepass, but GI detail OFF
  • Anti-aliasing bloom off (was getting wierd dots on water)
Any help is greatly appreciated. Thanks,

Ed

TheBadger

THis light looks very nice already. I hope you find your answers.
Im bookmarking this page as Im sure it will come in handy.

Nice tree spirits in your avatar!
It has been eaten.

Dune

I'm almost certain it's the water shader that's causing the delay. 3 (three) is very, very rough and even without transparency my experience is that rough water takes ages. Soft shadows isn't helping either, so you could check if you really need that.

Tangled-Universe

Defer Atmo/Cloud only works fast if you REALLY know how to optimize your ratio of atmosphere/cloud quality settings in combination with adaptive AA settings.

I recommend switching that off.

Because, how many atmosphere samples do you use now? Anything beyond 16 atmo samples with AA5 will bogg down your render enormously.

ejgodwin

Ah, I have my Atmosphere samples at 24. I'll try without defer/atmo and see how it goes.

I'd hate to give up on the rough water. I tried a much smoother water setting a while back, but it didn't look natural with it being a mountain stream and all those rocks along the shore.

Thanks for the help.

ejgodwin

Update: I did a cropped render in the problem area so I wouldn't have to spend so much time figuring this out. This is what I found:

Lowered atmosphere samples to 16 and disabled defer/atmo, no luck.

Tried disabling the water shader, but it made no difference.

What did work was disabling the "Ray trace objects" in the render. Went much faster. Looks like the combination of that and those multiple light sources & halos in close proximity are the culprit. But it's not a solution, because the rendered objects looked terrible. I thought of lowering some of the samples in the atmos, etc, and "ray trace everything", but seems to me that would only make things worse.

Open to suggestions at this point.

yossam

Can you post the original tgd........I'll look at it and see if I can figure out what is going on.  :D

ejgodwin

I'd love to. Problem is, the project has huge file dependencies: 2 ter heightfields at 63MB, and another 35MB in imported obj files and supporting texture images. That's too big for an attachment, even zipped. If you can figure out another way to get them to you, I'm more than willing.

Oshyan

It's quite odd that Raytrace Objects is slower, though not unimaginable. Is there anything unusual about your objects? Are they reflective or anything?

- Oshyan

ejgodwin

Most of the shaders for the imported objs/mtls have .333 as reflectivity, which I believe is the default. Should I set those to zero? The horse (and rider, not shown) have a lot of polygons, so I could see where that might slow things down.

To broaden the question, what would be the ideal rendering settings in the specular tab for object shaders?

Tangled-Universe

Quote from: ejgodwin on January 16, 2014, 09:33:57 PM
Update: I did a cropped render in the problem area so I wouldn't have to spend so much time figuring this out. This is what I found:

Lowered atmosphere samples to 16 and disabled defer/atmo, no luck.

Tried disabling the water shader, but it made no difference.

What did work was disabling the "Ray trace objects" in the render. Went much faster. Looks like the combination of that and those multiple light sources & halos in close proximity are the culprit. But it's not a solution, because the rendered objects looked terrible. I thought of lowering some of the samples in the atmos, etc, and "ray trace everything", but seems to me that would only make things worse.

Open to suggestions at this point.

I didn't say that disable deferred atmo would fix your issue and give better results. It only slows down your render, which the second issue you had.

Quote from: ejgodwin on January 17, 2014, 07:41:03 AM
Most of the shaders for the imported objs/mtls have .333 as reflectivity, which I believe is the default. Should I set those to zero? The horse (and rider, not shown) have a lot of polygons, so I could see where that might slow things down.

To broaden the question, what would be the ideal rendering settings in the specular tab for object shaders?

As far as I know it doesn't matter which settings you choose in that tab. It aren't raytraced reflections.
Any reflectivity >0 will have the renderer calculate the incidence of light on the reflective surface and the values set in the specular tab act as a kind of multiplier for the outcome.
Very likely not a correct technical explanation, but in the past 7 years I have never noticed differences in rendertime due to settings in the specular tab of my objects.

Oshyan

Yes, I was referring to *actual* reflectivity (raytraced, using the Reflecting or Water Shaders).

- Oshyan

Matt

#12
"Ray trace objects" affects the speed and quality of not just the objects, but any atmosphere/cloud in front of the pixels of those objects. For every pixel of the object it renders the object's surface and the atmosphere between the object the camera. In terms of sampling and quality, the atmosphere/cloud in front of objects are rendered similarly to "defer atmo/cloud", because it's not possible to generate separate micropolygons just for the atmosphere/cloud floating in front of your objects (micropolygons are the rendering method used to render objects when "ray trace objects" is OFF). Because of all this, you still need to think about optimising your atmosphere and cloud samples if a significant portion of those things covers objects.

Finally, I would recommend leaving "defer atmo/cloud" ON so that you get more consistent quality across the whole image. Personally, my main reason for having "defer atmo/cloud" turned OFF in the default scene is because there are no ray-traced objects in the default scene. As you start to add objects to a large area of the image, to me it makes sense to turn "defer atmo/cloud" ON and try to optimise the cloud and atmosphere samples to that.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

ejgodwin

Makes sense, Matt. I'll give it a try. I'm also reducing the radius of the halo, as it's a tad too generous, IMO.

ejgodwin

Well, after hours of mind-numbing experimentation, it turns out that my problem was none of the above, at least not directly. I had a fake stone shader bordering the river, and when I replaced it with a rock population (thanks to dandelO for his excellent tutorial here: http://www.planetside.co.uk/forums/index.php/topic,10256.msg106284.html#msg106284), the rendering slowdown problem vanished. For comparison purposes I let the old project render for over 60 hours, and at least 90% of the time was spent on two "rows" beginning in the area of the rock shader, while the render itself was only 2/3 finished (at which point I aborted it). Now it renders overnight. I think it had to do with all the intersections and reflective complexities, both with the water shader and the multiple light sources, as I had the density of the fake rock shader ramped up pretty high.