After studying id's Doom3 source and libraries for a while and working on my own stuff, one thing led to another and I started working on StarGen 4, lol. Amazingly I decided to do a complete rewrite of everything I had done before and start from scratch.
One of the biggest things I've learned while writing RenLib is a good (proper?) use of classes, OOP, and functional programming. The fact that I now go back and look at StarGen 1, 2 and 3 and have a hard time figuring out just what is going on says something. And it was that same procedural code that made the previous star generators so unportable and difficult to modify. Sure version 3 was "better" in the same way you add modern car controls to a steam powered car, but it's a far cry from what version 4 is turning out to be.
OOP is also changing the whole core functionality of the program as well, and how my data is created, organized, and sent back to the user. I'm floored! I mean, I'm sure this is all common sense to a regular programmer, but I'm just a technical artist creating this stuff, so to me it's practically magic ;)
Getting back to RenLib for a second; while most of the functionality is done (for what I need to do with it at the moment), I'm proud that I managed to avoid using STL and intrinsic as much as possible. Even when it comes to math functions like square roots and logarithms. Mainly thanks to the combines knowledge of the internet, but still :)
Assembly optimization is also very fun once I see some concrete and working examples of how to do things. The only thing that still eludes me is Intel's AVX, but since I don't have a compatible processor, and it's still very new, I'll let that slide for now ;) For now it's satisfying enough to have working SSE code that doesn't cause runtime exceptions all the time.
That's it for now! StarGen4 is still a long ways away, so nothing to show yet. My hope, however, is that I am able to create something as beautiful as the Space Engine, albeit prerendered.
Thursday, May 24, 2012
Next gen star gen
Labels:
c++,
classes,
HDR,
Math,
OOP,
procedural,
Space Engine,
Star fields,
tools
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment