Hi Zach,
I'm still trying to figure out how to automate this process since having our modelers find each instance of these cases in all of our databases would be very costly.
Roberts first trick:
Use a AlphaFunc setting that rejects all alpha values below 1.0.
Try to add this line to your code. The node variable is the root node of your model. I think this should work because the (new) OpenFlight loader doesn't set AlphaFunc. node->getOrCreateStateSet()->setAttribute( new osg::AlphaFunc(osg::AlphaFunc::GEQUAL,0.9f) ); Regards, Brede On 3/1/07, Zach Deedler <[EMAIL PROTECTED]> wrote:
Thanks a lot Brede. I've attached the flt file if anyone is interested (I haven't fixed it yet). I'm still trying to figure out how to automate this process since having our modelers find each instance of these cases in all of our databases would be very costly. It looks like if I turn blending off it is better also, but then I get a dark outline to the tree. Zach ________________________________ From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Brede Johansen Sent: Wednesday, February 28, 2007 14:20 To: osg users Subject: Re: [osg-users] Alpha priority Hi Zach, It's much easier to experiment with .osg files so I converted the model. I couldn't extract the texture from the ive so I had to grab a screenshot from osgviewer and add an alpha channel manually. Your model used linear filter, I changed this to near in the attached model. Creator saves filter modes in the attr files so make sure it's present and set correctly. Regards, Brede On 2/28/07, Zach Deedler <[EMAIL PROTECTED]> wrote: > > > Hi Robert, > > Just modifying the texture to have 0 or 1 alpha values didn't work. > > Also, I looked at this same tree using VTree (a graphics API), and it doesn't have the same problem. This is weird because Multigen Creator does show the problem. So, somehow VTree is doing what we want to do, without being given any extra information. I know it doesn't just reject alpha values between 0 and 1 because we have other objects that have alpha values between 0 and 1 show up just fine (vehicles). > > VTree: > > > > I can try changing AlphaFunc, but how can I detect that I want to do this for only my trees, as VTree does? Anybody know? > > Thanks. > > > Zach > > _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
_______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
