I’ve knocked out the first two tutorials – these have basically been fairly good introductions in to the Blender interface with a ‘hands on’ learning philosophy, which I am appreciating. Ironically, my progress on tutorial 2 (this castle) was slowed because I had to go to a real life castle.
I also have a five second video of the yellow submarine zooming around but I can’t figure out how to embed it here. I can save it as mp4 format or dvd format; but I can’t open the mp4 format with VLC or Windows Media Player. I’ll have to download a separate player later so I can test it.
The first tutorial (the submarine, in the previous page) made use of a lot of curves and shadows to give an illusion of depth. This costs a lot of vertexes and data, so it’s not a suitable model to port in to OpenGL. The castle is a bit better – there are two light sources as well as textures all over the objects. The objects are largely flat, only the inside of the gatehouse is curved. I noticed that Blender allows four-or-more-sided polygons, so I’ll need to check how these are exported in .obj format. My OpenGL end can only accept triangles and four sided polygons; either I need to make changes to the code or be careful how I make my models (or both). Investigating the obj format will answer that question.
In addition to basic texturing, the castle tutorial also showed world settings, such as the stars, sky, and the fog in the foreground. In ‘reality’, these will be set in the OpenGL environment and the model itself will just be ported into the program, however it’s useful to know how to set these kinds of characteristics. If I have lighting problems in C++ I can test them in in Blender to see what is supposed to be happening/what I think should be happening/what I think is happening versus what actually is happening.
Already using Blender has proved a significant speed improvement. The simple Earth I have in the previous pages has 712 vertexes that had positions and texture coordinates that had to be calculated by the computer, and debugged by me when it went wrong. It is not a significantly complex object but if I want to make any deformations to it (e.g. if I wanted to put mountains/valleys/etc) in to it, I would have to make many more calculations, not to mention hand dial in the locations of where the mountains/valleys would be. That means writing the x/y/z coordinates of each deformation. It’s not really feasible for anything but the simplest model.
However, with the submarine I have many thousands of vertexes, and the castle, a couple hundred. It’s easy to quickly and accurately put in a lot of information (too much actually), just as long as I know how to convert the model into OpenGL.
There is a finite end to these tutorials. My main objective is to learn how to build models and wrap/unwrap textures. Next will be to learn how to export/import animations. Once I’m done learning Blender, I’ll get back in to the C++, and only look back to Blender when I want to create and use new models.
This week I’ll also make some tiny modifications to the fragment shader. I had an idea about the ocean. I don’t really need a new texture just for the sea. Instead, I can check what color each fragment is, and if it has a high enough blue component, I’ll know it’s a sea bit and make the appropriate lighting calculation. It’s already nearly midnight though so I’ll try it next week.