Author Topic: CoronaSun can't rotate downwards...  (Read 2734 times)

2018-06-22, 07:24:58

Njen

  • Active Users
  • **
  • Posts: 557
    • View Profile
    • Cyan Eyed
I found an issue where if I try to lower the sun below what I am guessing is the horizon, the sun won't represent that translation.

For example I have linked the sun to its target, and in the first image below, the sun is in a defualt orientation near the horizon. In the second image, I have rotated the sun 5 degrees in elevation above the original location. In the third image, I have rotated the sun -5 degrees below the original location, and it doesn't look like it has moved the expected amount. Then in the fourth image I have rotated the sun -10 degrees below, and it looks lilke it is in the same position as the previous render.

I need the sun to be able to go lower than the horizon, as the scene I am working on takes place in the sky, and I want to simulate the natural movement of a skyship by gently rotating the environment HDRI and sun, instead of having to rotate all of the geometry, cameras, lights, etc.

2018-07-04, 13:50:20
Reply #1

MarekB

  • Active Users
  • **
  • Posts: 9
    • View Profile
Hi, currently, it is not possible to rotate the sun below the horizon as the simulation model doesn't support it. We might actually change that in the future so that the colour of the sun below the horizon would be the same as on the horizon, but no promises there.

2018-07-04, 13:51:37
Reply #2

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12750
  • Marcin
    • View Profile
I can also think of a workaround - bake your sun (or sun+sky) as a HDRI enviro. Just set up a spherical camera, and render it to a 360 .hdr image. Then load this as your scene enviro - and you can rotate it however you wish.
Another idea is to use the 3ds Max direct light instead of a Corona Sun.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2018-07-04, 14:03:05
Reply #3

pokoy

  • Active Users
  • **
  • Posts: 1861
    • View Profile
I can also think of a workaround - bake your sun (or sun+sky) as a HDRI enviro. Just set up a spherical camera, and render it to a 360 .hdr image. Then load this as your scene enviro - and you can rotate it however you wish.
Another idea is to use the 3ds Max direct light instead of a Corona Sun.
The problem with this workaround is that we can't rotate an environment map properly in vertical direction. Would make a neat feature in CoronaBitmap ;) I think I've requested this a few times.

2018-07-04, 20:05:59
Reply #4

Njen

  • Active Users
  • **
  • Posts: 557
    • View Profile
    • Cyan Eyed
I can also think of a workaround - bake your sun (or sun+sky) as a HDRI enviro. Just set up a spherical camera, and render it to a 360 .hdr image. Then load this as your scene enviro - and you can rotate it however you wish.
Another idea is to use the 3ds Max direct light instead of a Corona Sun.
Can't bake it all out, as I need light selects for the sun and env lights individually. Hmm, it saddens me to think that my only option for now might be to use a direct light.

The problem with this workaround is that we can't rotate an environment map properly in vertical direction. Would make a neat feature in CoronaBitmap ;) I think I've requested this a few times.
Actually, we can rotate the environment map in all three axis. I worked it out while documenting some of my discoveries in this thread:
https://forum.corona-renderer.com/index.php?topic=20777.0
basically, I wire the Y and Z axis of a helper object to the U and V offset values in the CoronaBitmap, then I wire the X axis of the helper to the 'Degrees' value in the CoronaBitmap.

Hi, currently, it is not possible to rotate the sun below the horizon as the simulation model doesn't support it. We might actually change that in the future so that the colour of the sun below the horizon would be the same as on the horizon, but no promises there.
That would be perfect please.