Archive for the ‘3D Modeling’ Category

First the trees, then the forest

Thursday, October 25th, 2007

I started working yesterday on my first serious tree. I’ve tried modeling trees before and found them to be quite tricky. Something about the thousands of tiny branches makes them a pain.

Nevertheless, nice trees are yet another a requirement for convincing game worlds, and the first area of my game is going to feature several lovely copses. Unity has some nice tools for creating the forest (there’s literally a “make forest” button), but before you can have a forest, you need some trees.

After some brief research I went with a pine tree. One of those tall ones shaped like a cone. For one thing, it will fit well with the atmosphere of the game world. For another, it’s shaped like a cone. How hard could it be?

The modeling process went something like this:

  • I started with a cone and manipulated it around until it looked like a decent pine tree trunk.
  • Then I created some smaller cones to use as branches and distributed them along the length of the trunk, making them smaller as I got higher on the tree.
  • Then I was ready to texture the trunk and primary branches. I found a nice, free pine bark texture here and loaded it into the GIMP, the open source graphics editing program. One “make seamless” filter, some rubber stamping, and about 20 minutes later, I had a passable, tiling bark texture. Very exciting.

Unfortunately, this is where it got hard. Foliage, it turns out, is even more detailed a thing than branches. Following Unity’s advice for creating trees, I tried to create a simple group of polygons that could serve as small branches and needles. The idea is to duplicate these polygons, tilt them, and scale them until they fill out the entire tree.

As you can see from the picture, I barely got started. First I had to find a suitable texture (the one I found could still use work). Then I had to figure out how to work with alpha channels in GIMP and transfer them to Unity, which is a little tricky (I’m still not sure I could do it again).

Despite the complications, I feel that progress is being made. If I’m happy with the result, maybe I’ll post a more detailed tutorial about modeling a cone-shaped pine tree.

The joy of texturing

Thursday, October 4th, 2007

As I mentioned in my last post, creating art assets is likely to be the most time consuming aspect of this project. Visuals are, however, quite important, as a fellow blogger points out. While I’m just starting the process of modeling objects, I would like to take a moment to discuss texturing. The reason is simple. Yesterday I turned the crate I had so expertly modeled into a living, textured game object, and I am pleased.

This is premature, of course, since we have yet to come up with a texturing method (more on that in a moment) or even a color scheme for the first area of our game world. Nevertheless, in an effort to see what might be involved in creating a vibrant wooden object, I set out to texture my crate.

Now, there are really two main approaches to texturing:

  • Painting — this is what the real artists do. Start with a base color in your favorite graphics program and gradually paint in details like highlights, shadows, texture (like wood grain or knots). If you’re curious, check out this tutorial on painting, yes, a crate. Painting can yield fantastic results because the possibilities for stylized textures are endless. Case in point, World of Warcraft.
  • Photo-based texturing — It would be unfair to say this method is any less artistic than painting, but the desired effect is different. Photo texturing aims, as you might guess, at realism. Using this method, you would start with a photograph of your desired texture (a piece of wood or, better yet, the side of a crate) and manipulate it until it fits your desired style. My favorite example here is the Myst series.

Which method did I use? Well, neither. My 3D modeling program has a very nice procedural wood shader (which means it creates a texture from a program instead of an image file). So, instead of finding a crate to photograph or trying my off-hand at painting from scratch, I created a flat plane in Cheetah, added a wood shader, customized it by fiddling with some numbers, rendered it, and then used that rendered image as the starting point for my texture.

The result is certainly not going to change the world, but I was amazed how a couple hours of work could turn a drab gray cube into a crate just realistic enough not to be noticed — and for a crate in a video game, there is no greater accomplishment.

The trouble with modeling

Tuesday, October 2nd, 2007

Having made faster-than-I-ever-dreamed progress on gameplay programming, the time has come to turn the bulk of my attention to modeling (that’s 3D modeling–my career with Calvin Klein never really took off).

For the sake of completeness, here’s a quick list of all the basic gameplay that’s currently working:

  • Basic movement
  • Camera controls (complete with collision detection!)
  • Battle mechanics (attacking, casting spells, applying status effects)
  • Character, enemy, and weapon stats (attacks actually cause damage)
  • Enemy death
  • Basic enemy movement and AI (lots more work to be done here)

My brother, who has more experience with 3D modeling than me, will be handling the bulk of the character modeling and animation, while I will probably focus on inanimate objects (for example, this crate I modeled yesterday). The reason for this switch is simple: while there is plenty more programming to do, a story-based RPG like ours isn’t worth much without a world in which the story can take place. It will also help me hold your interest, dear reader, if I can balance my dry ramblings with a few pretty pictures.

Speaking of dry ramblings, I feel compelled to point out that the creation of art assets will likely prove to be the hardest part of this project. Not only must every object in the world be designed and modeled, it must be textured, animated (if necessary), and placed. We’re going to attempt a master spreadsheet containing the status of every object in our little world, and I’m genuinely frightened to see how big it will get.

This is the part of game development that separates the big studios from the little guys. Success in modeling depends as much on the number of people as the depth of talent. Our approach will be to take it one building, rock, or tree at a time until we have a world for you to play in.

Two unrelated notes

  • My favorite band has cast a surprise announcement on the recording industry: they are selling their latest album on their own web site, with no record deal, and, this is big, for as much as or as little you care to pay. Seriously.
  • Secondly, I have one song left to clear on hard in Guitar Hero II–yes, Free Bird. I must beat it before GHIII comes out. I have no choice.

Man on fire

Monday, September 17th, 2007

My brother has been working for a while on a better model for us to use while testing animations. Upon importing this model into Unity, my brother insisted that I make it catch fire. Five minutes later, this is what we had. Any demonic overtones are purely coincidental.

<div align="left" style="width:400px;padding:5px;border:2px solid #808080; font-family: Verdana, Arial, Helvetica;">The browser does not have Unity Web Player installed.<a href="http://otee.dk/getunityplayer.html">Get Unity Web Player</a></div> <p>

Building a world

Sunday, September 16th, 2007

I’ve given plenty of props to Unity so far, but even a great engine is only as good as the content you feed it. To create content for a game, you obviously need tools for 3D modeling, animation, texturing, and music/sound editing. Thankfully, there are quite a few options out there even for people operating with a limited budget.

For 3D, I had been leaning toward Blender, since it’s free and includes an impressive list of features. It also has a big time learning curve and an unconventional interface.

I recently picked up a copy of Cheetah3D, however, which is very reasonably priced and offers nearly every feature I need: first-class modeling tools, skeletal animation, UV mapping, 3D texture painting, and, in the most recent beta, light mapping. The user interface is a snap to learn as well, and objects created in Cheetah can be imported seamlessly into Unity.

I’m getting to the point now where I will need to begin churning out content and building the game world. Efficiency is paramount for a small shop, so tools like Unity and Cheetah can make a daunting task much more manageable.

My next post will talk about some design decisions required to set up a real-time battle system.