Author Topic: Workaround for hemispherical rendering  (Read 15544 times)

2014-10-08, 20:52:46

borisquezadaa

  • Active Users
  • **
  • Posts: 614
    • View Profile
As Corona only have cilindrical and spherical for now i made this to bypass that limitation.

As guide a typical spherical image are something like this:


This kind of images Corona can handle but in the other hand
A hemispherical ligthprobe  is something like this:


This sadly... Corona can render yet.

But don't be afraid... we can do it in no time!... a great hemispherical ligthprobe image rendered in Corona (with some help).

JUST:

Render your scene using a CoronaCameraMod to obtain a 2:1 ratio image (twice the width as height)   and  save it in jpg, png (or hdri if you intend to correct it later).

Load that image as environment using VrayHdri map. Hide all your model and ligths and change renderer to Vray.

In Render Setup (F10)-> Vray-> Vray: Camera change camera type to Fish eye and check "autofit" dont forget to change your resolution to a Width=Height (1024x1024 by example) to obtain a fast 180° hemispherical panorama. (I think those are calle chromeballs).

This projections are used to ligth a sky domes or lighten a planetarium.

You can even take a step further and make an animation of it like some cool sky timelapses that hiperfocal design are showcasing.

As side note: if you render some hughe resolution, doing a full size render of the initial spherical panorama could can eat some RAM (and why to render some you dont need) a workaround for that would be using render región (available in VFB Settings, just change native Corona VFB to native 3DSMax and set a proper area of interest). This way you select the area of interest and render it and not the whole image.
Another posibility if your RAM is scarce  coul be using the same aproach of Render region but this time render a lot of small parts of the image to compose later in some image stitchin sowtware.

Hope this helps.

Resume:
Render a spherical 2:1 pano in Corona with CoronaCameraMod
Load the result as VrayHDRI
Hide absolutely all and  render with Vray fisheye camera type override (autofit).

And that's it... an awesome great fisheye render of your scene using Corona with a little help.

Note 1: A better way to do it is using the VrayDomeCamera with FOV=180. That produces a less distorted image.

« Last Edit: 2014-10-08, 23:37:12 by borisquezadaa »
What i do with Corona My Corona post of random stuff rendering
WARNING: English.dll still loading...

