Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

12045 Posts in 1593 Topics- by 593 Members - Latest Member: zhang

24. May 2013, 09:46:42 am
Xith3D CommunityXith3D InternalsDeveloper discussion (Moderators: Marvin Fröhlich, 'n ddrylliog)Multiple meshes per model
Pages: [1]
Print
Author Topic: Multiple meshes per model  (Read 527 times)
lonesomeStranger
Becoming dependent
**
Offline Offline

Posts: 124

197432680
View Profile
« on: 01. February 2013, 10:59:07 am »

Hi Marvin,

What is the best way for implementing the multiple geometries per model in xith3d?
I came up with array of Shape3D's at the moment, i.e. getTarget() in keyframe controller returns Shape3D[].
Logged

Anton
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #1 on: 01. February 2013, 05:08:29 pm »

I assume, all of these shapes should be rendered at the same time. So a Switch node or MultiShape3D wouldn't be an option, right? In this case there would be no better option than using an array of shapes.

Well, depending on your usecase it might make sense to put the shapes into some kind of tree structure to optimize rendering.
Logged
lonesomeStranger
Becoming dependent
**
Offline Offline

Posts: 124

197432680
View Profile
« Reply #2 on: 02. February 2013, 12:32:44 pm »

I assume, all of these shapes should be rendered at the same time. So a Switch node or MultiShape3D wouldn't be an option, right?
Right.

Well, depending on your usecase it might make sense to put the shapes into some kind of tree structure to optimize rendering.
My usecase is the skeletal model animation where model is represented as a list of geometries/appearances with a single skeleton.

I found a few candidate classes for putting the shapes into. These are Group (ignoring rendering), BSPTreeGroup, QuadTreeGroup and OcTreeGroup.
As these classes are subclasses of Group, skeletal keyframe controller may accept Group as the target extracting shapes array from it. Or, even better, to apply array of controllers when each of them deals with a single shape. The order of geometries modification seems to be irrelevant.

Well, could you please recommend some of classes above?

I remember you told me some time ago that octrees' implementation is the target to be removed...
Logged

Anton
Marvin Fröhlich
Xith Lord
Administrator
Guru
*****
Offline Offline

Posts: 4403


May the 4th, be with you...


View Profile
« Reply #3 on: 02. February 2013, 05:04:50 pm »

Oh wow. This is a long time ago. I have to admit, that I don't remember that at my advanced age. But I would say, that BSPTreeGroup is not good for a dynamic model. BSP is efficient for static geometry. QuadTreeGroup is also meant for scenes on flat terrain, since it theoretically only optimizes 2D geoemtry. I would recommend OcTreeGroup.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic