Tuesday, May 1, 2012

lat-long style Environment map creation

Rendered using Vue xStream

E-on software's Vue is one good solution for the realistic natural environment creation. I do like the atmosphere and the sky it generates.

If you render the environment in Vue in lat-long style and use it for IBL in Maya, it can be a very efficient environment setup.  Vue provides with an option to export the sky in lat-long style but takes very long time to render since it only utilizes a single cpu thread for this particular task.

So, what I usually do is to create the sky in Maya using the xStream plug-in and render within Maya.
If a panoramic lens shader like latlong_lens shader is available, it will make your life a bit easier. But, if not, you can still render 6 images in cubemap style and transform them into a lat-long format.

Here's the result of the lat-long lens shader. It can directly create spherical type (lat-long) panoramic image from one single camera.

The only problem it has is this shader is not always available, especially for a newly released Maya.
If that is the case, you need to turn to the traditional cubemap method which requires 6 images-top, bottom, front, back, left and right.

You can use one camera and rotate it like above image or can use 6 cameras.
I prefer the latter. 

Here's my camera rig. Note that the naming convention has to be like that.

Each camera must cover exact 90 degrees of field of view in square frame.

Here's the render settings.

 Don't forget to set the framebuffer to 32bit float.

Now, batch render it.

I will stitch these 6 images into one cross-type cubic environment map.
To do this, I use an application called "cube2cross.exe". This takes 6 hdr format images to generate one big cross type hdr map.

I load this in HDRshop.

Using the settings above, I transform the cross type map into lat-long type env map.

This transformed result is basically identical to the one that's rendered through the lat-long lens shader.
Both methods take advantage of using full cpu threads.

The hdr image is now loaded in Maya's IBL. Now it takes virtually no time to render the environment.

No comments:

Post a Comment