2014-10-08, 21:12:12
Reply #1

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Actually, the second picture is not a hemispherical panorama ;) . It's a Light probe and just another way of storing the full 360*180° info in a square image. You still have the full sphere not a hemisphere.
But instead of rendering things out, you can do all kinds of panoramic transformations in most hdr specific programs (I'm still using the good old Hdr shop)

Any sufficiently advanced bug is indistinguishable from a feature.

2014-10-08, 21:28:31
Reply #2

borisquezadaa

  • Active Users
  • **
  • Posts: 614
    • View Profile
My mistake but i'm kind of miss here. It seems they differe in the way we put the "camera" being totally upwards for hemisferical and "horizontal" to ligth probes like those chromeballs used to ligth match locations?...

Romullus mentiones Hugin (free open source) to work with panos.

And it seems they distorted the image a little un the borders?...


« Last Edit: 2014-10-08, 21:32:19 by borisquezadaa »
What i do with Corona My Corona post of random stuff rendering
WARNING: English.dll still loading...

2014-10-08, 22:06:00
Reply #3

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Lightprobes(or better angular maps) , mirrored ball,  latitude/longitude or cube maps are all just different ways to represent spherical panoramas.
While Mirrored ball images are just a "bad" input format, due to the way they are made, the other formats represent a way to store the date with less distortions or better distribution of the resolution.

Mirrored Ball is bad because the borders are extremely distorted and cannot represent data in a useful way (actually, ideally there's always two mirrored ball hdris combined to 1 angular map or latitude/longitude)

Angular maps are a lot better for storing because data is represented with less distortions


All in all, it's always the same data just stored in a different format with different pros and cons.
Any sufficiently advanced bug is indistinguishable from a feature.

2014-10-08, 23:30:01
Reply #4

borisquezadaa

  • Active Users
  • **
  • Posts: 614
    • View Profile
Well thats very informative.
So the fisheye lens produces a ligth probe it seems, i made some render test.

Best way to do is to use the DomeCamera with FOV =180 produces a way less distorted angular map.

Half sphere is painted to better check if really is a 180° image or not.


« Last Edit: 2014-10-08, 23:38:36 by borisquezadaa »
What i do with Corona My Corona post of random stuff rendering
WARNING: English.dll still loading...

2014-10-09, 07:38:43
Reply #5

lacilaci

  • Active Users
  • **
  • Posts: 749
    • View Profile
Lightprobes(or better angular maps) , mirrored ball,  latitude/longitude or cube maps are all just different ways to represent spherical panoramas.
While Mirrored ball images are just a "bad" input format, due to the way they are made, the other formats represent a way to store the date with less distortions or better distribution of the resolution.

Mirrored Ball is bad because the borders are extremely distorted and cannot represent data in a useful way (actually, ideally there's always two mirrored ball hdris combined to 1 angular map or latitude/longitude)

Angular maps are a lot better for storing because data is represented with less distortions


All in all, it's always the same data just stored in a different format with different pros and cons.


Great info.. Do you have any tips, on how to actually shoot hdri's as angular map (some tutorial maybe?)
I'd like to try making some hdri's of my own.

2014-10-09, 10:20:47
Reply #6

racoonart

  • Active Users
  • **
  • Posts: 1446
    • View Profile
    • racoon-artworks
Well, shooting mirrored Ball HDRIs is (imho) a thing of the past, I wouldn't recommend it. If you really want you can still find a lot of tutorials in the net about that but you'd also have to find a reaaaally good chrome ball (I actually never did, the quality was always kind of bad ;) ). I did that about 10 years ago and switched to a Fisheye method later which is so much better (but more expensive of course).
But if you just need a basic representation of lighting or want to do some experiments it might still be a valid method.
I only know the 10 yrs old tutorials for the first HDR shop version (which is unavailable today) so you have to look around what people are using today...
Any sufficiently advanced bug is indistinguishable from a feature.

2014-10-09, 12:12:51
Reply #7

lacilaci

  • Active Users
  • **
  • Posts: 749
    • View Profile
Thanks, I guess I'll look into both methods eventually.

2014-10-09, 22:09:04
Reply #8

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
There's no need to use vray to get hemispherical (stereographic) projection out of equirectangular (the one that Corona makes when spherical cam is on) really. Once you get your spherical (equirectangular) map rendered (cropped or not, it doesn't matter), you can load it in hugin, ptgui, autopano or other software that is capable to do projection convertions and simply choose output as stereographic projection with 180x180 FOV. This process is instantaneous.

I can provide more detailed instructions for ptgui if needed.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-10-10, 21:42:59
Reply #9

Marina

  • Users
  • *
  • Posts: 2
    • View Profile
I can provide more detailed instructions for ptgui if needed.
If it'll be not difficult for you.
Thanks!

2014-10-12, 12:07:08
Reply #10

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Here you go:


Also attaching mask for ptgui.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-10-12, 22:15:51
Reply #11

borisquezadaa

  • Active Users
  • **
  • Posts: 614
    • View Profile
Thank for the video Romullus.
About that... ptgui has batch edit capabilities... so it would be able  to make that transform on a series of images (like a photoshop action)?

Waiting for hemispherical cam in Corona.

What i do with Corona My Corona post of random stuff rendering
WARNING: English.dll still loading...

2014-10-12, 22:49:16
Reply #12

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8856
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Yes, it has batch as well as templates, so it's quite easy to highly automate whole process.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2014-10-14, 10:49:12
Reply #13

Marina

  • Users
  • *
  • Posts: 2
    • View Profile
Here you go:
Also attaching mask for ptgui.
Thanks! :)