Sun pixels out of range

Started by Senorpablo, August 03, 2023, 02:42:27 PM

Previous topic - Next topic


I don't know exactly what's going on, but the renders I get from Terragen seem to be producing values at the perimeter of the sun that are out of range. I have tested this both in Photoshop and Blender and see the same behavior as shown in the screenshot. It presents as black pixels at the edge of the sun. This was rendered to an exr file.

I can retouch these by hand in Photoshop, but obviously that's not ideal. 

Any ideas how to fix this within Terragen?

Terragen Sun Clipping.JPG


Another thing to try is to change the filter from the default 'narrow cubic' to cubic 'b-spline' (soft), it's the first thing I do if I want to render to exr.


Quote from: Kevin Kipper on August 03, 2023, 03:33:16 PMHere's a couple of threads in which Matt explains the cause of this:,16087.msg156778.html#msg156778,5251.msg81671.html#msg81671

It sounds like a known issue of Terragen writing values into the exr that are out-of-range for the file format. I'd rather not change the size of the sun disc to be inaccurate. 

Have you considered filtering the pixel output prior to saving the file, so that the exr files conform to the format specifications? 

This seems like it would be especially problematic for animations, with many frames that would make manual retouching impractical.


The dark ring is probably caused by one of the sharpening pixel filters (Catmull-Rom or Mitchell-Netravali), as they can produce negative pixels in areas of strong contrast such as the edge of the sun. Switching to any of the other pixel filters should fix it. Cubic B-Spline is a safe choice.

Alternatively, if you enable "anti-aliasing bloom" you can use any pixel filter, as it blurs the sun edges enough to prevent negative pixels.
Just because milk is white doesn't mean that clouds are made of milk.