Posts Scene graph first drafts...
Post
Cancel

Scene graph first drafts...

This time there will be no video (it will be next time), but I thought that I will post something to tell what is going on (after all it's January and no posts since December ). Current development was slowed down a little bit by Bioware's Dragon Age 😉 . I knew that will end like this, but I couldn't help it ... If I've seen it right yesterday I've got ~1950 darkspawn body count and it isn't over, what a hackfest :P.

Anyway I've made alot of maintenance work to my custom SDL framework. I've added math/vector library, debug/assert functions and macros, little/big endian utility routines. I've replaced all built-in C++ datatypes with custom ones (I've got separate headers for win32 and linux 32-bit) - so code will be more portable and adding new platform support will be easier now. New thing is possibility to set some basic parameters via configuration file (video parameters: resolution/fullscreen / base data folder path ) , so no recompilation is needed each time I want to change resolution, switch on/off antialiasing, change data folder etc...

What next? For now I've got several things in the que.  First is the custom VFS (virtual filesystem) and scene management. I think that I will go after a second thing, which is very interesting and quite big topic. I thought alot about this step and I've made some research in this area already. I will take spatial/hierarchical approach with shared geometry which will occur in tree as leafs only (no child elements). So geometry data will be loaded once and will be shared across several nodes. Transformations of each node will be computed relative to parent node, render states will be set like this too.
This structure has also benefit that, entities stored in tree are spatially ordered and we will be able to calculate bounding volumes for them which will be useful for several purposes like object picking, collision detection and geometry culling. After that, when all of this will be done we will be able to write renderer which will go from the root to each leaf accumulating transformations and render states along the way and applying them to the geometry on the very bottom of the hierarchy.
I want to implement geometry rendering with Index/Vertex buffers with use of Vertex Buffer Objects. Still I will include older methods for comparison (everyone loves benchmarks).

I also consider switching to SDL 1.3, but I have to test it first (SDL 1.2 doesn't support multiple displays/workspaces for example and has it's problems).
As you see, there is a plan and plenty of work here..

This post is licensed under CC BY 4.0 by the author.