[Bf-committers] game engine scenegraph: design, review and questions

brita britalmeida at gmail.com
Sat Jul 19 02:57:58 CEST 2014

Hey all,
in the time I spent in the game engine tracker for my gsoc, I found more
than a couple of bugs related with basic parent/child transforms. While
these can be in other places (such as data conversion, or the python api),
the core is really the scene graph.
I reviewed and documented my understandings so far:
but I found a lot of dubious code - undocumented and inconsistent (in
style, functionality?). So I need help understanding and cleaning up some

1) is anything wrong or amiss in the wiki page I wrote?
2) is doing that wiki page a waste of time? I felt it was useful for me to
understand quite some concepts, but I would spend less time just leaving it
scribbled in paper for myself.

3) types of parenting:
  - normal, vertex, slow and bone are implemented in the GE. I see that
there are more options in the interface. Is there any that looks important
to support?
I also don't know what is this one (in the conversion):


4) Slow parents are specific to the GE?
Is this really used? They seem to be quite buggy or at least not doing what
I would expect. What I am doing is 1) parent one object to another 2) go to
the child's object properties panel > Relations Extras > and check slow
parent, add some time offset.
If I now do some experiments directly in the viewport.. drag/rotate the
parent, it seems to be working. There are problems: if I cancel the move,
the child does not cancel. If I parent more objects to the parent, the
child jumps..  Where do I need to look at to fix this? (The GE is not
running yet)
When I do run the GE, it does not work. It looks like a normal parent
relation. (I added an always motion to the parent, and pressed 'p')

5) @lukas what are those 'depsgraph hacks' checkboxes at object properties
panel > Relations Extras  ?

6) method consistency on SG_Spatial.cpp
There is a SetLocal and SetWorld for Position, Orientation and Scale. So
far so good. Then there is a Relative Translate Rotate and Scale
6.1) I don't really get the point of these functions and they're all
different, Can someone clarify?
6.2) Translate optionally considers the parent, the Rotate and Scale do not.
6.3) RelativeScale does not have a 'local' flag. Of course that applying a
scale in local or world coordinates would be the same, but scaling to a
value would not. Such as scale = 2 instead of scale * 2

7) The SG_ParentRelation interface has an isVertexRelation() and a
isSlowRelation() . This doesn't feel like a good design, because the
interface shouldn't know about concrete implementations.

8) KX_SG_NodeRelationships - what is the policy to decide if this should be
as is or in separate files?

Thank you
Inês Almeida / brita_

More information about the Bf-committers mailing list