Horde3D

Next-Generation Graphics Engine
It is currently 13.05.2024, 04:18

All times are UTC + 1 hour




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 30.03.2009, 16:19 
Offline

Joined: 30.03.2009, 16:15
Posts: 2
Assuming you want to create a city simulation with Horde3D, how many entities could Horde3D generally and reasonably support before performance would suffer?


Top
 Profile  
Reply with quote  
PostPosted: 30.03.2009, 16:36 
Offline

Joined: 26.03.2008, 02:58
Posts: 160
Well you can do a number of things to render complex scenes LOD, occlusionculls, etc

Are you asking in terms of graphics (numb renderable triangles?) or datastructure( numb of nodes in the graph?)

The number of entities you can create in a game has more to do with proper memory management than with graphic engine. I don't know if there is a MAX numb of nodes in Horde3D, if there is it's on a #define somewhere in the code.


Top
 Profile  
Reply with quote  
PostPosted: 30.03.2009, 16:41 
Offline

Joined: 30.03.2009, 16:15
Posts: 2
DDd wrote:
Well you can do a number of things to render complex scenes LOD, occlusionculls, etc

Are you asking in terms of graphics (numb renderable triangles?) or datastructure( numb of nodes in the graph?)

The number of entities you can create in a game has more to do with proper memory management than with graphic engine. I don't know if there is a MAX numb of nodes in Horde3D, if there is it's on a #define somewhere in the code.


Assuming you use some common techniques to reduce the computational impact of each node, what's the common, high-end number people have been able to throw at Horde3D? I guess I'm not asking for a mathematically correct and provable number, but rather an "in practice" or "rule of thumb" maximum.

Another way to look at it is: has anyone tried various engines and generally been able to get more entities out of Horde3D, than say OGRE3D or Panda3D?


Top
 Profile  
Reply with quote  
PostPosted: 30.03.2009, 17:24 
Offline

Joined: 26.03.2008, 02:58
Posts: 160
Well if you take a look at the chicago sample you can easily increase the number of gangsters and roughly test (very roughly since you are not doing any optimizations, yada yada yada...

Code:
void CrowdSim::init()
{   
   // Add characters
   for( unsigned int i = 0; i < 1000; ++i ) //just increase this number.
   {
      Particle p;
      
      // Add character to scene and apply animation
      p.node = Horde3D::addNodes( RootNode, characterRes );
      Horde3D::setupModelAnimStage( p.node, 0, characterWalkRes, "", false );
      
      // Characters start in a circle formation
      p.px = sinf( (i / 100.0f) * 6.28f ) * 10.0f;
      p.pz = cosf( (i / 100.0f) * 6.28f ) * 10.0f;

      chooseDestination( p );

      Horde3D::setNodeTransform( p.node, p.px, 0.02f, p.pz, 0, 0, 0, 1, 1, 1 );

      _particles.push_back( p );
   }
}


I've been able to render 200 gangster and call it usable, i also run a test with 10.000 without issues but performance was not great. You can create as many entities as you wish as long as you have memory and a smart way to manage it.

In terms of number of creating entities i don't see why any engine should have that limitation. It's just a memory issue and in terms of the rendering engine how to handle the pushing of triangles that represent that entity. So personally i don't see any reason why a graphics engine should be better than another in terms of being able to represent entities, they are all scene graph based and can represent any number of entities and hierarchies.

It comes down the the application/game programmer to be smart and use certain techniques, like LOD, Impostors, Culling, and create hierarchical structures that can be used to represent large amounts of entities on screen.

Horde3D is well suited to manage scenes with a large number of entities and translate them onto the screen.


Top
 Profile  
Reply with quote  
PostPosted: 30.03.2009, 22:06 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
alphadogg wrote:
Assuming you use some common techniques to reduce the computational impact of each node, what's the common, high-end number people have been able to throw at Horde3D? I guess I'm not asking for a mathematically correct and provable number, but rather an "in practice" or "rule of thumb" maximum.

It is not really possible to give a general answer here. It depends on the number of materials (influencing state changes) of your model and the polygon count. Horde is relatively optimized for many characters but there is still one thing which makes it less efficient than it could be: the scene tree. Currently models are copied into the scene tree. It would be more efficient (memory- and performancewise) if a Model were a separate resource and would just be referenced by a Model node. Although this is less flexible and a bit less elegant than the current solution, we should really take it into consideration to get best performance and reduce CPU overhead.

DDd wrote:
Well if you take a look at the chicago sample you can easily increase the number of gangsters and roughly test (very roughly since you are not doing any optimizations, yada yada yada...

You can do that but be aware that the sample crowd simulation is not optimized and has quadratic complexity. So it can quickly become the bottleneck with many characters.

DDd wrote:
In terms of number of creating entities i don't see why any engine should have that limitation. It's just a memory issue and in terms of the rendering engine how to handle the pushing of triangles that represent that entity. So personally i don't see any reason why a graphics engine should be better than another in terms of being able to represent entities, they are all scene graph based and can represent any number of entities and hierarchies.

There are certainly differences in how compact the scene nodes are. Furthermore, the basic rendering efficiency can be very different. There are, among others, things like the post-transform vertex cache (ColladaConv optimizes for this), memory bandwidth of vertex data (e.g. Horde uses 16 bit indices when possible) and the proper use of HiZ and Early Z-Out that need to be taken into account to get best performance from raw triangle data.


Top
 Profile  
Reply with quote  
PostPosted: 12.04.2009, 18:59 
Offline

Joined: 26.03.2008, 02:58
Posts: 160
marciano wrote:
DDd wrote:
In terms of number of creating entities i don't see why any engine should have that limitation. It's just a memory issue and in terms of the rendering engine how to handle the pushing of triangles that represent that entity. So personally i don't see any reason why a graphics engine should be better than another in terms of being able to represent entities, they are all scene graph based and can represent any number of entities and hierarchies.

There are certainly differences in how compact the scene nodes are. Furthermore, the basic rendering efficiency can be very different. There are, among others, things like the post-transform vertex cache (ColladaConv optimizes for this), memory bandwidth of vertex data (e.g. Horde uses 16 bit indices when possible) and the proper use of HiZ and Early Z-Out that need to be taken into account to get best performance from raw triangle data.


I wasn't even thinking about the graphics when i wrote that, i was thinking on using things like the flyweight pattern to store large amounts of objects.


Top
 Profile  
Reply with quote  
PostPosted: 13.04.2009, 02:18 
Offline

Joined: 08.11.2006, 03:10
Posts: 384
Location: Australia
marciano wrote:
DDd wrote:
Well if you take a look at the chicago sample you can easily increase the number of gangsters and roughly test (very roughly since you are not doing any optimizations, yada yada yada...

You can do that but be aware that the sample crowd simulation is not optimized and has quadratic complexity. So it can quickly become the bottleneck with many characters.
Yes if you're going to benchmark Horde using the chicago demo, then I would disable the crowd simulation code (otherwise with 1000 men, there will be ~1,000,000 collision checks done by the unoptimised simulation!)


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group