Re: [Flightgear-devel] Alpha sorting again
Thanx Erik! glDepthMask solve this problem - Original Message - From: Erik Hofman [EMAIL PROTECTED] To: FlightGear developers discussions [EMAIL PROTECTED] Sent: Friday, October 03, 2003 4:38 PM Subject: Re: [Flightgear-devel] Alpha sorting again Roman Grigoriev wrote: Hi guys! I implement smokes and missile trails on flightgear and come across to following problem: ALPHA sorting could you please describe me why we have this problem? so here is two screenshots one from plib viewer http://fgfs.narod.ru/snap2.jpg and one from flightgear. http://fgfs.narod.ru/snap1.jpg Maybe I should adjust state? Probably, try setting glDepthMask(GL_FALSE) just prior to drwing the trails and set glDepthMask(GL_TRUE) when finished. This might work, but is not guaranteed. Otherwise you have to sort the objects based on distance to the viewer before drawing them. This could be done by applying this patch to plib: http://www.a1.nl/~ehofman/fgfs/download/Plib_ssgDList2-20020718.diff Erik ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
[Flightgear-devel] Alpha sorting again
Hi guys! I implement smokes and missile trails on flightgear and come across to following problem: ALPHA sorting could you please describe me why we have this problem? so here is two screenshots one from plib viewer http://fgfs.narod.ru/snap2.jpg and one from flightgear. http://fgfs.narod.ru/snap1.jpg Maybe I should adjust state? What should I do? Thanx in advance Bye Roman ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Alpha sorting again
Roman Grigoriev wrote: Hi guys! I implement smokes and missile trails on flightgear and come across to following problem: ALPHA sorting could you please describe me why we have this problem? so here is two screenshots one from plib viewer http://fgfs.narod.ru/snap2.jpg and one from flightgear. http://fgfs.narod.ru/snap1.jpg Maybe I should adjust state? Probably, try setting glDepthMask(GL_FALSE) just prior to drwing the trails and set glDepthMask(GL_TRUE) when finished. This might work, but is not guaranteed. Otherwise you have to sort the objects based on distance to the viewer before drawing them. This could be done by applying this patch to plib: http://www.a1.nl/~ehofman/fgfs/download/Plib_ssgDList2-20020718.diff Erik ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel
Re: [Flightgear-devel] Alpha sorting again
Roman Grigoriev writes: Hi guys! I implement smokes and missile trails on flightgear and come across to following problem: ALPHA sorting could you please describe me why we have this problem? so here is two screenshots one from plib viewer http://fgfs.narod.ru/snap2.jpg and one from flightgear. http://fgfs.narod.ru/snap1.jpg Maybe I should adjust state? What should I do? Thanx in advance I'm not sure if this is helpful or not, but as you probably know, to correctly render a scene in opengl, you need to first draw all the opaque objects, then draw all the objects with transparency (depth sorted from furthest to closest.) Plib does a very crude alpha sort and separates out the opaque and transparent objects, then draws the transparent objects last. However, it does *not* depth sort them. An a patch was submitted to the plib devel team, but it got flat out rejected. :-( But, most likely you problem is happening because the translucent objects aren't being depth sorted and rendered back to front. Regards, Curt. -- Curtis Olson HumanFIRST Program FlightGear Project Twin Citiescurt 'at' me.umn.edu curt 'at' flightgear.org Minnesota http://www.menet.umn.edu/~curt http://www.flightgear.org ___ Flightgear-devel mailing list [EMAIL PROTECTED] http://mail.flightgear.org/mailman/listinfo/flightgear-devel