RE: [Algorithms] object oriented scene graph traversal
Brought to you by:
vexxed72
|
From: Matthew M. <ma...@me...> - 2000-10-13 17:10:18
|
Isn't that kind of heavy-weight, retraversing a separate graph for each sort level? What I finally settled on -- and your input was extremely instrumental in this -- is to make render order and transformation dependency totally separate issues. I've got a little class called a transform composer that has a link to a single (local) transform and another link to another transform composer (the parent.) You attach the transform composer to an actor and query it when you need it. It walks up the chain and accumulates the necessary transforms. There's time-dependent caching to avoid re-multiplying matrices unnecessarily. Per your recommendation, all the transforms are referenced indirectly so that they may be instanced. The actor itself is composed of a renderable object and an array of attributes, which must be applied to the object before rendering, and any of which can "veto" the render or select a different render object. I'm considering renaming this a "prefix" or "prologue" object since what it really does is enforce a particular order to a protocol invocation, and could be used for render order in general. I'm trying to get away from the hierarchy because all my objects will be stored in an octree and I'll almost never render top-down, but still need an efficient way to compose the proper transforms. Seem sensible? I appreciate the input. -- Matt >-----Original Message----- >From: gda...@li... >[mailto:gda...@li...]On Behalf Of Doug >Chism >Sent: Tuesday, October 10, 2000 9:32 PM >To: gda...@li... >Subject: Re: [Algorithms] object oriented scene graph traversal > > > >> How do you apply rendering-order semantics? For example, if geometry A >needs >> to be rendered before geometry B because B is translucent, but they're >just >> in a list together, do you: >> - rely on list order? >> - sort at render time to account for translucency? >> - something else? > >How about 2 scene graphs, an opaque and a transparent, or even >multiple with >orders that can be defined by the user? That way you dont have to >go through >the entire scene graph twice ( or more ) to get the alphas ( and other >stuff ) to render in an order that you define. > >Doug Chism > >_______________________________________________ >GDAlgorithms-list mailing list >GDA...@li... >http://lists.sourceforge.net/mailman/listinfo/gdalgorithms-list > |