PDA

View Full Version : Fix treatment of VMap Null values...



SplittingPixels
08-30-2003, 07:12 PM
One thing which I have noticed recently while using a weightmap to control a gradient that's used as an alpha channel...

It seems that if a quad/4-point-poly has WMap values assigned to some but not all of its vertices, shading errors occur. (ie, in a quad, 1 vertex is set to 100% while the remaining three have no value assigned.) Instead of shading from 100% smoothly to 0%, the null values cause the entire poly to be shaded as 0%/black. This creates strange rendering artifacts with any texture passing through the gradient alpha channel...

I believe the solution is as follows : if one or more points on a poly has a WMap value greater than or less than 0%, all adjacent points with null/unassigned values should be shaded as if they are at 0%. (Alternatively, you could actually assign 0% to these adjacent points automatically during WMap creation, however this would increase WMap size, and in turn the size of the object file.)