Scene Graphs

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • Scene Graphs

      Well, seeing as this is my first post here I'd first like to congratulate Mr. Mike for writing an excellent and incredibly informative book. My copy appeared two days ago (quite out of the blue, Amazon UK told me they wouldn't be receiving any copies until the 25th) and I've already finished it (although I will certainly be going through the whole thing again to make some notes for my project design).

      Having finished several small game projects (in order of completion: pong, tetris, and a 3D adventure demo similar in appearance to Grim Fandango and the last Monkey Island game) I'm now moving on to a larger project. I know it is important to restrain my game engine ambitions somewhat, lest the project become overwhelming and crush me under its immense weight :) However, I want to structure the project in such a way as to facilitate adding extra functionality over time without the need for huge rewrites. I'm a fan of OO and abstraction so scene graphs are very appealing to me, but there doesn't seem to be very much info out there on them. I've been trawling message boards and source code for the scene graph details, and I also have Eberly's migraine inducing 3D Game Engine Design, but Mike's book has the best and most accessable information on the subject that I've found so far. Anyway, I'm hoping that, like me, other people interested in this topic will be drawn to this site via the book and we'll be able to help each other.

      If anyone knows of any other useful scene graph resources it'd be great if you could post them here :D

      As Mike says at the end of chapter 10,
      The scene graph in this chapter is a fun toy. It's not nearly ready to install into a real game engine.
      Well, I'd like to discuss how we can make it ready, possible subjects include:

      1. Multiple camera nodes and tracking active cameras
      2. Frustum culling
      3. How to integrate a terrain (quadtree/octree)
      4. Minimizing render state changes, batching vertex data
      5. Collision (bounding volumes)

      As soon as anyone interested in this topic has info or wants to discuss anything related to scene graphs please start posting and I'll be watching for e-mail notifications.
      pan narrans
    • Useful Resources

      Here's a list of useful resources I've discovered in my quest 8)

      Books:
      Game Coding Complete by Mike McShaffry (well duh ;))
      3D Game Engine Design by David Eberly

      Papers:
      Scene Graph Rendering by Dirk Reiners
      Object-Oriented Scene Management by Jeff Kershner
      Scene Graphs by David Hof

      Open Source Projects:
      Open Scene Graph
      Scene Graph Library
      pan narrans

      The post was edited 1 time, last by pan narrans ().

    • Do you mean a follow camera, such as you see in driving games like Grand Turismo, or more complicatated ones like you see in Super Mario Sunshine?
      Mr.Mike
      Author, Programmer, Brewer, Patriot
    • Alrighty then -

      The first thing you'll need is a collision system, and a raycaster.

      You'll use the collision system and the raycaster to determine if some static geometry, like a building, sorts between your character and the camera. If that happens, you'll need to draw your character on TOP of the geometry with a different "look" like Mario does. In their case they draw his sillouette on top of the static geometry.

      Getting the camera to move around is not too hard - every game loop you'll check the distance between the character and the camera, and move the camera if that distance is greater than some value you set.

      You'll still have to set the "Look At" using the same code I describe in the book, every frame.

      Mario also has user input controls that can pitch and yaw the camera about the look at point. This is pretty similar to the camera control user interface in the 2nd 3D chapter, but the camera is moved backwards along it's look at vector to the distance you want.

      Now - a harder solution is one that keeps the character in view the entire time - by dollying the camera in and out as static geometry is interposed between the camera and the character. In fact - this solution is MUCH harder, because the near clipping plane of the view fustrum finds itself colliding with the geometry, and you can see things like walls clipping right on the screen in front of you.

      To solve that, you'll also need a good collision system.

      So I guess your question about camera control is really a question about making a good collision system.
      Mr.Mike
      Author, Programmer, Brewer, Patriot