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 ;)

xsi_ui.jpg (702927 bytes)
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!
Dave.