|
Hi, I posted a message a few weeks ago, at that time I was not able to test, now I am. So my problem is : I have draw many virtual objects in my scene. But one is particular. I constructed its geometry in a normal way. And now I would like to use its geometry to update the depth buffer without drawing in the ColorBuffer. So that if I first update this Z-Buffer, then when I'll draw the others objects, if they are behind this object they would not appear. For instance if I have black background, a blue plane parrallel to the projection plane and my object in front of the plane (but without seeing the object) , I want that it's silouette appear in black (the background) on the plane, that the part of the plane who is supposed to be behind the object is not drawn. For now my object is drawn, so virtual objects are occluded. geo is the GeometryPtr of my object, I use a classical material : plainMat = SimpleMaterial::create();Last time Antonio proposed : You can use a ColorMaskChunk in order to disable the You have to add this chunk to the material associated to So I tried like this : SimpleMaterialPtr occluderMat = SimpleMaterial::create();But it don't work. My object is not visible, it's ok, but it doesn't occlude the object behind him (the plane is totally blue, as if my object was not here). I'm I using corectly the ColorMaskChunk? Dirk proposed : If you have it as an image you can draw that instead of the geometry.Could you be a little more precise? :) I don't know where to start.... Thanks a lot Regards Adrien |
------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/
_______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
