Showing posts with label Graphics. Show all posts
Showing posts with label Graphics. Show all posts

Wednesday, February 8, 2012

Graphics: Art is Key

I started reading The Art Of Game Design this week. I'm reading it because I want to understand a little more about why we create and play games before starting my next graphics POC. I figure the best way to really grasp graphics programming is to create playable games.

Inspired by the book I decided to make my Green Army Man POC more immersive by breaking out my best recording equipment and recording the actual sounds my soft air gun makes when it is loaded and fired. Adding these sounds into the POC, as well as adding realistic impact sounds really made a difference! I also took it one step further and added a visible gun. Thanks to TIGG I didn't have to model my own. His model was much better than I am currently capable of, so I didn't hesitate in using it.

I took a video of me messing around with the POC to give you an idea of current state.



Also, if you have a desire to play around with it yourself I am including the executable, as well as the artifacts and dependencies. You can download it here. You'll need a Windows OS. I am not currently capable of compiling for Linux or Mac. Also, you will need DirectX, if you don't already have it.

I just got some feedback that tutorials on OGRE, Bullet, OpenAL, and Blender would be useful to a few people. If you would also find this valuable, leave a comment! What subjects are most interesting to you?

Monday, January 16, 2012

Graphics: Green Army Men

I find it exponentially more difficult applying myself to my hobbies the further I go in my career. Sometimes months go by without me even realizing I haven't hobbied it up in a while. The holidays are even worse. But that's why they are hobbies, right? They are what you do when you have time. This weekend I had time and decided to pick up Graphics. I'm still not sure why, but when I asked myself on my Saturday morning what I was most excited about doing I thought of Graphics. ( For context, my other in-flight hobbies are my dogbot, a quad-copter, and a smaller mill for milling circuit boards. The dogbot and the quad-copter are currently dependent on the new mill. )

Graphics is still a huge intellectual challenge for me, so maybe that's why I was excited to work on it. I don't have enough deep intellectual challenges as of late and as a result I feel my brain turning to mush. For example, it hit me this weekend while coding a c++ Graphics application that the last time the concept of Polymorphism entered my head was 4 years ago! Shame.

I made a decision this weekend that I didn't enjoy making. I decided to throw out my Code::Blocks IDE with its MinGW compiler for Visual Studio Express. I prefer to use opensource, but I don't enjoy fighting for a whole day, just to get a new project to compile. The more I get into Graphics the more I am realizing that all the opensource graphics related projects are native to Visual Studio, so I gave in.

I am currently using OGRE for rendering, Blender for art, Bullet for physics, CEGUI for user interfaces, and OpenAL for audio. I pushed off Lua scripting until I refactor clean integration of renderer, art, UI, and audio.

I'm finally getting to the point where I'm proficient enough in Blender to start having fun. Below is an image of a green army man I made in Blender for what I consider the ultimate graphics engine proof of concept.


This POC is a simple game I wrote incorporating all of my engines and tools. Through keyboard input the player is able to navigate to any position and orientation, and shoot balls at green army men. When the ball is released it triggers a local sound. When the ball makes contact with a green army man an impact sound, originating at the relative location of the green army man in a 3d space, is triggered. All object interaction is handled through Bullet Physics. Real time physics can be toggled on and off, allowing for a cool time freeze effect. The player can still move around, but the objects that make up the scene are frozen in time. Here are a few more images.



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!