[prev] Texture Maps: 4: Max Error [next]

[no zoom]
Figure 117. Setting Max Error

Enter into the Max Error field the maximum error that you expect between the patch and the polymesh. Its important to get the maximum error as low as you can, especially when saving 8 bit TIFF and SGI maps, to accurately store the displacement values. However, if the maximum error is too low, then you will lose detail because displacement values will overflow the max error value.

[click to zoom]
Figure 118. Optimal Max Error

The ideal to aim for is a Max Error value that is equal to the actual maximum error between the patch and the polymesh. The image on the left of Figure 118 shows the mapped and rendered patch; the image on the right is the displacement map. In this example the displacement map contains a good range of black through to white pixels, with no overflowing.

[click to zoom]
Figure 119. Max Error Too Large

In Figure 119 the maximum error is too high, and so the displacement map is tending towards gray; the upper (i.e. white) and lower (i.e. black) pixel values aren't being fully utilized. If you look closely at the rendered patch, it looks rougher than the patch from the previous figure. This is because an 8-bit displacement map was used, and there is some stair stepping due to the lack of unique pixel/displacement values. This problem could be minimized if a 16-bit displacement map was used, which gives a much greater range of possible pixel values.

[click to zoom]
Figure 120. Max Error Too Small

In Figure 120 the maximum error is too low, and so the displacement map is overlowing; there are large areas of solid white and black. If you look at the rendered patch, you can see the flat spots caused by the real error values overflowing the Max Error value.

The easiest way to determine the Max Error value is to get CySlice to work it out for you. Click on the Max Error button, and CySlice will quickly calculate a small displacement map to work out what error is actually there, so it can set the Max Error for the full resolution map.

You shouldn't religiously use the calculated error value though. Due to a range of causes, CySlice won't always work out the ideal maximum error. For example, there might be a large error between the surface and the mesh in a hidden area, such as inside a mouth. You know better than CySlice that you don't really care about this part of the displacement map, so you can use a reduced maximum error. The final decision about an ideal Max Error should come after checking the calculated displacement maps; make sure there is a wide range of pixel values, from back to white.

The quickest way to set the Max Error value for all visible patches is to click on the All Err button, found towards the bottom of the Texture Maps panel. This will take a few moments, but when its complete you should click on the Sel Max button. The patch with the maximum Max Error will be selected, and you can check its value to see if its reasonable.

If you want all patches to have the same maximum error value, simply click on the All Max button. This can help with the writing of shaders, as you know that the displacement value for all patches will be the same.

[prev] [top] [next]