|
From: Jose' C. <cru...@ce...> - 2004-06-04 07:51:49
|
On Jun 4, 2004, at 9:25 AM, Frank C wrote: > On 2-Jun-04, at 2:15 PM, Joseph J. Strout wrote: > >> 2. Color/alpha modulation on textured geometry. > > Hmmm... There's a "TEMPORARY FIX" in ir_geom_trimesh_initialise that > removes colour and transparency information from all trimeshes - > specifically it notes: > > // If we are using a texture, pretend the vertices are opaque white. > // This is to make it so that a textured TriMesh is affected by > lighting, > // but not by the color of the geometry. > > Now the question is; what is this supposed to fix? If this code is > removed, colour and transparency blends with textures (as they do in > the tribuffer path) which is a desirable effect IMHO... > >> QD3D does this when using the null shader; we should probably do the >> same (and perhaps consider an object property later that extends this >> behavior to phong/lambert-shaded objects). > > Removing the "fix" above results in opposite behaviour to QD3D however > - lit objects modulate colours, unlit objects don't - but this is due > by the rather lazy way Quesa "disables" lighting on objects affected > by null shaders. i.e. it doesn't, but instead uses the GL_REPLACE > blend mode. > > So what should be done here? This bug can basically be resolved by > removing the "TEMPORARY FIX", but it won't match QD3D's behaviour - or > - it can be left as is, and actually disable lights when rendering > objects with a null shader while still modulating colours to match > QD3D. The tribuffer path would need a similar fix to fully comply in > this case. > > Personally I'd like to see colours modulated _all_ the time - QD3D be > damned! ;) > > Frank. > > In our application we calculate the mean color for a given texture and submit it as diffuse color of the object. so blending it will broke us (and every 3DMF we saved in the past years) Why we do that way? older versions of Art*lantis will divide objects by color, so in this way we could talk properly with it. we have a vector hidden-line renderer that uses it to color the polygons so it's just another use for the brand new Get/SetProperty API Pax et Bonum # dott. Jose' Cruanyes Aguilar - C.E. Soft srl # Pzza. Firenze,4 MILANO - XX Settembre 10, CREMONA # 02,33603122 0372,460602 |