Hi,
I'm not 100% sure if this is the right place to post this so please let me know so I can remove it and move it to the correct board.
I am a student at The University of Portsmouth and as part of my final year project I am focusing on the development of an open source scene graph editor which is in theory designed to help work with custom built engines and is aimed at independent developers and students.
Since this project focuses on development for independent developers and students I need to find out what requirements they are after to allow the software to be designed around them. This is where I need some help I have created a very small (hopefully 3-5min) survey that would aid me in completing this task.
The survey can be taken online here https://www.surveymonkey.com/s/HGRMYRX.
Thank you
Chris
Open Source Scene Graph
Might I ask what your idea of a scene graph is?
Because it’s been until recently a foggy notion for a lot of people and I’m not sure a true scene graph warrants an editor. It’s typically implied by the modeling software (Maya, Blender, 3DS Max, etc.) for each model and inside the game world things get added to nodes dynamically (such as a gun in a player’s hand).
One of the questions you are asking is, “What features are important to you for a scene graph editor to contain?”, but surely you have some ideas of your own as well.
So what do you think one should contain/be/do?
L. Spiro
I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid
The problem with the scene graph is that it can contain any number of things that are associated with the game that may or may not be representable through the use of a modelling package.
From my own opinion on what a scene graph should contain at a core is the model, texture and transformation matrix with a hierarchical parent to child relationship. From there you can go anywhere; so if you want to include collision into the scene graph data you could but maybe you don't need to and all your models calculate their own fancy collision so instead you want support for complex animation morphing.
This is where my user requirements come into play as I need to know what it the most popular items that need to be expressed in a scene so there is the option to implement them.
From a personal stand point I don't feel there is a need for this project as engine design and 3D graphics has come to a point where they require their own implementation to take full effect. However this is still early to call that as I need to try and implement the system first to see if there is any possibility of it working.
Unfortunately, my answering the survey would be contra-productive. The following is why it would be so. Starting at the end:
From a personal stand point I don't feel there is a need for this project as engine design and 3D graphics has come to a point where they require their own implementation to take full effect.
Seconded. Moreover, it is not only a question of "full effect" but also of maintainability.
The problem with the scene graph is that it can contain any number of things ...
Exactly, and that is the reason why to avoid (traditional) scene graphs for games at all. In a "modern" concept the different tasks are assigned to different sub-systems, each one with its own suitable kind of managing. It makes no sense to enforce tasks to be solved in a way that is chosen just due to its possibility to be presented in a (scene) graph. Collision / proximity detection using a quad-tree, rendering sorted by tags and material, waste of performance avoiding by updating just knowingly belonging game objects, composing game objects by components, special cases like terrain and skeletons, all these are some examples that don't fit into a scene graph.
This is where my user requirements come into play as I need to know what it the most popular items that need to be expressed in a scene so there is the option to implement them.
Well, "in a scene" is something different as "in a scene graph editor". In the survey (where you ask "in a scene graph editor") I'd write down "nil", simply because I think that a traditional scene graph is an overcame concept. But "in a scene" I want to see an open world without load screens, an appropriate number of NPCs with, of course, believable AI and AE, freedom to steer my avatar, equipping with / utilizing items laying around, investigating puzzles, and good (i.e. not a simple Q&A and a non-repetitive) conversation. This is because I'm mostly a fan of the RPG genre.
However this is still early to call that as I need to try and implement the system first to see if there is any possibility of it working.
It is okay to write an editor for learning and/or educational purposes, and it may and will be sufficient for several projects. But in general, if you get real game requirements as you ask for, you'll find yourself in a position where you start to press things into the graph structure, making compromises with no need beside the fact of using a scene graph. So you may better restrict yourself to things that naturally fit.
Just my 2 Cents. Nevertheless, good luck for your project :)
But "in a scene" I want to see an open world without load screens, an appropriate number of NPCs with, of course, believable AI and AE, freedom to steer my avatar, equipping with / utilizing items laying around, investigating puzzles, and good (i.e. not a simple Q&A and a non-repetitive) conversation. This is because I'm mostly a fan of the RPG genre.
This is what I would expect to be expressed in your version of the 'scene graph' there may be more items happening behind the scene but from my personal stand point the scene graph should be capable of representing anything that you need to visually see in the scene during development.
But I completely agree with all your points. The major problem is that I have come to this conclusion before writing the application which is a slight requirement to my dissertation.
This is why I asked.This is what I would expect to be expressed in your version of the 'scene graph' there may be more items happening behind the scene but from my personal stand point the scene graph should be capable of representing anything that you need to visually see in the scene during development.
In reality a scene graph’s purpose and functionality are not subjective. There is no, “This is what I think it should have.” It is either understood or misunderstood.
Using one to aid in the cascade of transforms (which then indirectly affects any visuals that may or may not exist) is only the most common use for a scene graph, but the reality is that a scene graph has nothing to do directly with graphics at all.
A kitten dies every time you misunderstand the purpose of a scene graph, so in order to save as many kittens as I could I have already explained at length what a scene graph, does, is, and is not.
Scene Graphs
There is no “additional” or “optional” feature you can add to a scene graph. Anything you add beyond propagating data down to children nodes is violating the single responsibility principle and you either no longer have a scene graph or you have a scene graph that oversteps its boundaries.
L. Spiro
I restore Nintendo 64 video-game OST’s into HD! https://www.youtube.com/channel/UCCtX_wedtZ5BoyQBXEhnVZw/playlists?view=1&sort=lad&flow=grid
From a core level it would work as a set of rules with what should and shouldn't be included into the scene graph but I still don't think it would be able to cater to every need if implemented in a fix fashion. Take for example nVida's SceniX which has a strong focus towards shader management in its scene graph I don't think their implementation would work for every situation.
The proposed project though in theory should avoid this though as in the end what should be available is a 3D editor where objects can be placed and linked in a hierarchical fashion with attribute being related. Once complete you just export it as an XML or some other structured file format and load it into the specified engine (as long as some serializer is written for the file) where it chooses what to do with the information.
I may be wrong though this is all part of the study; its interesting how scene graph gets interpreted by everyone.
I'm aware that I mostly criticize scene graphs, but perhaps at least my examples give you some ideas of what you may want or want not to implement ;)
The proposed project though in theory should avoid this though as in the end what should be available is a 3D editor where objects can be placed and linked in a hierarchical fashion with attribute being related.
What is meant with "linked in a hierarchical fashion"? You probably mean linking with forward kinematics, i.e. moving the parental node means to move the children nodes in the same kind, too. This means a kind of physical linking of game objects. Or do you mean logical linking, where a kind of containment is expressed (IMHO the only meaning a scene graph should have at all)? Placement for the majority of game objects is done directly in the world. This is a concurrent structuring if logical containment is expressed by the scene graph.
Moreover I'm not sure why forward kinematic solely is so special that it should be the reasoning for a scene graph. Look e.g. of what I call the "grab-grip mechanism". It is a mechanism with which I solve grabbing of items in the sense that "grabs" (a kind of anchor with keys) can be attached to specific bones of a skeleton, "grips" (a kind of handle with key-holes) can be attached to game objects that represent items, and those can be paired if a key matches a key-hole. It essentially solves the problem of what can be hold in which hand (or whatever) and how it is geometrically related when hold. How to express this? The grab is attached to a bone by an own local transform. But the skeleton is its own hierarchy outside of the scene graph (otherwise you get problems with expressing the skinning and animation looses performance). The grip is attached to a game object by its own local transform. And where is the linking expressed? Notice that we need an explicit thing for this, and this thing is linking 2 nodes of distinct paths and does not really belong to one of them! This is opposed to the forward kinematic linking which is expressed implicitly by node parenting. Why do I have to express the nearly 10 mechanisms I have implemented in my engine explicitly, but the 11th mechanism implicitly?
By linked in a hierarchical fashion I mean as a binary tree but where a child can only contain one parent this way any attribute of the parent node can cascade down to the child nodes.
In your case where you would require the need of a object to be linked to another object through the animation tree you would not include the animation tree into the scene graph but have a node which has a reference to the animation along with the model, any textures, special shaders and any other requirements which may effect child nodes. To create the grip object you would have the ability to reference a bone in the animation tree and then set a attribute to it, then any other object you create which has the grab attribute set to it. Once the object are running all you would have to do is set the grab object as the child of the grip object and if you have written the behavior to link the two together the two should lock together in the correct place.
I believe this is what L. Sprio was getting at with the scene graph being used to assist in situations where you need cascading data (though I could be miss interpreting what he/she said).
I believe this is what L. Sprio was getting at with the scene graph being used to assist in situations where you need cascading data (though I could be miss interpreting what he/she said).
Yes, he (don't be confused by his forum avatar ;)) meant that attributes get propagated from the parent to its child nodes. The problem I hinted at is that this propagation is seemingly arbitrarily aborted and replaced by another value. The example is forward kinematics where in principle each child node is placed with respect to its parent node. Now the grab node is not, because its placement is defined w.r.t. to something outside the scene graph. Logically it is part of the character, physically it is attached to its skeleton. If you attach the grip node below the grab node, where is the item's node gone to? Is it below the grip node because moving the grip node is defined to move the item? But then we have a problem because the grip itself is defined local to the item's co-ordinate system, so the transform propagation would be violated once again. Do you see the dilemma? If I do it the other way, I enforce the designer to think in an unnatural way just to be able to deal with a scene graph.
In fact the definition is now "transform (or any other attribute) is propagated except it is overridden". But then I ask why do I put the child node below the parent at all in such a case? I don't do it for material, because the item has its own one with need to override the character's material. I do it for some other linking in dependence of the function of the node. E.g. I link the hold grip to the holding grab to express that it is hold. Hence: Other nodes, other linkings. Moreover, nodes which require more than a single partner require (1) roles of the nodes below it (perhaps even by some order if the semantic type alone isn't sufficient), and (2) may break the tree structure by cross-linking.
Allowing such kinds of linking, the responsibility of a scene graph becomes the said spaghetti. I had the above thoughts around year 1998, at a time where I was on the way to implement a scene graph for my hobby game engine. But it had not worked well. I don't say that it does not work at all, but it is IMHO not a clean and intuitive solution. Nowadays I have no scene graph; all I have is a scene where game objects are contained in a flat list (although not even that is really true), and any relation between them is modeled explicit. So the designer can "touch" the linking and set its properties as needed. Any grouping of game objects the designer can make is for pure logical purposes (including that game objects can also be part of none or more than a single group). That means also that no functionality is hidden (in implicit propagation) and hence easier to understand (no surprising overriding), IMHO important aspects to be considered in an editor.
This again are my 2 Cents, of course :)