Horde3D

Next-Generation Graphics Engine
It is currently 30.11.2024, 07:50

All times are UTC + 1 hour




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: 04.10.2009, 20:21 
Offline

Joined: 09.09.2009, 18:58
Posts: 107
I am doing my damndest to understand Game engine design and how Horde3D ties into one, but after weeks of trying, I am still drawing blanks. Please, correct anything I state in this post, because I really want to learn...

Here is what I know:
Horde3D is solely a rendering engine, designed to be tied into a larger framework as a single component, in addition to other modules such as sound and physics.

What I thought I knew:
Horde3D needed to be tied to all these components by means of a separate scene graph.

What is causing me to start all over again:
Horde3D already contains a scene graph implementation that is exposed by its API functions.

I thought of Horde3D as a function library, but I was very wrong, and now I lost a weeks worth of work over a misconception. It has gotten to the point where I am back at square one and have no idea where to go. If anyone can help me, especially in the areas of API design, I would greatly appreciate it.

EDIT:
Thank you guys for your help! I am currently making good headway on my engine thanks to the help that has been provided, and I hope that I will be able to make a tech demo sometime either this month or next month.


Last edited by Orm on 07.10.2009, 11:25, edited 2 times in total.

Top
 Profile  
Reply with quote  
 Post subject: Re: Help me... please...
PostPosted: 04.10.2009, 21:12 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
You don't need to use the build in scene graph since you can add all main nodes to the root node with the root node having an identity matrix.
I guess the only problem would be the "scene graph" within a single model that contains meshes and joints. But I think it should be at least possible to change the hierarchy of those child nodes manually to let them be only adjusted by the parent model matrix (although I haven't tried that yet).


Top
 Profile  
Reply with quote  
 Post subject: Re: Help me... please...
PostPosted: 05.10.2009, 00:55 
Offline

Joined: 08.11.2006, 03:10
Posts: 384
Location: Australia
I have a few different "scene graphs" in my engine, including Horde's one:
Code:
  Horde              Physics      GUI
    |                   |          |
Group Nodes          Bodies       Node
    |                   |          |
Model Nodes          Shapes      Element


As well as different bits of middleware (graphics, physics, gui) having their own internal graphs, my game has an entity graph:
Code:
            Game
             |
          Entities
             |
         Components


The game has a collection of entities. Entities have a collection of components (entities also inherit from component, so an entity can have a collection of entities too).
My "Horde model class" (which owns a horde node handle -- i.e. owns a node in the horde scene graph) is a component. My "physics body class" (which owns a node in the physics scene graph) is also a component.
The game can then compose components together into the "entity graph" without much knowledge of what's going on inside the graphics system (horde) or the physics system etc...

The game doesn't really care about any of the particular scene graphs -- it just creates components.
e.g. the game might make a player entity, which creates a model component, which inserts a model node into horde's scene graph. But the user doesn't have to know about horde's scene graph, all they know is "I created a player".

The player entity doesn't have a Draw or Render function (that's what Horde's scene graph is for).
The player entity can move around or enable/disable the model node (in horde), but that's about it. All of the game logic (moving around objects, etc...) happens in the "entity graph", which in turn updates variables of the model components, which then update Horde's actual model nodes. The game doesn't know how to render the player (or even if it can be rendered), it just updates it's components, and then later horde will render the whole scene by itself.


Top
 Profile  
Reply with quote  
 Post subject: Re: Help me... please...
PostPosted: 05.10.2009, 02:05 
Offline

Joined: 09.09.2009, 18:58
Posts: 107
This helps me quite a bit! Thank you! My problem is where should I initialize Horde3D's resources, and how should I make the entity graph aware of Horde3D's scene graph? Because of course, even the entity graph has to know what to talk to in order to get stuff done, or would each entity have a handle to Horde's scene graph set upon creation? So when, for example, the game calls the Update() function on the scene graph, the entities would have to then make calls to Horde's scene graph which will then do its thing?

Your multi-graph approach seems like it could be very effective DarkAngel. I just need to work out how the hell to impliment a good design.


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

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 13 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