Cubemap Creation in XSI

First, understand that because of the way cubemaps work in SWBF2 you will never get a perfect cubemapping reflection unless you are working with a sphere. SO with that being said you should never waste too much time trying to make it perfect. just make it good enough for whatever you are designing.

so first we need to create a new perspective camera by going to model > primitive > camera > perspective.

next when the camera creation window pops up, first set the format to custom (red box), then set your picture ration to 1 (green box), under field of veiw set your camera angle to 90 (blue box).

at This point you should make sure you camera root for the camera you just created is at ZERO position (translation X:0, Y:0, Z:0) you can see in the image above the default creation is X0, Y2, Z20.

next for camera interest, set it to Z-5 and everything else to 0, this will allow our camera to face perfectly straight along the Z- axis.

usually I rename my cameras at this point to whatever plane they face towards sine this is my Z- axis camera I name it accordingly, this is more for organization and ease of understanding which pictures go where.

Next, branch select the camera root for the Z- camera, and duplicate it (ctrl +d) with the newly duplicated camera rotate the camera root for it 90 degress along the Y axis, this should make the new camera face along to X- axis. above is how my scene looks with the new camera named accordingly.

repeat this process another 2 times, rotating an additional 90 degrees along the Y axis until you have 4 cameras in a cross as seens above. assuming you started with the Z- Camera your duplications will be (clockwise 90 degrees) Z-, X-, Z+, X+ axis.

next duplicate you Z- camera 2 more times and this time rotate one of the cameras 90 degrees (this will be your y+ camera) and the other -90 (or 270) degrees this is you Y- camera. at this point make sure you drag all 6 camera roots into a new null (model > primitive > null) this is so we can use the null later to drag all 6 cameras easily (i named my null here cubemap_root).

next we want to set up an ambient lighting rig (this can be accomplished with a point light but unless you materials have the ambient slot or are lambert materials using 6 infinite lights will be faster than redoing all your existing materials) so first in your explorer view, branch select your light created by the default scene and either hide it (youll have to hit H twice in most cases if its never been modified before) or delete it all together.

next create a new infinite light by going to Model > primitive > light > infinite.

when the above window opens make sure under Light contribution specular is left unchecked (for cubemapping we usually dont want this)

now following the same steps we did with the camera creation branch select the light and duplicate it rotating it 90 degrees along the Y axis 3 times until you get the cross shape above.

and then duplicate the light two more times and rotate 1 of them 90 degrees along the x axis and the other -90 (or 270) along the x axis to get the shape above.

now with the cubemap root selected (the null we created) simply drag it and translate it until its centred to where you want your cubemap to bake from.

next go to render > render > pass options

with the pass options open, first make sure override scene options is checked. under format (green box) set it to custom. Next unlock your aspect ration (box should be uncheck, this is highlighted in orange), Set your aspect Ratio and Pixel Ratio both to 1, Set your width and height to be square and a power of two (i always like to do 512×512 and downscale later), this is all highlighted in the blue box. Finally Select which camera to use ( I always like to start Z- and work my way around the same way it was created).

Next go Render > preview.

after your image is finished rendering click save and original size and save your image. After this go back into your pass options and select a different camera (i usually go x- camera second) repeat this process and render and image from all 6 cameras.

once all 6 cameras are finished rendering simply open all 6 images in your favourite image editor and stitch the images together to form your newly baked cubemap.

Leave a comment