Game Development Community

T3D 1.1 Beta 3 - ScatterSky banding with HDR enabled

by Daniel Buckmaster · in Torque 3D Professional · 03/09/2011 (7:54 pm) · 10 replies

Build: 1.1 Beta 3

Platform: Windows 7 64 bit (OSX...?)

Target: World Editor, PostFx manager, ScatterSky, HDR

Issue: when HDR is enabled by default in a PostFx preset, a ScatterSky will show banding artefacts.

Steps to repeat:

  1. New project, Full template
  2. Open World Editor in Empty Terrain level, open PostFx manager, select HDR tab, check enable
  3. Save PostFx presets over core/scripts/client/postfx/default.postfxpreset.cs
  4. Reload mission
  5. (Optional) Go back to HDR tab of PostFx manager, uncheck and check enabled, ScatterSky should return to normal

(Just in the process of double-checking this report...)

Original message:

Not sure if this is a bug or just something I'm doing wrong. I've been playing around with the PostFx manager, enabling HDR and stuff. I saved my new settings over the default.postfxpreset.cs file in core/scripts/client/postfx, and reloaded the level. Now the ScatterSky in the default Empty Terrain level (from the Full template) is displaying a strange sort of colour banding:

img269.imageshack.us/img269/7826/scatterskypostfxproblem.jpg

If I go into the PostFx manager and toggle HDR, the sky goes back to normal. I'll be doing some more investigating over the weekend; just thought I'd ask if I was doing anything blatantly wrong first.

About the author

Studying mechatronic engineering and computer science at the University of Sydney. Game development is probably my most time-consuming hobby!


#1
03/10/2011 (5:56 am)
I get that too.....
quite distracting,
never found a way to correct it.
its realy bad in a night scene.
#2
03/10/2011 (10:15 am)
Looks like a precision issue in the HDR shader...

Sadly on my Mac here I get no HDR (or any PostFX) so I can't test/fix much, nor am I all that familiar with the postfx shader chain but...what precision are all of the buffers stored in? If you're taking a RGBA8888 buffer and doing a bunch of math on it you end up capping values until you get nasty banding similar to that...
#3
03/11/2011 (10:17 pm)
The strange thing is each band seems to have a gradient... it's just that the gradient is applied in the wrong direction.
#4
03/11/2011 (10:48 pm)
Daniel,
I think you are correct,
it sure does look that way.
#5
03/12/2011 (12:26 am)
Since others have seen this, I'm going to edit it into a proper bug report.
#6
03/12/2011 (12:57 am)
save the bug report,
you have a fix in mind?
probably quicker if yes....
#7
03/12/2011 (2:52 am)
Nope, no idea :P. I know very little about the shader pipeline.
#8
03/15/2011 (4:09 pm)
Greetings!

Logged as THREED-1472. Thanks!

- Dave
#9
10/28/2011 (1:13 am)
Not sure if it works for your issue but try setting:
$pref::PostEffect::PreferedHDRFormat = "GFXFormatR16G16B16A16F";
#10
11/01/2011 (11:52 pm)
I suspect this is a subtle bug in the scatter sky shader calculations that is really apparent when HDR is enabled.

Still you will get some banding with HDR in extreme cases... i can see it even in like Battlefield 3.