PDA

View Full Version : maya cubemap generation?


royterr
11-17-2011, 11:51 AM
how can i generate a cubemap or a latlong map of my room in maya? (using mental ray)

wizlon
11-17-2011, 12:40 PM
Try this page...

http://www.andrewhazelden.com/blog/2010/11/cubemap-lens-shader-compiled-for-mental-ray-for-maya-2011-on-mac-os-x/

http://www.andrewhazelden.com/blog/2011/01/latlong_lens-and-cubemap_lens-mental-ray-shaders-compiled-for-maya-2011-x64-on-windows/

kiryha
11-17-2011, 02:07 PM
6 cameras with 90 degree FOV(aperture=film aspect=1). Render. Stich with SphericalTransform node in nuke.

royterr
11-17-2011, 02:18 PM
Try this page...

http://www.andrewhazelden.com/blog/2010/11/cubemap-lens-shader-compiled-for-mental-ray-for-maya-2011-on-mac-os-x/

http://www.andrewhazelden.com/blog/2011/01/latlong_lens-and-cubemap_lens-mental-ray-shaders-compiled-for-maya-2011-x64-on-windows/

great tool, any 2012 version?

6 cameras with 90 degree FOV(aperture=film aspect=1). Render. Stich with SphericalTransform node in nuke.

and how do u exactly place the cameras in relation to the scene and to each other?

kiryha
11-17-2011, 02:30 PM
You place cameras at same point looking to all directions: top, bottom, left, right, front, side. Group them and move this group to point, from wich you wish to get HDRI shoot, like it is mirror ball and photografer :)
Make all cameras rendereble and during batch render of single frame you will get 6 images of your scene. As an option you can easy stich them in Photoshop as cubic map and then convert to LL with HDR shop.
Advantage of this method- its native, easy and extreeme predictable.

igi
11-21-2011, 10:08 AM
great tool, any 2012 version?

It works fine in 2012 (windows)

cgbeige
11-22-2011, 05:23 PM
here - I made a Maya scene template with the 6-camera setup for UDK, if anyone's interested:

http://polygonspixelsandpaint.tumblr.com/post/13164029923

molgamus
11-23-2011, 02:16 PM
Quick MEL to make a cube map setup.
Group the cameras or parent them to a locator to move it.

//Z-axis cameras
for ($i=0; $i<2; $i++)
{
string $cubeCamera[] = `camera -focalLength 12.7 -horizontalFilmAperture 1 -verticalFilmAperture 1 -name "cubeCam_001"`;
float $rotation = (180 * $i);
string $expString = ( $cubeCamera[0] + ".rotateY = " + $rotation +";" );
expression -s $expString -name ( $cubeCamera[0] + "_EXP" );
select ( $cubeCamera[0] + "_EXP" );
delete;
}
//X-axis cameras
for ($i=0; $i<2; $i++)
{
string $cubeCamera[] = `camera -focalLength 12.7 -horizontalFilmAperture 1 -verticalFilmAperture 1 -name "cubeCam_001"`;
float $rotation = ((180 * $i)-90);
string $expString = ( $cubeCamera[0] + ".rotateY = " + $rotation +";" );
expression -s $expString -name ( $cubeCamera[0] + "_EXP" );
select ( $cubeCamera[0] + "_EXP" );
delete;
}
//Y-axis cameras
for ($i=0; $i<2; $i++)
{
string $cubeCamera[] = `camera -focalLength 12.7 -horizontalFilmAperture 1 -verticalFilmAperture 1 -name "cubeCam_001"`;
float $rotation = ((180 * $i)+90);
string $expString = ( $cubeCamera[0] + ".rotateX = " + $rotation +";" );
expression -s $expString -name ( $cubeCamera[0] + "_EXP" );
select ( $cubeCamera[0] + "_EXP" );
delete;
}

By rendering them from the command line you can specify the cameras and the resolution and render them as a batch.
render -r -mr -cam cubeCam_001 -x 1024 -y 1024 myMayaFile.mb
render -r -mr -cam cubeCam_002 -x 1024 -y 1024 myMayaFile.mb
render -r -mr -cam cubeCam_003 -x 1024 -y 1024 myMayaFile.mb
render -r -mr -cam cubeCam_004 -x 1024 -y 1024 myMayaFile.mb
render -r -mr -cam cubeCam_005 -x 1024 -y 1024 myMayaFile.mb
render -r -mr -cam cubeCam_006 -x 1024 -y 1024 myMayaFile.mb

CGTalk Moderation
11-23-2011, 02:16 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.