Horde3D http://horde3d.org/forums/ |
|
Scene graph, model node and geometry http://horde3d.org/forums/viewtopic.php?f=8&t=583 |
Page 1 of 1 |
Author: | sebastiend [ 17.12.2008, 12:05 ] |
Post subject: | Scene graph, model node and geometry |
Here are some detailed questions. I took a look at the render function (egRenderer.cpp). I saw each time a geometry resource is loaded, it creates vertex and index buffers. A model node require a geometry resource pointer. But how are linked the node position and vertices? How are duplicated vertices on the screen when two model nodes use the same geometry resource? How are models (still using the same geometry resource) animated without being synchronous? sebastiend |
Author: | Volker [ 17.12.2008, 14:35 ] |
Post subject: | Re: Scene graph, model node and geometry |
The scene graph node transformation is handled separately so this transformation does not change the geometrie's vertices transformation. In case of hardware skinning the animation transformation is changed only on the graphics card's memory, so the vertices are unchanged on the main memory. In case of software skinning Horde3D clones the geometry resource so each instance gets its own vertices instance. |
Author: | sebastiend [ 17.12.2008, 17:25 ] |
Post subject: | Re: Scene graph, model node and geometry |
Volker wrote: In case of hardware skinning the animation transformation is changed only on the graphics card's memory, so the vertices are unchanged on the main memory. Does this mean two vertex buffers exist each for one node? In this case, I still don't see where this duplication is done. This also doesn't answer to how is given a position in 3D space to these vertices. Links are welcome to let me learn more about the theory. |
Author: | Volker [ 17.12.2008, 19:26 ] |
Post subject: | Re: Scene graph, model node and geometry |
sebastiend wrote: Volker wrote: In case of hardware skinning the animation transformation is changed only on the graphics card's memory, so the vertices are unchanged on the main memory. Does this mean two vertex buffers exist each for one node? I'm not an expert on those topics myself, but as fas as I understood it, and without doing some investigations in the code, there is only one vertex buffer and the vertex transformation will be applied in the shader. sebastiend wrote: This also doesn't answer to how is given a position in 3D space to these vertices. You have a transformation given by the scene graph node that will be applied to the Mesh as a whole. If you have per vertex transformations e.g. for morph targets or when using software skinning the geometry resource will be cloned and it's vertices are transformed by the CPU in main memory (see line 341 in egModel.cpp for the code for cloning the vertex data) |
Page 1 of 1 | All times are UTC + 1 hour |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |