Chaos Corona Forum

Chaos Corona for 3ds Max => [Max] I need help! => Topic started by: TatjanaO on 2019-10-18, 12:16:59

Title: Flipped environment map
Post by: TatjanaO on 2019-10-18, 12:16:59
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?
Title: Re: Flipped environment map
Post by: romullus on 2019-10-18, 12:22:38
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.
Title: Re: Flipped environment map
Post by: TatjanaO on 2019-10-18, 12:28:40
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
Title: Re: Flipped environment map
Post by: jms.lwly on 2019-10-18, 13:28:45
I'm just in the habit of setting the U tiling to -1 on my environment maps - no need for an extra button.
Title: Re: Flipped environment map
Post by: PROH on 2019-10-18, 13:29:34
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 :)
Title: Re: Flipped environment map
Post by: steyin on 2019-10-18, 17:27:22
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.
Title: Re: Flipped environment map
Post by: romullus on 2019-10-18, 19:20:23
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.
Title: Re: Flipped environment map
Post by: PROH on 2019-10-18, 19:34:03
@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 :)
Title: Re: Flipped environment map
Post by: pokoy on 2019-10-18, 19:40:00
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.
Title: Re: Flipped environment map
Post by: PROH on 2019-10-18, 19:43:48
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.
Title: Re: Flipped environment map
Post by: TatjanaO on 2019-10-18, 23:16:53
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?
Title: Re: Flipped environment map
Post by: PROH on 2019-10-19, 00:14:11
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
Title: Re: Flipped environment map
Post by: TatjanaO on 2019-10-19, 09:53:09
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!