Archive for the ‘ Coding ’ Category

Interfacing in 3D space

Nothingsdl_interface_thumb much today other that working on the interfacing.  Having mouse control (mouse move, wheel and button click) and windowing is not only necessary for a working game but the sooner you get it set up, the better the creative and debugging sessions go. SDL provides all this and more so that once you get the hang of it, you can’t live without it.  Lots of tutorials and demo rely of FreeGlut or GLFW, but it’s not hard to port them to SDL.  Even the OpenGL Superbible is using a custom event-driven application framework based on different tools, but I’m porting everything back.

Speaking of which, this book has a great tutorial on rendering thousands of  objects (say, a field of grass or a corona of asteroids) with few OpenGL calls.  Go check the video at their site to see the results.  Shaders are so über-powerful.  Today’s example is a similar lesson involving 4 quads (meh!) but it also demonstrates a simple Model-View-Projection with mouse control on both X and Y directions and mouse wheel for field of view (FOV) variation.

Baby steps.

I should be working on lighting soon.  Let’s just see where this leads to, first.

November 16th is “Tutorials day”

No it’s not.  But maybe I should do so declare it!

“Tutorials Day” is when everyone is invited to read / watch / listen to tutorials of their choice and do something useful or artistic with what they learned today.

I was pretty busy (as usual) neglecting the usual housework and laundry chores  (no surprise) in watching and reading many tutorials on OpenGL and Blender.  The goal for today was achieving texturing.  While I disclosed my boredom with spinning cubes in my last post, truth be told that texturing a cube is hard enough for the amateur artist that I am.  And so I ached over numerous tutorials on Blender texturing.  None of them really hit gold, but CGCookie had one that I particularly liked although I found that learning half of it was enough for my goal.

opengl_textured_cube_thumb     blender_cube_thumb

The real challenge isn’t about successfully following tutorials, it’s making sure this knowledge will scale up as the number of cubes (or characters or houses or cars) will start to grow if I want to make anything useful.  I think I’ll be up to the challenge on the OpenGL side of things.  But for Blender ?  Getting a good artist on board might be a smarter move.

OpenGL 4+ : the first steps

I got a little depressed when I felt the learning curve, going from OpenGL 2 to more recent versions. NeHe‘s tutorials are deprecated and the current titles in the book stores take too much time to get to the “real stuff”. Luckily, the person running this tutorial site (According to NeHe, this guy’s name is “Damien”) offers a wide range of lessons in “modern” OpenGL to kick start your apprenticeship.  Not that the bigger books aren’t important, but as a hacker, I always learned by focusing my interest on building cool stuff first, then I crack open a book like OpenGL Superbible or the famous “Red book” to understand the more technical details.

And it’s not just about OpenGL, but also how to interact with other popular software packages like Blender.  There’s a nice tutorial on how to program your own OBJ format loader.  This gives a huge boost of confidence on what you can achieve and it adds the possibility to play and have fun with your code instead of watching rotating cubes.

I like the NASA 3D Resources page where you can use models of rockets and other space vehicles. International Space Station ? No problemo.  Convert to OBJ and voilà.


Next step: texturing.

return top