Hi Dirk, On Thu, 2004-02-12 at 15:14, Dirk Reiners wrote: > Hi Rasmus, > > On Thu, 2004-02-12 at 07:01, Rasmus Agerholm wrote: > > Hi, > > > > How can I control which geometry in the scene to render for each eye, > > given that I want to disable some geometry for left eye and some other > > for the right eye? > > > > We want to use some image based rendering (IBR) in an OpenSG app. A > > texture is created for each eye each frame. Each texture should then be > > mapped on the inside of a deform sphere. The sphere has the same shape > > for each eye and can thus be a shared Geometry core under different > > MaterialGroups. Am I right so far? Now, I need to disable the left > > sphere when rendering the right eye and vice versa. My thought was to > > put the two MaterialGroups under a switch node and then control the > > choice of the switch node depending on which eye is about to be drawn. > > But how do I find out which eye is about to be drawn? And, is there a > > better way to do this? > > given that you use a pretty recent version of the code, there actually > is. ;)
I do, but if it's not recent enough I will make it as recent as can be ;-) > You can use traversal masks. Each Node has a mask (accessible via > setTravMask(), getTravMask()), which kind of replaces the active flag. > In addition every Viewport also has a traversal mask (same calls). By > default both have all bits set. During rendering (actually for any > Action), when the binary AND of the Viewport's mask and the Node's mask > are 0, the Node and all its children are ignored. > > Given that left and right eye use separate viewports, this allows you to > do what you want. Thanks, that's exactly what we're looking for. > Hope it helps It will: It will get some stuff off of my back and onto somebody elses ;-) Thanks /Rasmus -- Rasmus Agerholm Research Assistant VR Media Lab (+45) 9635 8792 Niels Jernes Vej 14 DK-9220 Aalborg Phone: (+45) 9635 8784 Fax: (+45) 9815 2444 http://www.vrmedialab.dk/~rasta ------------------------------------------------------- SF.Net is sponsored by: Speed Start Your Linux Apps Now. Build and deploy apps & Web services for Linux with a free DVD software kit from IBM. Click Now! http://ads.osdn.com/?ad_id=1356&alloc_id=3438&op=click _______________________________________________ Opensg-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/opensg-users
