Hi Antonio, well your blue torus is full transparent so you can't see it ;-) tm1->setTransparency(0.0f); should do the trick.
Andreas > Scrive Matthias Stiller <[EMAIL PROTECTED]>: > >> Hello Toni, >> >> the MultiPassMaterial is dead simple. It just renders your geometry n >> times (n is the number of submaterials within the MultiPassMaterial). >> Whatever kind of blending you want to achieve is up to the parameters >> of that respective material. >> > > Hi Matthias, > > so I'll also have to take care of the depth buffer I guess > (first pass writes to z, for the others I switch z-comparison > to something like ">=" (?) > > A quick test on the testMultiPassMaterial.cpp changing: > > SimpleMaterialPtr tm1 = SimpleMaterial::create(); > beginEditCP(tm1); > tm1->setDiffuse( Color3f( 0,0,1 ) ); > tm1->setAmbient( Color3f( 0,0,1 ) ); > tm1->setTransparency(1.0); > endEditCP(tm1); > > SimpleMaterialPtr tm2 = SimpleMaterial::create(); > beginEditCP(tm2); > tm2->setDiffuse( Color3f( 1,0,0 ) ); > tm2->setAmbient( Color3f( 1,0,0 ) ); > tm2->setSpecular( Color3f( 0,0,0 ) ); > tm2->setTransparency(.5); > endEditCP(tm2); > > > I'd expect the blue torus shining through the red torus > somehow..... Instead I just see the transparent red torus. > > > Cheers, > > Toni > > >> On Monday 07 August 2006 11:07, [EMAIL PROTECTED] wrote: >>> Hi, >>> >>> I'm having a hard time understanding the MultiPassMaterial. >>> I was playing around with the testMultiPassMaterial.cpp but I don't >>> get the idea on how things are rendered. Anybody can explain what the >>> MultiPassMaterial dose? >>> >>> I'd like to solve this problem: >>> >>> I have two materials, let's say A and B. Both materials are shaders >>> (SHLChunks). I have a geometry on which material A is applied. Now I >>> want to apply material B on that geometry. But I want to do it FANCY, >>> I would like the material B to fade in and material A to fade out >>> smoothly. So I thought that MultiPassMaterial would do the job. Does >>> it? How? >>> >>> Thank you and regards, >>> >>> >>> Toni >>> >>> >>> >>> >>> ---------------------------------------------------------------- >>> This message was sent using IMP, the Internet Messaging Program. >>> >>> --------------------------------------------------------------------- >>> ---- Take Surveys. Earn Cash. Influence the Future of IT >>> Join SourceForge.net's Techsay panel and you'll get the chance to >>> share your opinions on IT & business topics through brief surveys -- >>> and earn cash >>> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DE >>> VDEV _______________________________________________ >>> Opensg-users mailing list >>> [email protected] >>> https://lists.sourceforge.net/lists/listinfo/opensg-users >> -- >> +---------------------+----------------------------+ >> | VREC GmbH | | >> | Matthias Stiller | | >> | Robert-Bosch-Str. 7 | tel: +49 6151 4921034 | >> | 64293 Darmstadt | web: http://www.vrec.de | >> | Germany | mail: [EMAIL PROTECTED] | >> +---------------------+----------------------------+ >> >> ------------------------------------------------------------------------- >> Take Surveys. Earn Cash. Influence the Future of IT >> Join SourceForge.net's Techsay panel and you'll get the chance to share your >> opinions on IT & business topics through brief surveys -- and earn cash >> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV >> _______________________________________________ >> Opensg-users mailing list >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/opensg-users >> >> > > > > > ---------------------------------------------------------------- > This message was sent using IMP, the Internet Messaging Program. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Opensg-users mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/opensg-users > > ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
