Planetside Software Forums

General => Terragen Discussion => Topic started by: Senorpablo on August 03, 2023, 02:42:27 PM

Title: Sun pixels out of range
Post by: Senorpablo on August 03, 2023, 02:42:27 PM
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


Title: Re: Sun pixels out of range
Post by: Kevin Kipper on August 03, 2023, 03:33:16 PM
Here's a couple of threads in which Matt explains the cause of this:

https://planetside.co.uk/forums/index.php/topic,16087.msg156778.html#msg156778

https://planetside.co.uk/forums/index.php/topic,5251.msg81671.html#msg81671
Title: Re: Sun pixels out of range
Post by: pokoy on August 04, 2023, 04:51:42 AM
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.
Title: Re: Sun pixels out of range
Post by: Senorpablo on August 09, 2023, 04:17:15 PM
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:

https://planetside.co.uk/forums/index.php/topic,16087.msg156778.html#msg156778

https://planetside.co.uk/forums/index.php/topic,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.





Title: Re: Sun pixels out of range
Post by: Matt on August 11, 2023, 04:28:31 PM
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.