Building Better Foliage

From TDN

This page is a Work In Progress.

Contents

Introduction


One of the big things that can make or break a scene is how carefully/skillfully the extra little details in it were built. No one is going care how great the players character looks if the environment he/she's running around in lacks the same fidelity. In outdoor environments, one thing that can really help sell the scene is foliage. The only places on earth that don't have some form of plantlife are the most harsh locales on earth; the tips of the arctic and deserts like the sahara. Since that's the case, it'd be kind of silly to have your players waltzing around those areas like it was no big deal. And since *THAT'S* the case, it's in your best interest to develop a good plant modeling workflow.

Lucky for you, I've got one I feel like sharing.







Workflow Overview


One of the big mistakes newbie artists make when modeling is they don't really dive into the form of what they're making. As a result, their work can end up looking very boxy and lacking character. This can be a very big problem with plantlife, because plants are usually quite wild and visually active. To break it down to practical terms, making a tree/shrub/whatever out of two crisscrossing textured planes will not result in believable foliage. Plants have form. Moreover, it's usually a form that can be captured with only a few more polys than our "two crisscrossed planes" example.

Here's what we're going to do in to evade that unbelievable art fate. I'm going to find some hi res images of a plant I want to model and identify it's main form. Then I'll use Adobe Illustrator to make silouettes of the branches/leaves. Next, I'll take those silouettes and bring them into Adobe Photoshop to paint them. Finally, I'm going to load that texture into 3ds Max and build out the actual model.

Right now, you may be saying, "That's all well and good, but I don't own Illustrator/Photoshop/3ds Max". I'm a professional artist and as such I have professional tools. Professional tools make making art MUCH easier. That said, it is more than *ENTIRELY* possible to go follow the steps I'm going to demonstrate using free or low cost tools like GIMP and Blender, it just will be a little harder.

Ok, let's get started.







Aquiring Source Art


After a bit of searching, I've decided to model Euonymus Alata aka winged burning bush.

Typically, I use Google Image Search and constrain my results to large resolution images. Because the internet image cup overfloath, and Google is so good at navigating said cup, you can search for just about anything and usually get at least a full page of hi res shots. This is terrifically useful when modeling anything, because the more reference images you have, the better off you're going to be. This is ESPECIALLY good for modeling foliage, because the reference photos we find are going to directly help us build our model.

I'll get to what exactly I mean by that in the next step. Before I do, though, remember: More reference photos doesn't mean better art, but it DOES mean a better chance at making better art. Which is good.







Creating a Silouette


After we find our reference art, we want to take a shot that shows a nice view the branches and drop it into Illustrator (or whatever vector art program you have access to). We're going to be using the Pen Tool to trace around the branches and get us a clean mask to paint with. This will allow us to not have to worry about keeping our edges clean, and instead let us focus on getting natural color and texture.

Start the silouette with your main branch and trace it by itself. That is, don't continue the outline if the branch forks into two smaller branches. Instead, just make a line across the fork and head back down the other side. After you close that outline, go and trace each one of the branches that fork off by themselves. Once you get about 2/3 up the hieght of the entire photo, feel free to start tracing whole branches, forks and all. At that point it's in your best interest to keep everything together. Here is how mine is broken apart:

[image showing "pieced together" view and "broken apart" view]

What constitutes a good silouette? First and foremost, it has to look natural. Branches tend to start out fat and then increasingly thin as they move out. Don't expect to get this form correctly the first time around. It's going to take a bit of vertex pushing to get the look right. I typically lay my original silouette out pretty fast, and then spend a lot of time tweaking.

[image showing "right" and "wrong" tracing]

Placement of the branches is just as important as form to have a good silouette. Just because a branch is in the photo doesn't mean that it should be in your final image. This is why we trace each branch seperately, leaving the very ends as "whole branches". It allows us to easily move around parts and get a look that is stronger than it would be if we just traced. This all has to do with how this silouette is going to be used. It will be the form for a texture that is going to be put on flat planes in your 3d modeling app. More importantly, it's not going to be by itself; there will be many planes textured with this image. Since that's the case, be careful not to have too many branches in the image, as it will make the final model seem way too dense. Keeping the branch density in the image on the slightly thin side will ensure that it looks correct on the model.

