SceneGraph and Transforms #41184

Closed
opened 2014-07-25 22:24:16 +02:00 by Inês Almeida · 5 comments
Member

The scene graph currently handles transforms by storing independent components: location, orientation and scale.

Every frame all objects' world transforms are calculated relative to their parents' and their own local components. Doing these computations component wise causes several problems when a parent is scaled and rotated, and the child rotated too (because in a 4x4 matrix, scale and matrix overlap, and stored separately they have no notion about each other. the child should have the parent scale applied along the parent's axis, not it's own). There is no way to store shear, and also problems with negative scale.

At the end, a 4x4 matrix is computed from the individual components for use in OpenGL.

I propose changing the use of independent components to a 4x4 matrix. The advantages would be correct behaviour with hierarchical transformations and (imho) simpler code. The disadvantages that obtaining the individual components back from the matrix - decomposition - is a complex operation that has problems at least in case of reflexive matrices. (and speed problems for real time?) Still checking who would need this..
I also propose taking the chance to replace the MoTo library.

What is the problem with MoTo?
The Motion Toolkit version we are using is from 2002! with several patches on top. It is limited, not optimized and uses doubles instead of floats contrasting with the rest of blender and what should be used in a GPU.
MoTo doesn't provide anything that we can not use from BLI_math (in C), Eigen3 or bullet2, so why maintain an extra library?
Moto can (should if kept) be updated, it has a new repo with activity from a couple of months. The updated version is quite different, it is template based (not forcing doubles), optimized and has support for several new concepts: diagonals, planes, dual quats, bounding boxes.

Developer documentation for the scene graph is here .

The scene graph currently handles transforms by storing independent components: location, orientation and scale. Every frame all objects' world transforms are calculated relative to their parents' and their own local components. Doing these computations component wise causes several problems when a parent is scaled and rotated, and the child rotated too (because in a 4x4 matrix, scale and matrix overlap, and stored separately they have no notion about each other. the child should have the parent scale applied along the parent's axis, not it's own). There is no way to store shear, and also problems with negative scale. At the end, a 4x4 matrix is computed from the individual components for use in OpenGL. I propose changing the use of independent components to a 4x4 matrix. The advantages would be correct behaviour with hierarchical transformations and (imho) simpler code. The disadvantages that obtaining the individual components back from the matrix - decomposition - is a complex operation that has problems at least in case of reflexive matrices. (and speed problems for real time?) Still checking who would need this.. I also propose taking the chance to replace the MoTo library. What is the problem with MoTo? The Motion Toolkit version we are using is from 2002! with several patches on top. It is limited, not optimized and uses doubles instead of floats contrasting with the rest of blender and what should be used in a GPU. MoTo doesn't provide anything that we can not use from BLI_math (in C), Eigen3 or bullet2, so why maintain an extra library? Moto can (should if kept) be updated, it has a [new repo ](http://code.google.com/p/motion-toolkit/) with activity from a couple of months. The updated version is quite different, it is template based (not forcing doubles), optimized and has support for several new concepts: diagonals, planes, dual quats, bounding boxes. Developer documentation for the scene graph is [here ](http://wiki.blender.org/index.php?title=User:Brita/GSoC_BGE_cleanup_and_support/doc/sg).
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @brita

Added subscriber: @brita
Member

Added subscriber: @Blendify

Added subscriber: @Blendify
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Aaron Carlisle self-assigned this 2019-06-29 02:20:02 +02:00
Member

This task is being closed because the BGE has been removed in Blender 2.8.

This task is being closed because the BGE has been removed in Blender 2.8.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#41184
No description provided.