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!

1 comment:

  1. Insulation, or more correctly thermal loft insulation, is known as a general term used to explain items that lessen heat loss or heat build by providing a layer among areas which are noticeably different in temperature.

    loft insulation

    ReplyDelete