Cubic Enviroment Map

XSI Tutorial
Cubic Environment Map
by Dave Lajoie
davelaj@videotron.ca
davelaj@softimage.com

XSI offers two type of cubic reflection map. First one is to use a singe image and the other one is to use six separate images.
For Cubic6 environment map, it is pretty straight forward to use, but requires to manage 6 different images.
For the Cubic1, all the 6 images needs to be baked into a single image.

Here is how to layout Cubic1 type image map:

Standard cubic1 env map layout used in Renderman:

cubic_template.jpg (55253 bytes)
Click for a larger image

XSI cubic1 env map:

cubic_template_xsi.jpg (122535 bytes)
Click for a larger image

As a demonstration of the result, here is a screen shot of V1.5 used on a reflective sphere using cubic1 xsi environment map:

xsi_cubic_example.jpg (304142 bytes)
Click for a larger image

Here is a reflection map taken from Debevec's personal web pages.
if you move the front/back/left/etc parts in the required xsi cubic env map layout, you will get a perfect reflection map.
Here is the edited reflection map

Click for a larger image
and the result:

stpauls_cubic_xsi.jpg (300612 bytes)
Click for a larger image

At this point, pretty sure you have this question for me ;)

Why is mental ray doesn't layout the cubic mapping the same way as Renderman?
Even if the image has large black areas, which causes inefficient memory usage, Renderman never loads the images in memory, but rather image bucket ( tiles ).
Where mental ray will load it entirely in memory, so the Mental Ray environment cubic map layout is better since it requires less memory.
Unless you use MR memory mapped textures. in this case, Mental Ray will only load needed texture scanlines..
Btw, there is nothing that prevents Mental ray to support the Renderman style cubic map, it is just a matter of writting a shader for it ;)

Enjoy!
Dave

by 모리아티 | 2007/03/17 23:13 | 교육용문서(Tutorials) | 트랙백

Elliptical Filtering ( mipmapping )

XSI Tutorial
Elliptical Filtering ( mipmapping )
by Dave Lajoie
davelaj@videotron.ca
davelaj@softimage.com

In SI3D and XSI V1.0, no shader took advantage of mental ray elliptical filtering.
The image lookup shader was only standard doing point sample with some basic interpolation.
If the user were to repeats texture pattern over large surfaces, artefacts and texture flickering would occur at render time.
There is several ways to fix this. The first one is to increase the antialiasing settings to better sample the texture.
The problem with this solution is the overall scene will get oversampled, when in fact it would be needed for only few surfaces and this will directly increase the rendering time.
If motion blur and raytracing are enable and Antialiasing is increased, there very good chances that rendering times increase significantly.
The other solution to add Antialiasing Filtering (Triangle/Gaussian). This will solve some of the texture artefacts, but not all of it.
Again, increasing the antialiasing filtering is applied to the entire image and tends to make the image more blurry.
So the perfect solution would be to apply filtering to only the specified object only ( namely texture maps )
In Mental Ray, this is called Elliptical Filtering. Now this feature is exposed in XSI V1.5.

With the new image node shader in XSI V1.5, the user will be able to prefilter the image ( pyramid filter, or so called mipmap).
Two components are required to filter a texture map.
a) enable multi-resolution in the Image Clip, Properties tab, Multi Resolution Texture Group.
b) need to have a shader that can do filtered image lookup. Luckly XSI V1.5 Image node shader has those new parameters ;)


Click for a larger image

Note: The default value for elliptical parameters are set properly in the XSI V1.5 image node

Rendering stats
Here is some rendering stats that I have made with the new shader

Machine: NT Dual PII 266, 256Mb
Image Resolution: NTSC
Scene Setup: a simple grid, phong shaded, with diffused textured with a checkboard image.

A) Not filtered image, AntiAliasing: -2 0: time 27 Sec

B) Not filtered image, AntiAliasing: 0 2: time 3 Minutes 8sec


C) filtered image, AntiAliasing: -2 0: time 1 Minute

Image Differences of the rendered images
For this, I have used diffpic -i to compare the difference between the intensity of the rendered images.

     

27sec vs 1Min                                      /    same one but a little bit more contrasted

     
27sec vs 3min8sec                               /     same one but a little bit more constrasted

     
1min vs 3min8sec                                 /    same one but a little bit more constrated

Conclusion:
You will be able to render the same quality as the 3min8sec render, and keep the rendering time around 1Min, without increasing the Antialiasing to 0 2

Enjoy!

by 모리아티 | 2007/03/17 22:51 | 트랙백

◀ 이전 페이지 다음 페이지 ▶