[image showing what the photo actually looks like and how I thinned it out]

Next are the leaves. In a new layer (this is important), I placed the "red leaves" image from the site I linked to earlier. I traced those four leaves and then copied and pasted them around the branches. Placing leaves should be done with the same care and forethought as making the branches. Be careful not to over/underdo it. The illusion of many leaves is going be most successfully presented by having a good combination of number in the texture and the number of image planes we use in the model.

Keep in mind that, technically speaking, how you place leaves is going to vary quite a bit from spieces to spieces. For instance, if you were modeling an evergreen, it makes much more sense to make a main branch that lacks detail, then make a series of smaller branches with the needles already in place. The smaller branches can then be copied and pasted around the bigger branch.

When you're done with your silouette, rotate the whole thing so it sits on a 45 degree angle. Next, copy and paste the leaves and the branches into their own new files (This is why it's important to make sure the leaves and branches are on their own layers) and save each as an .eps.

-Image of the final sillouettes-

Ok, let's hop over to Photoshop.




Painting the Branches: Round 1


In order to make sure your textures both take up the most space possible while not mipping badly once they are in-game requires the use of a specific workflow.

First, open your branch eps. A dialog will pop up asking what the dimensions should be. There are several things to consider when you are sizing your foliage. The first is "Is this ever going to be a focal point?". Chances are, any plants you make are going to be placed in an environment to create a sense of believability while not ever actually being a focal point. Since this is the case, a good rule of thumb is to never make your textures larger than 256x256, and to go smaller than that if you can. Save your texture memory for things that are more important.

Another thing to keep in mind when bringing the vectors into Photoshop is that the textures you make are going to mip, that is, be blurred the farther away from the camera they are. If you rasterize your vectors so they span the full 256 pixels (or whatever size you're using), then when the textures mip you are going to be blurring details from one edge to the other. This will cause exceptionally noticable errors, as some brown/gray from your trunk will be appearing next to your leaves. Clearly, this is unacceptable, but luckily it's also easily avoided. The solution is to simply leave some room between your branches/leaves and the edge of the texture.

If you haven't already, you may be wondering how you bring both the branches and the leaves into Photoshop while still maintaining the correct scale across both parts. As I said already, we first open your branch eps. Next, you size the longer of the two dimensions to be about at least 32 pixels shy of the full 256. This will stop the mipping from grabbing opposite edges. Before you click ok, though, go to the opposite dimension and change its measurement from pixels to percentage. Copy the percentage in the type in box to your clipboard. Finally click ok.

Next, open your leaves eps. Change the measurement type to percentage on either dimension and paste in the percentage from the branches. Click OK.

See what we did there? We first sized the image to be able to fit into our chosen resolution, then we copied the scale so we could be sure that the size of the leaves would match the branches.

Drag your leaves to your branch image and line them up. Ctrl+click the leaves layer, create a new layer, and fill the selection with an appropriate color. In the case of the burning bush, Ill use a maroon. Do the same for the branches. Ctrl+click the branch layer, create a new layer, and fill the selection with an appropriate color. Hide the original layers, make an alpha layer which includes both the leaves and the branches and save your image as a png.

In case you're curious why we're not painting the texture in its entirety, it's because the sillouette may not be ideal yet for making geometry with. It may be too dense or not dense enough, for instance. To test, we'll save out this early version and make an attempt at creating the geometry in 3ds Max. If it works out ok, then rock on. If it doesn't, though, we didn't waste any time painting a texture we can't use. This basic texture will give use enough information to gauge if we need to make it better as well as how can go about doing that.






Creating the Foliage Model




This page is a Work In Progress.