Search code examples
raytracingrasterizingscenegraph

How to best use a scene graph when either rasterizing or ray-tracing?


So this was a question on my Computer Graphics final to which I still don't know an answer.

What is a scene-graph? How is it best used when rasterising or ray-tracing an image respectively?

A scene-graph is a way to manage hierarchical transformations. However I do not know whether it makes a difference if you generate an image by rasterizing or by ray-tracing it.

Hoping somebody can enlighten me.


Solution

  • When rasterizing, usually you recursively traverse the scenegraph and build a transformation matrix, which you then apply to your base geometry (object space) to transform it into monitor space.

    When raytracing, you recursively traverse the scenegraph as well, but usually instead of transforming the geometry, you transform the ray.

    I'm not sure if that's what they meant, but that's the main difference I'm aware of.