Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6800653
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T18:59:45+00:00 2026-05-26T18:59:45+00:00

I am trying to create a scene graph for my 3D game in which

  • 0

I am trying to create a scene graph for my 3D game in which every object’s transformations are relative to it’s parent. Each node of the graph has a Rotation, Scaling and Translation vector.

What is the correct way of combining the relative transformation matrices to get the absolute transformation of an object? I would be glad if you could also explain your solution.


Here is an example of to do it WRONG:
This actually turned out to be the solution:

Matrix GetAbsoluteTransformation()
{
    if (!this.IsRoot())
    {
        return this.Transformation * this.Parent.GetAbsoluteTransformation();
    }
    else
    {
        return this.Transformation;
    }
}

In this case, when the parent node is rotated, scaled or moved, the child is transformed the same amount, which is a correct behaviour!
But the child will only rotate around its own origin and does not move around the parent’s origin.


Applications:

There is a car model with four wheels. The wheels are relative positioned around the car’s origin. The wheels can rotate just like real wheels do. If I now rotate the car, the wheels should at all time stay attached to it. In this case the car is the root and the wheels are the child nodes.

Another example would be a model of the solar system. Planets rotate around their own axis, move around the sun, and moons move around planets.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T18:59:46+00:00Added an answer on May 26, 2026 at 6:59 pm

    With regards to your “how to do it wrong”, I hate to break it to you, but it’s not wrong; rather, it’s incomplete. You need to do those kinds of work independently of the parent child relationship.

    Here’s an example of that: The wheel is attached to the car just like you mentioned. If you translate or rotate the car, you don’t need to touch the wheels – they’re in the same location relative to the car. However, when you try to get the wheel’s new location in the ‘real world’, you have to traverse down the tree, applying the matrix transformations as you go. That all works, right?

    When you rotate an object, it rotates around its OWN origin. So a wheel should probably be rotating around its y axis, and a planet around its z axis. But now if you need to move a planet “around the sun”, you’re doing something completely different. This has to be calculated separately. That’s not to say it’s not going to be eased by using some of the same match you already have, (although I can’t say for sure without doing the math myself) but it’s entirely different.

    You’re looking at actually changing the state of the object. That’s the beauty of the scene graph! If you didn’t have a scene graph, you would have to figure out all the various values all the way back to the main scene and then do all kinds of math. Here, you just have to do a little bit of trig and algebra to move around the planet (you can google the celestial mechanics) and move the planet relative to its star. The next time the main scene asks where the planet is, it will just go down the scene graph! 😀

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying create a bot which automatically likes Facebook posts. Using Mechanize I can
Trying to create a user account in a test. But getting a Object reference
I am trying to use the qgraphicsview qgraphicsitem to create a scene like a
So I'm trying to create a simple multi-threaded game engine for the game I
I am trying to make a multi-player network game. Each player is represented by
I'm trying to set up 3D sounds with FMOD in a game which uses
I am trying create a WCF service that leverages the WPF MediaPlayer on the
I am trying create a delegate representation of constructor by emitting a Dynamic Method,
Ok so I am trying create a login script, here I am using PHP5
Trying to create a QtRuby application, I get the following error: /usr/lib64/ruby/site_ruby/1.8/Qt/qtruby4.rb:2144: [BUG] Segmentation

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.