Friday 15 August 2008

Managing scene objects

After a small change to the lighting (again...) I'm fairly happy with the basic ray / light model now. I still need to implement refraction but that can wait a bit. The next task is to work out an efficient way of manipulating the many triangles in the scene. I need to group them into objects - remembering that OO is not supported on CUDA, and make methods to translate / rotate / scale these objects.

[caption id="attachment_162" align="aligncenter" width="300" caption="Yet another lighting change"]Yet another lighting change[/caption]

 One idea I've had is to store an object identifier with each vertex, while this would work it will increase the storage size of the meshes a lot and not be ideal for a cuda type architecture in which we want to limit branches. Another idea is to store an object identifier with a vertex count and thereafter a list of the vertexes. Or even better a list that stores a pointer to the start vertex and a vertex count. This last way would also make the acceleration structures rather efficient by adding a few more properties to the list.

No comments:

Post a Comment