Author Topic: [solved] HDRI flipped/rotated in viewport but not in render  (Read 7289 times)

2018-08-01, 12:54:26

ynotsop

  • Active Users
  • **
  • Posts: 39
    • View Profile
I am trying to align Corona Sun with the sun in an HDRI but I ran into a strange problem. When I put the HDRI in the Environment slot and use it as the environment background in my viewport the HDRI is rotated 90 degrees however the render displays the HDRI correctly. This has probably more to do with 3ds Max than Corona but maybe someone here can help me out.

Please see the attached image.

As you can see the interactive render is showing the HDRI correctly but in the perspective viewport it is showing the floor of the HDRI.



« Last Edit: 2018-08-01, 13:11:52 by maru »

2018-08-01, 13:08:30
Reply #1

ynotsop

  • Active Users
  • **
  • Posts: 39
    • View Profile
Okay so I figured out that this was happening because I had the CoronaOutput in the Environment slot instead of the bitmap itself.


2018-08-01, 13:12:54
Reply #2

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
Happens to the best of us ;)
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2018-08-01, 13:26:06
Reply #3

ynotsop

  • Active Users
  • **
  • Posts: 39
    • View Profile
Hey maru, I ran into another problem. I am currently trying to link up the sun's rotation with the HDRI but I don't have the "Coordinates" option under the Environment Texture Map in Parameter Wiring.

Any help is appreciated.

2018-08-01, 14:17:54
Reply #4

ynotsop

  • Active Users
  • **
  • Posts: 39
    • View Profile
It seems like there is no Coordinates option for Corona Bitmap but it does appear for 3ds Max Bitmap.

2018-08-01, 14:27:01
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
Check this out, it should still work and it's for both CBitmap and Max Bitmap: https://forum.corona-renderer.com/index.php?topic=17008.0
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2018-08-01, 15:54:27
Reply #6

ynotsop

  • Active Users
  • **
  • Posts: 39
    • View Profile
Thank you maru, I've tried doing this tutorial but now I have the Rotation option missing for the CoronaSun when trying to link it with the HDRI in the material editor. This is really frustrating because I would like to get it to work.

2018-08-01, 19:00:36
Reply #7

Njen

  • Active Users
  • **
  • Posts: 557
    • View Profile
    • Cyan Eyed
I found a method to be able to rotate the HDRI in all three axis, and I documented some of that here:
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.

2018-08-07, 21:45:28
Reply #8

ynotsop

  • Active Users
  • **
  • Posts: 39
    • View Profile
Thanks for the suggestion but I do not know how or where to apply those commands?

I managed to get it working with regular Bitmap. Are there any drawbacks to using regular Bitmap instead of CoronaBitmap for HDRI's?

I also made two bitmap materials, one with a lower resolution for my environment slot (to avoid lag when rotating) and one with a higher resolution for final render (in Corona) and connected their rotations. Pretty cool.

2018-08-08, 13:49:13
Reply #9

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12708
  • Marcin
    • View Profile
Thanks for the suggestion but I do not know how or where to apply those commands?
What commands do you mean? If you mean wiring, there are actually two videos showing this in the zip archives attached to this post: https://forum.corona-renderer.com/index.php?topic=17008.msg106554#msg106554

Quote
I managed to get it working with regular Bitmap. Are there any drawbacks to using regular Bitmap instead of CoronaBitmap for HDRI's?
A few. Such as no degree units in 3ds Max Bitmap and Corona Bitmap renders slightly faster.
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us

2018-08-08, 16:23:49
Reply #10

ynotsop

  • Active Users
  • **
  • Posts: 39
    • View Profile
Hey maru, I was replying to Njen's post and the codes in his link.

I've tried linking U offset of the CoronaBitmap to the U offset of 3ds max Bitmap but if I remember correctly there was an issue with units. I guess they use different units? Would it be possible to apply an expression command that would convert the units from one to another? This way I could use CoronaBitmap for rendering and have it linked (rotation wise) to my environment Bitmap.

2018-08-09, 23:55:23
Reply #11

ynotsop

  • Active Users
  • **
  • Posts: 39
    • View Profile
I managed to get it to work like in the video tutorial for CoronaBitmap. The trick is to assign the expression to Corona Target while the latter is still unlinked to CoronaSun. For some reason "Rotation controller" goes missing if the target and the sun are linked beforehand.

Maru thanks for posting the video.

2018-08-17, 22:56:36
Reply #12

cjwidd

  • Active Users
  • **
  • Posts: 1077
    • View Profile
    • Artstation
I am experiencing the issue described at the outset of this thread, whereby an HDR map is being flipped horizontally in all viewports and at render time. My only solution thus far has been to invert the tiling on the U axis, which of course solves the problem, but why is this happening in the first place?

2018-08-19, 22:11:35
Reply #13

ynotsop

  • Active Users
  • **
  • Posts: 39
    • View Profile
I am experiencing the issue described at the outset of this thread, whereby an HDR map is being flipped horizontally in all viewports and at render time. My only solution thus far has been to invert the tiling on the U axis, which of course solves the problem, but why is this happening in the first place?

This is a bug in 3ds max.