Horde3D
http://horde3d.org/forums/

Horde3D And Number Of Entities
http://horde3d.org/forums/viewtopic.php?f=1&t=681
Page 1 of 1

Author:  alphadogg [ 30.03.2009, 16:19 ]
Post subject:  Horde3D And Number Of Entities

Assuming you want to create a city simulation with Horde3D, how many entities could Horde3D generally and reasonably support before performance would suffer?

Author:  DDd [ 30.03.2009, 16:36 ]
Post subject:  Re: Horde3D And Number Of Entities

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.

Author:  alphadogg [ 30.03.2009, 16:41 ]
Post subject:  Re: Horde3D And Number Of Entities

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?

Author:  DDd [ 30.03.2009, 17:24 ]
Post subject:  Re: Horde3D And Number Of Entities

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.

Author:  marciano [ 30.03.2009, 22:06 ]
Post subject:  Re: Horde3D And Number Of Entities

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.

Author:  DDd [ 12.04.2009, 18:59 ]
Post subject:  Re: Horde3D And Number Of Entities

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.

Author:  DarkAngel [ 13.04.2009, 02:18 ]
Post subject:  Re: Horde3D And Number Of Entities

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!)

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/