After some more testing, it looks like OGRE is not the savior it seemed like yesterday. While the static geometry boosted frame-rates greatly, it’s only useful for, well, static objects. Meaning the models can’t move or animate. I did find another option, instancing, which initially looked promising. It allows rendering of large amounts of identical objects faster than just having them be individual.
Looks like I spoke too soon. While OGRE was getting pretty slow with the naive implementation, I was able to find some code on what they call StaticGeometry, which is a system to batch together lots of similar meshes that don’t move (great for my cube example project). With this feature added, the frame rate has sky-rocketed to over 2,600 fps. Most impressive.
Seeing as performance has been on my mind recently, I tweaked the core render loop a bit and saw some reasonable gains. The one thing I realized is that most of the objects in the scene are static, and don’t need their combined transformed matrices recalculated every frame. I expected to see wild improvements after caching the values. What I received was a decent
I don’t have much time, so I will be brief. Basically for the past few days I have been trying to optimize the engine. With the stress test you see above (around 13K cubes) I was only getting around 200 fps. Just slightly above my target of 120 fps, and with such a simple scene I was expecting more. So I got to
Today I have gotten the camera system to a decent place, and made a simple free look demo. Most of the code had already been implemented, inside the vector and matrix classes, I just had to piece it together into a camera object. I also added a grid of cubes, to better see the camera working. Sadly these extra 200 cubes slowed
Though the above video might not seem like an overly impressive jump from the last, there’s actually a ton of work behind it. The new additions include a node-based scene graph hierarchy, more robust math libraries, and keyboard control using DirectInput. Plus, I’ve tried to abstract as much as I can into modular classes and remove the hard-coded hacks I had in there. Finally I
The demo is starting to shape up now, with texture mapping and some simple lighting (ambient and directional). To be fair, I’m not sure if I would really call this an “engine” quite yet. It’s still very much a bare-bones, hard-coded demo done in DirectX 11. But once I can get the features working, then I can properly abstract and generalize the
Game Engine Gems 1 By Eric Lengyel is a book I discovered on Amazon, but really hadn’t heard of or seen talked about anywhere else. I do recognize the editor, Eric Lengyel, as the creator of the C4 Engine and author of the classic textbook Mathematics for 3D Game Programming and Computer Graphics. So I was going in with high hopes. The book is a
Today I have finally gotten a simple sort of animation working. It looks easy, but I made my life a lot harder by implementing by own math library. So far I have a Vector3D and a Matrix4x4 class almost finished. Well the Vector class is pretty much done. The Matrix class still needs some fleshing out, but I got it working well
So I buckled down and spent the better half of the day actually getting something to show on the screen. Yes, it’s still just a triangle, but it feels pretty satisfying after struggling to get it to work all morning. While there are tons of triangle tutorials online, and it would seem like a 20 minute hack, I ended up having some difficulty for