Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3509 Members - Latest Member: lioneltenel

27. May 2012, 04:10:23 am
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)What is the maximum model size?
Pages: [1]
Print
Author Topic: What is the maximum model size?  (Read 1283 times)
apalazon
Just dropped in

Offline Offline

Posts: 1


View Profile
« on: 22. May 2008, 03:27:57 pm »

We plan to develop a viewer for the model of an entire city using Xith3d, with 80 highly detailed buildings (only outside) and 20 detailed buildings (outside and inside).

This is a very big model, so I ask you what is the maximum size (in polygons/triangles) of a model in Xith3d?

Thank you very much in advance for the response.

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

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #1 on: 22. May 2008, 03:45:42 pm »

Hi apalazon. Welcome to Xith3D Smiley.

Well, your question cannot be answered with a fixed number. It depends on many parameters.

1. The most important parameter is your system itself; especially the graphics card.

2. The second parameter is, how your models are composed.
2a. Are they composed of one big object (a Shape3D in Xith3D)? In this case the frustum-culler cannot do much to optimize your scene.
2b. Are they composed of extremely small objects (worst case: one triangle per object)? In this case the overhead per object becomes meaningful.
You should try to take care of the object size to not exceed 4096 vertices, which is the optimum size for a VBO. But less vertices may also be beneficial, if they cover a large region and could be partially culled away by the frustum culler.

3. How is your scene managed? In a scene that big you should use an optimized data structure to store you shapes in like an OcTree or a BSPTree. Currently a BSPTree is only available when the scene is loaded as a BSP-level (Quake3). An OcTree is not available at all, but will be in the near future. (I have pretty concrete concepts of how to implement one. Will not take long.)

4. What kind of effects do you plan to use on your scene objects? Is is simply unlit (one light level for everything)? Is is lit by several light sources? Are complex ShaderPrograms used?

There may be more parameters, but these ones are the most important ones.

I definitely cannot give you a number by a rule of thumb, since it is too dependent on these parameters.

Does this help you?

Marvin
Logged
qbproger
developers
Becoming dependent
***
Offline Offline

Posts: 217


View Profile
« Reply #2 on: 22. May 2008, 07:37:13 pm »

2b. Are they composed of extremely small objects (worst case: one triangle per object)? In this case the overhead per object becomes meaningful.
You should try to take care of the object size to not exceed 4096 vertices, which is the optimum size for a VBO. But less vertices may also be beneficial, if they cover a large region and could be partially culled away by the frustum culler.

Does that mean it would be more beneficial to split it into separate Shape3D's (and Appearance nodes) after 4096 vertices are in it?
Logged

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

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #3 on: 22. May 2008, 07:47:19 pm »

Does that mean it would be more beneficial to split it into separate Shape3D's (and Appearance nodes) after 4096 vertices are in it?

Well, yes for the Shape3Ds (no apostrophe here Wink). But you can simply (and you definitely should) use the same Appearance instance for the splitted shapes.

Marvin
Logged
qbproger
developers
Becoming dependent
***
Offline Offline

Posts: 217


View Profile
« Reply #4 on: 22. May 2008, 07:50:01 pm »

Well, yes for the Shape3Ds (no apostrophe here Wink). But you can simply (and you definitely should) use the same Appearance instance for the splitted shapes.

So using the same Appearance node for multiple Shape3Ds can speed things up?
Logged

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

Posts: 4381


May the 4th, be with you...


View Profile
« Reply #5 on: 22. May 2008, 07:59:37 pm »

So using the same Appearance node for multiple Shape3Ds can speed things up?

Yes. The Appearances are compared to each other for equality. If an Appearance a1 for Shape s1 and Appearance a2 for Shape s2, where s2 is rendered directly after s1, are equal, a2 doesn't need to be applied to OpenGL. And the test for equality an be done much faster, if the two instances are actually the same instance. Of course that's ony important for very many shapes. And I don't remember the difference. But you can test it. A BSP level uses a lot of equal Appearances. There are over 3000 shapes in the Q3 level in the Q3FlightBenchmark. But there are only very few actually different Appearances. Simply run the Q3FlightBenchmark (two flight-rounds). Then comment out the line #318 in org.xith3d.loaders.models.impl.bsp.BSPConverter. Run the flight again (two flight-rounds) and see the difference.

Marvin
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic