Thursday, January 29, 2015

Making Blurry Texture Crisp in 3ds Max

It is common to get blurry bitmap texture in renders, especially if the geometry is almost perpendicular to the camera line of sight (i.e. at glancing angle). Here is a render for illustration. Observe how the lines between tiles are blurred.

While reading the book "Architectural Rendering with 3ds Max and V-Ray", I learned about the filtering option "Summed Area" for Bitmap map under "Bitmap Parameters" rollout. Here is where the option is in Material Editor:
By default, the filtering method is "Pyramidal."
If you are wondering what image filtering is about, you can read the Wikipedia article on Mipmap. Basically a texture image needs to be filtered so that the rendered texture is anti-aliased.
Here is a comparison between the 2 methods.
Observe that the white lines between tiles are now crisp and nice.

... Too nice, in my opinion, that I wondered if there was a further story to this option.
According to Autodesk, both methods take approximately the same render time, but "Summed Area" method needs much more memory:
  • "Pyramidal" needs around 133% of the size of the bitmap;
  • "Summed Area" needs around 400% of the size of the bitmap.
This means that "Summed Area" method should be used sparingly. My own take at the moment is to use this for Diffuse maps of geometries, especially those at glancing angles to the camera such as ground, floor, et cetera. Perhaps Bump maps need "Summed Area" filtering depending on geometry and lighting. Specular maps should not need it.

Mental Ray used to not support "Summed Area" method, as was discussed in this CGTalk forum thread. However, I tested this and found that Mental Ray in 3ds Max 2011 supports "Summed Area" method.

Finally, there is an alternative method described by Neil Blevins.

I admit that the title of this post is rather bombastic. Apologies.

Wednesday, January 21, 2015

Mazda RX-8 Compositing

Mazda RX-8 compositing

The VFX class I am teaching is currently in the topic of Lighting, Rendering, & Compositing. One student, Suresh Kalai, suggested using a new car model for the class exercise. It is a Mazda RX-8 2004. Here is the starting render.
Initial render using materials that come with the model

I spent half a day fiddling with the new model (a messy business because all geometries are separate), working on the shaders, lighting, and rendering. Here is a work-in-progress render.
WIP render after half a day
As always, the 80/20 Rule happens. I spent the next 2 class days fiddling with the materials (while the students are working on their files) until I am happy with the final product above.

Mazda RX-8 model courtesy of archibase.net.
Back plate and HDRI sky courtesy of HDRI-Hub.com.

Thursday, January 15, 2015

Bruce Willis Roundtable

I have to admit this post is a bit of embarrassment. This roundtable video is a continuation of my past work I posted here in my personal blog.


Bruce Willis Bust from Denny Iskandar on Vimeo.

I needed "only" 2 years to finish rendering this roundtable. However, while working on this roundtable, I found that I did learn a few things since then:
  • I put the camera too close to the subject, causing big perspective distortion on the face.
  • The (relatively) bright background interfered with the lighting.
  • The Sub-Surface Scattering shader setting that I used was rather harsh.
I thought I made the roundtable better with respect to these factors. What do you think?

Thursday, January 1, 2015

Reflection on Batman Tumbler - Part 3: Checking Angles

This is the final part of a material walkthrough for Batman Tumbler model. I explained the problem in Part 1 as well as offered a partial solution. Part 2 followed up with map manipulations to improve the render.

At the end of Part 2, I got this render.
Figure 1. Render at the end of Part 2.

It looks pretty good: the metal parts have reflection and dirt details at the front part can be seen. Now it is time to check renders of other frames.

The roundtable animation has 120 frames. At this stage, I do not want to render every frame yet. Instead, I rendered every 30 frame to get four different angles of the Tumbler.
Figure 2. The rendered four angles

Looking at the 2 back angles, I found the back wheels looked too "painted" due to the Diffuse map. To reduce the painted feel, I composited Noise maps on top of the Diffuse bitmap. As figure 3 shows, I used 2 Noise maps to break the regular look of the Noise maps.
Figure 3. Composite map to reduce the painted feel of wheel diffuse

For consistency, I made the same modification to the front wheel Diffuse map. Here are the final renders. (On hindsight, the front wheels look too new in these renders.)
Figure 4. Four angles of the final render
I turned on Final Gather to make the shadow areas brighter when rendering the final video. I made further minor parameter tweaks that made the final video look slightly different from the renders above.
Here are two points about Arch & Design that I learned from this test:
  • Setting Reflection Glossiness very low will result in dark or even black reflections.
  • Reflection Color should be close to white.
