Re: Shapes and geometry

"Philippe C.D. Robert" <[email protected]> Tue, 9 Jul 2002 09:02:39 +0200
Newsgroups gmane.comp.gnu.3dkit.general
Message-ID <[email protected]>
Hi,

On Tuesday, July 9, 2002, at 05:27 AM, Brent Gulanowski wrote:
> On Sunday, July 7, 2002, at 06:58  AM, Philippe C.D. Robert wrote:
>> Hi,
>> working on the new shape/geometry code I wonder how important it is to 
>> have shapes which manage multiple geometry objects, what do you think?
>>
>> FYI I turned G3DGeometry into a class from which all other geometries 
>> inherit. This will make it much easier to have different kinds of 
>> geometries, such as tri strips, vertex arrays or whatever...
>
> Well, that is where I would have first thought to handle LOD and 
> animation geometries, but you've already covered that with the related 
> groups. Since the texture is part of the shape, you'd need the texture 
> to be multiple too, no? Assuming the geometries where different-looking 
> objects as opposed to just differently ordered vertices.

Well, this I have to figure out yet...:-) I don't want the shape to 
become a group like node. Unfortunately this leads to the problem that I 
don't know exactly anymore how to handle textures... If I have multiple 
textures I will need multiple state objects which I definitly don't want 
to have... I need some more brain cycles spent on that!

> What is the mapping of the scene graph classes to the things that a 
> user/player would see in a world made with 3DKit? If there's a 
> stegosaurus wandering around eating plants, does that correspond to a 
> group object with a bunch of shapes, each of which is a frame of 
> animation? And if one object has LOD *and* animation shape sets, which 
> one would be the child of the other? I'm thinking animation would be 
> the parent, giving a timedSwitch group having children which are 
> LODSwitch groups full of shapes representing the same frame of the 
> animation.

Well, I guess the mapping is app specific, no?

> But that points out an inefficiency which your idea would remove: if 
> there is a different shape attached to every LOD version of a shape, 
> they probably all use the same transforms and everything, meaning 
> wasted space and the need to synchronize the static arrays. I would see 
> groups as being most useful for dynamic groupings of objects, based on 
> spatial proximity or temporary life spans, or for complex objects whose 
> components animated independently of each other.

I am not sure what you mean exactly. But don't bother some space wasting 
due to duplicated transformations, this is a minor issue in that 
context. Since the 3DKit is a true scene graph I try to keep the 
different entities separated ( hence I do not put everything into the 
shape class ). But you still can/will be able to compile specific part 
of the graph into optimised G3DDisplayLists ( now called node list ) to 
gain rendering performance.

-Phil
--
Philippe C.D. Robert
http://www.nice.ch/~phip