Author Topic: corona sun's colour at extreme angles  (Read 8107 times)

2014-04-11, 16:58:39

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9276
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Not sure if this bug or limitation of hosek-wilkie model, but when sun approaching horizon, blue channel in sun disk's color, became of negative value and sun instead of white, appears yellow in render. So it pretty much useless at those extreme angles, unless one's willing to turn off "visible in reflections".

One more thing, it would be nice if corona sun would have ability to set angle a few degrees below horizon.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-04-11, 17:54:24
Reply #1

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
Can you post an example image? Negative values are normal - sRGB can only represent a small fraction (36%) of all colors.  Corona internally uses much wider color space, covering 78% of all colors, to render some effects more accurately.  The result must be still converted to sRGB to display in the framebuffer. Extreme, out-of-gamut values will then show up as negative values in the pixel probe. But in the image itself they should be clipped.

I would add the option to go below horizon, but the sun model I use does not have data for this case.
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2014-04-12, 04:40:43
Reply #2

borisquezadaa

  • Active Users
  • **
  • Posts: 614
    • View Profile
Maybe it refers to this?...

https://forum.corona-renderer.com/index.php/topic,3005.msg22052.html#msg22052

The Corona sun is attached to a daylight system from max and time set to night. That gave a yellowish tone. Like sunset.
What i do with Corona My Corona post of random stuff rendering
WARNING: English.dll still loading...

2014-04-12, 12:22:58
Reply #3

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9276
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Thanks for explanation, didn't knew that srgb covers so little colours. I did some quick tests and i think i narrowed down cause of issue down to turbidity. I've recorded small video in which is seen that problem of extreme yellow sun disk dissapears when turbidity climbs over ~8,8. Please do notice how much improves behaviour of reflection at high turbidity level.

Btw, preetham model acts the same as hosek-wilkie.


It seems that youtube embeding is broken in forum lately. Here's the link to video:

« Last Edit: 2014-04-12, 12:28:27 by Keymaster »
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-04-12, 12:34:46
Reply #4

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
it looks it is working as expected. The sun is red (not white) at sunset, but because the green component is still very strong, and simple clamping is used, it becomes yellow: color 100, 2, 0 is clearly red, but after clamping to 1, 1, 0, it becomes yellow. There are several ways you can get around this limitation, you can save HDR file and colormap it in another application, or just decrease the intensity of sun/increase size/increase highlight compression until the colors become manageable
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2014-04-12, 12:55:26
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9276
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Ok, my knowledge is extremely shallow here, so i could talk complete nonsesnses, but isn't it wrong that after convesion from wide gamut to srgb blue channel is clipped to complete zero? Would be there a tiny fraction of info left in it, then we could have more realistic sun disk's color in completely overexposed image. Or is it impossible in principle?

Don't get me wrong, i love corona sun&sky and in many situations i favor them over hdri map. But with such behaviour at those extreme angles it's just unusable.
« Last Edit: 2014-04-12, 13:00:47 by romullus »
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-04-12, 13:51:44
Reply #6

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
no, it's not wrong. The model really says that there is no blue at all. If you don't like the output of the model, you can enter a color manually.
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2014-04-12, 16:21:24
Reply #7

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 9276
  • Let's move this topic, shall we?
    • View Profile
    • My Models
So, my guess, in RL we don't see such saturated yellow sun because blue light receptors or photosites is simply owerflooded with other wavelenghts of colour. Am i right?
I wonder if i can save render output in exr and try to elegantly heal it in post somehow. Need to try.

no, it's not wrong. The model really says that there is no blue at all. If you don't like the output of the model, you can enter a color manually.
Now, if there would be possible to enter hdr colours in sun's direct input, it could be worth a try, but with 8bits it doesn''t cut it, i'm affraid :[
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures