Author Topic: Flipped environment map  (Read 3998 times)

2019-10-18, 12:16:59

TatjanaO

  • Active Users
  • **
  • Posts: 6
    • View Profile
Ok, it is not a big deal to flip hdri or bitmap in photoshop, but anyway - would be good to know if it is always so:

I have an exterior scene. I make 360 spherical panorama from 360 corona camera to use it as environment map in 360 interior view for the same project. In the exterior scene coordinates are correct and match interior's. Then when I load ready panorama to environment slot (Corona bitmap in CoronaColorCorrect) - it always comes horizontally flipped! Any ideas why?

2019-10-18, 12:22:38
Reply #1

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8898
  • Let's move this topic, shall we?
    • View Profile
    • My Models
It is 3ds Max that's flipping spherical maps in U coordinates in its bitmap loader and Corona decided to conform to this behaviour, so there would be less confusion. This isn't bug, just something you have to keep in mind and unflip spherical maps by hand.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-10-18, 12:28:40
Reply #2

TatjanaO

  • Active Users
  • **
  • Posts: 6
    • View Profile
Thanks :) I do keep it in mind :) just was curious why it is so.

Wouldn't be good to add Flip option to bitmap loader? Personally I would appreciate this tiny upgrade
« Last Edit: 2019-10-18, 12:34:27 by TatjanaO »

2019-10-18, 13:28:45
Reply #3

jms.lwly

  • Active Users
  • **
  • Posts: 171
    • View Profile
    • jms.lwly studio
I'm just in the habit of setting the U tiling to -1 on my environment maps - no need for an extra button.

2019-10-18, 13:29:34
Reply #4

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
And BTW: Theres no need to flip it in PhotoShop. You can just set the U tilling value to -1

Hope it helps

Edit: beated by jms.lwly :)

2019-10-18, 17:27:22
Reply #5

steyin

  • Active Users
  • **
  • Posts: 375
  • BALLS
    • View Profile
    • Instagram Page
Wait...so all maps you use as spherical environment are loaded backwards? Wouldn't that mean sun position is always wrong for HDRI? If true, never knew this at all.

2019-10-18, 19:20:23
Reply #6

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8898
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Not necessary, it's only wrong if you're using backplates from the same location. Otherwise it doesn't matter - sun's elevation remains the same, no matter if U coordinate is flipped or not and azimuth... well, 99 times out of 100, it is set arbitrary anyways :] I almost never flip HDRIs, unless i'm also using them as backdrops and they contain some text, signs or other things, which would look wrong when flipped.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2019-10-18, 19:34:03
Reply #7

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
@steyin: My answer would be YES, you're right. But like romullus says, it doesn't allways matter. Personally I always flip them, so I know whats going on :)

2019-10-18, 19:40:00
Reply #8

pokoy

  • Active Users
  • **
  • Posts: 1885
    • View Profile
I think the technical background is that an environment is projected from a distance towards the center while the camera takes an image from the center towards distance - that's why it's flipped.
I think some apps automatically flip panoramic images, Max does not.

2019-10-18, 19:43:48
Reply #9

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
Another way to explain it is, that a sphere by default (in Max) is mapped and viewed from the outside, whereas the environment is mapped as a sphere but viewed from the inside.

2019-10-18, 23:16:53
Reply #10

TatjanaO

  • Active Users
  • **
  • Posts: 6
    • View Profile
Another way to explain it is, that a sphere by default (in Max) is mapped and viewed from the outside, whereas the environment is mapped as a sphere but viewed from the inside.

Good point, yet in my case I am rendering "sphere" from the inside and then apply it on the environment also from the "inside" Mean camera see environment as physical sphere and flips it to outside in output?

2019-10-19, 00:14:11
Reply #11

PROH

  • Active Users
  • **
  • Posts: 1219
    • View Profile
You are rendering it as it is viewed from the inside, and then Max is "mapping" it from the outside. Therefore you need to flip it by setting the U tilling to -1.

Hope it helps

2019-10-19, 09:53:09
Reply #12

TatjanaO

  • Active Users
  • **
  • Posts: 6
    • View Profile
It will definitely help, thank you :) Going to ask Autodesk why do they map environment from outside :D it should be from inside by default!