I hope you find this walkthrough useful.

Credit: The Tumbler model and textures were created by Henry Chan. 

Thursday, December 18, 2014

Breakdown Example

This week I finished a breakdown example for my class. I wanted to convince my students that working on breakdowns can be as exciting as working on the effect itself.

Here is the video:

Wednesday, December 10, 2014

Reflection on Batman Tumbler - Part 2: Reflection Color

In the previous post, we saw how I got back reflections and hit another problem with bump effect as shown here.
Figure 1. The last render we covered. Notice the bump effect problem on the metal piece near the back wheel.
There is a metal piece near the back wheel that should be smooth but looks bumpy. I checked the Bump map slots and found that the Bump map slot was assigned an incorrect bitmap. Easy to fix. Other than that, I felt the bump was too strong, so I reduced the bump amount from the default 0.3 to 0.15. I got this render.
Figure 2. Bump effect fix. Note that the metal piece near the back wheel now looks smooth.
At this point, the render looked fine and I could have stopped. However, I thought I should make use of the painted texture maps in some way. To begin, I assigned the Specular bitmap to the Reflection Color map slot.
Figure 3. The Specular bitmap
I know that reflection color for an Arch & Design material should be close to white. How do I make the Specular bitmap, which is rather black, close to white? I needed to cheat and I cheated in 2 steps.
First, I forced the image to be interpreted as if it had gamma value of 1.0 even though it actually had sRGB gamma (which is approximately gamma 2.2).
Figure 4. Forcing gamma 1.0 interpretation
Next, I manipulated the Output Curve of the bitmap to make it even closer to white.
Figure 5. Manipulating bitmap Output Curve
Here is a comparison to show what these steps do.
Figure 6. Specular bitmap comparison. 1: original image; 2: forcing gamma 1.0 interpretation; 3: manipulating Output Curve

With these manipulations, I got this render.
Figure 7. Render with manipulated Specular bitmap
Note that I got back the dirt details painted in the Specular bitmap. However, I found the reflection color of the dirt too dark. I know that the Diffuse bitmap has color for dirt areas, so I made another cheat: I added the Diffuse map, interpreted as having gamma 1.0, to the Specular bitmap. I used a Composite map to do this. Here is my setup.
Figure 8. Adding Diffuse bitmap to Specular bitmap
And here is the render that I got.

Figure 9. Render with Diffuse map added to reflection color

Now it is time to check the render from other angles.We will cover this in the next post.

Credit: The Tumbler model and textures were created by Henry Chan.

Friday, December 5, 2014

Reflection on Batman Tumbler - Part 1: Getting Back Reflection

Last week I did a quick Arch & Design shader test for my class. Here is the result:


First, a proper credit. The Tumbler model and textures were created by Henry Chan, a modeling student here at CG Protege.

The reason I carried out the test out was that Julien Lew, a student in the Visual Effects class I am teaching, used the model in his assignment. He worked on the shaders and could not get reflections on the model. In this post, I will share what I found.

Technical details are due. All the images were rendered using 3ds Max 2011, Mental Ray renderer. The shaders are Arch & Design.

I started off with this render.
Figure 1. Starting render. Note the lack of reflection on the body.
I used Mental Ray Daylight system and turned on the mr Photographic Exposure Control. I set Exposure Value (EV) to 10.0. To save effort of selecting a HDR map, I simply used mr Physical Sky map. I used a Photometric light for rim lighting and 8 photometric lights surrounding the Tumbler as fill lights. This way, I can get reasonably good-looking render without using Final Gather. Figure 2 shows my lighting setup.
Figure 2. Lighting setup
The first step in troubleshooting a complex shader is to understand its structure. Next, go through the structure to isolate the cause of the problem. Thanks to Julien's work, we isolated the cause of lack of reflections to the material called "Grey" assigned to the Tumbler body.
Figure 3. "Grey" material

The Reflection Glossiness map slot (highlighted in figure 3) caught my eye. Inspecting the bitmap used as glossiness map, I found that it was very dark.
Figure 4. Bitmap used as glossiness map
To verify, I rendered with the glossiness map disabled (in other words, Reflection Glossiness was constant at 0.5 throughout the surface).
Figure 5. Render with constant glossiness. Note the unnatural bumps on the metal piece near the back wheel.

Now I got reflections on the metal body. Problem solved.

However, another problem arose. One of the metal pieces near the back wheel had strange bumps (I expected it to be smooth). The next post will cover this.

Credit: The Tumbler model and textures were created by Henry Chan.