Mantis - Croquet
Viewing Issue Advanced Details
595 Jasmine minor always 12-03-04 21:04 12-11-04 19:43
elenzil  
 
normal  
resolved  
fixed  
none    
none  
0000595: alpha < 1 in ambientColor turns off zbuffer writing.
If a material's ambient color has alpha less than one,
z-buffer writing is turned off when the object is rendered.

However, as far as i can see,
the alpha component of the ambient color has no other effect on rendering.
ie, you can't actually affect the transparency of an object with ambient material.

It seems like ambient alpha should only turn off zbuffer writing
if it's actually going to render polygons transparent.

Also,
the default values for a material's ambient color are .5 .5 .5 .5,
which means that when you just make a new material and assign it to
an object, unless you set the ambient color to (r g b 1),
you will get weird zbufferless rendering of objects.

See attached screenshots.
 ambientalpha.png [^] (194,297 bytes) 12-03-04 21:04
 ambientalpha2.png [^] (166,290 bytes) 12-10-04 21:24
 FixAmbientAlpha.1.cs [^] (317 bytes) 12-10-04 21:24

Notes
(0000897)
elenzil   
12-10-04 21:25   
second snapshot and changeset with fix updloaded.
(0000900)
Croqueteer   
12-10-04 23:36   
Presume that fix logged at 645 resolves this issue.
(0000901)
elenzil   
12-11-04 00:16   
Howdy.
645 does work around this issue
by setting the default ambient alpha value to one,
but does not include the deeper (very simple) fix
which is in this changeset.
(0000907)
Croqueteer   
12-11-04 19:43   
I checked the OGL reference and Orion is correct. I also modified the default materials to OpenGL defaults. I did not modify the lights to the defaults, as these were simply too harsh.