Sunday, August 14, 2011

Graphics: Materials

I'm still not sure what I want to do with my new found graphics hobby, but the previous brick wall proof of concept was a bit boring visually, so I decided to learn how to declare materials in OGRE. Basically, all you have to do is put your images in the [/media/materials/textures] directory and create a materials script in the [/media/materials/scripts] directory. There are a bunch of scripts already in that directory, so you have a lot of examples to work from. When watching the next video keep in mind that OGRE is a real time rendering engine, and yet I'm getting close to photo realism in real time!



The cool thing about materials in OGRE is that they are declared by scripts. This means that you don't need to recompile your application to change materials. Wouldn't it be cool if you could declare scene objects through scripts too? According to a buddy much better at this stuff than I am, that's what Lua is for. Lua is a scripting language that integrates effortlessly with C++, and is almost just as fast as compiled C++.

The latest games that are being developed, including my current inspiration (Overgrowth), use scripts for almost everything. The rendering engine and physics engines are in compiled C++ or C#, but the artificial intelligence, behavior, animation, etc. are all scripted, and apparently Lua is the best. Thus, my next challenge is to integrate Lua into my existing rendering and physics engines. I am having wayyy too much fun!

Saturday, August 13, 2011

Graphics: Way too much progress!

I don't understand what makes me get excited about certain things. I don't understand why I lose interest or gain interest in things. However, I have learned to just accept it and to follow my gut. I'm not intentionally setting my DobBot project aside. I will finish it. But right now my gut is telling me that I need to poor myself into real time graphics.

I got a book on Blender called Blender for Dummies. It's actually quite good. I learned that the reason you right click to select objects in Blender (instead of left click in EVERY OTHER application!) is to get you to use the right and left mouse buttons equally. In theory this minimizes fatigue and keeps you modeling for longer. I guess it makes sense. Blender is going to be something I pick up over a longggg time. I know I'll be proficient eventually, but I'm not in a hurry.

I have decided to use Code::Blocks as my IDE for writing c++ code. OGRE, the rendering engine I have decided to use, is coming naturally, so I decided to also start picking up the Bullet Physics Library. After getting them to compile and play nicely together it was MUCH easier than I expected to create a wall of cubes and shoot a ball into them! Here's a screen capture:



Keep in mind that this is real time rendering and real time physics! I'm blown away!

Saturday, August 6, 2011

Graphics: I think I have too many projects...

I have a lot of hobbies. Sometimes I think I have too many. For a while now I've attempted to stay on topic with my blog so I don't give readers whiplash, but today I decided to change that. I'm going to try to start blogging about all of my random hobbies and projects as they are born, die, or are just forgotten about for a while.

Today my hobby is Graphics. I realize that is a large umbrella to be lumping things into, but I think the category will work for now. The truth is that I can't be more specific because I don't actually know what I want to do.

Coming from a computer science background most of my hobbies, and even my day job, drifts toward coding and technology. In the last few years I've written smart phone apps, web apps, linux admin scripts, firmware for micro-controllers, hostware to talk to the firmware, 3d objects for printing on my 3d printer, and the list goes on. One thing I haven't done since college is write 3d graphics / rendering applications. I feel like it's a muscle I need to stretch. I don't know what I want to do with the added muscle yet, but I've felt this way for a while. That's it... time to start a new hobby.

As a fun way of getting started I've decided to make a simple 3d game, but what technology stack / tool set should I use? At the moment all I have are requirements. Everything must be opensource because I believe in opensource. The rendering engine must be written in C++ because I want it to be as fast as possible, but not be a dead end.

With these requirements I am currently digging into Blender for artwork and OGRE for the rendering engine. God help me. Blender is the least intuitive application I have ever used! If anyone has some good tutorials, send them my way! OGRE, on the other hand, is a gem.

Finally, when starting a new project I find I need a constant source of motivation and inspiration. I just found it in a project called Overgrowth



These guys are good! I have to preorder to support their brilliance!

Update: Allan Ecker was kind enough to send me some cool blender links. I'm sharing so the world can benefit:
"Here are links for Blender: http://blog.thingiverse.com/2010/12/06/blender-2-5-interface-the-3d-view/ This is the basic, stop-pulling-your-hair-out tutorial that explains how not to be totally dumbfounded by the 3D view, which makes sense once you get the hang of it, but is totally baffling otherwise. Blendercookie.com has a long list of very good video tutorials which go from some excellent basic tutorials straight up to some pretty esoteric stuff, but blenderguru.com is where you want to go for photo-realism. Once you're ready for that kind of thing."

Thanks Allan!