Showing posts with label error. Show all posts
Showing posts with label error. Show all posts

Wednesday, May 2, 2012

Do not scale the camera!


There are cases where you shouldn't scale the camera, otherwise you will get artifacts or poor performance.

Case 1:  When you use a mia_env_blur node  to provide with a blurry reflection to a mia material.


This is a highly reflective metal material. I use the mia_envBlur to apply the blurry reflection like the following.

  
And then I scale up the camera by 5 times.


You'll get this pinching point like artifact.
This time, I will scale the camera down by 5 times ( 0.2 ).


Another weird artifact.
So, don't scale up or down your camera when you use mia_envBlur for blurry reflections.
It doesn't matter how much. As soon as you begin changing the scale it will go bad.



Case2:  When you use Optimize for Animations FG mode with View option on.



This time, I use the FG to create this.


I use Optimize for Animation mode with View option on. It gives me a fairly even FG point distribution like below.


So far, so good. But if I scale up the camera, let's say by 10 times.
The FG brightness diminishes by around that much like below.



This has to do with the fact that the View mode uses the camera space to deal with FG points and density. You can compensate the brightness by scaling up the Min/Max pixel value by the same scaling factor that's applied to the camera.

That being said, I'd rather not use a scaled camera.
 

Wednesday, April 25, 2012

One weird normal map error.


I found this weird error when I was using a normal map in Maya.
If you attach more than one bump2d node to a single file node and use these bump2d nodes as a normal map, whether set to Tangent Space Normals or Object Space Normals, this will cause a problem.
The object's color doesn't show up and the surface normals get messed up.


 
Here I have a simple shader connection.  A blinn shader with one normal map input.
The render looks like this.


I  create a new shader and used the same file node as a normal map through a new bump2d node and assign this new shader to the right plane.