July 30, 2010

Maya - Create a Cubemap

This is inspired from my participation on a recent Polycount thread.

Its pretty straight forward to make your own cubemaps from Maya, you just need 6 cameras rotated around a shared point. The cameras each render out a square image representing one of each side of the cube. You can easily stitch these images together using an interactive program like ATI's CubeMapGen for realtime use, or build out a cube-cross in Photoshop. You just have to take care as to the placement and rotation of the images in the stitch.

There is one trick to this in Maya; although its pretty intuitive to set the Angle of View of the cameras to 90 degrees, you also have to set the Camera Aperture x and y to 1.0.

You are not restricted to staying in the cubemap format either, just run the result through HDRShop and you can convert to a variety of other formats like latlong and angular probe.

Here is a test image from CubeMapGen showing that the cubemap is seamless (some minor blurring in the reflection of the sphere is actually due to the realtime shader in the viewport and not sampling issues in the textures).

cubemapgen

Download Test Scene (Z axis are inverted compared to Maya because thats what CubeMapGen expects)

No comments:

Post a Comment