Discussion Forums

Making Trees for GR with 3dsm Pt 1
by shiver
Published : 11th July 2003
Feedback : Here

Introduction - Part 1 - Canopy Trees

Let's make some trees eh? There's lots of ways of doing things in 3dsm. I think we all evolve into using one method or another. Use whatever works best for you. If you're new to making trees, then I hope these tutorials help get you started.   I'm assuming you have a basic understanding of 3dsm. You should know how to navigate 3dsm, how to manipulate objects, how to load textures into the material editor and how to apply them to objects.

I used 3dsm r4 to make mine. It's probably not too different from other versions. I'm also assuming you've read through either the level building pdf for Ghost Recon, or Mike Schell's Ghost Recon Map Making Tutorial . We'll be using a texture file from Island Thunder for the 1st tutorial so it's best if you have that also.

Canopy Trees

I think the easiest tree to make for Ghost Recon is the one that uses the canopy texture so we'll start with doing one of those.

Open 3dsm and in the front view port draw out a plane and make the length and width 2m. Change the number of length and width segments to 2. Convert it to an editable mesh and give it a name, like Branch for example. Save the file with a name like canopy_tree01 or something like that.

Now we need to apply a texture to this plane. We're going to use c01_canopy_tree.rsb which can be found in \Program Files\Red Storm Entertainment\Ghost Recon\Mods\Mp2\Map\C01_Plantation.

Open the material editor and load the c01_canopy_tree.rsb file into an empty slot, and apply it to your plane object. Make sure you select the 2 sided option in the material editor. This will allow the leaves to be seen from either side. Now apply a UVW modifier. Next apply an Unwrap UVW modifier.

Click on "edit" in the parameters roll out of the unwrap uvw modifier. This opens a window allowing you to adjust what gets textured and what doesn't.

Make sure that you can see the texture. In 3dsm 4, you click on the cube next to where it says Update Map. We need to see the texture in order to edit our uvw's. Select all the uvw's. Your window should look similar to this with the uvw's all selected.

Click on the Scale button (3rd button from the top right) and hold it down so that the drop down menu shows the other scale options. Choose the horizontal scale button (with the arrows pointing left and right).

Using the horizontal scale button, we need to resize the uvw's so that only the branch with leaves is selected. We don't want the trunk to be applied to our plane. So scale that white box a bit smaller and use the move button to move the white box over the branch with leaves. When you're done it should look like this.

Once you have that done you can deselect the uvw's by clicking anywhere in that window and then close the window. You're done with texturing your plane. It should now look like below. Save the file now.

 

The Tree Trunk

Now we need to make our tree's trunk. I like using cylinders for my trunks.

Change over to the perspective view and draw out a cylinder. Make the height 3m, that will give us a trunk that is 50% longer than our plane. Give it a radius of 0.1m and change the number of sides to 5 or 6. I'm going to use 6. If you want to be able to give the trunk a unique shape , for example make it fat in one area or make it bend, then you'll want to have more than 1 height segment. I'm going to leave mine at 5 because I want to be able to give this tree some character. Change the name from cylinder01 to something like trunk. Convert to editable mesh and save.

Aligning the Branch

Now we need to align our branch with our trunk.

Select the plane with the branch/leaves texture, click the align button, and click the trunk. Align the plane with the center of the trunk on the xy axis. Align the minimum of the plane's z axis with the maximum of the trunk's z axis. Rotate your plane object along the y axis.

The idea is to align the bottom of the branch texture with the top of the trunk or just slightly below it. It should look like below. Save your work now.

Our tree is starting to take shape. Before we go any further, let's work on the trunk a bit more.

Working on the Trunk

In 3dsm there's a whole slew of modifiers to use to alter the shape of an object. Let's begin with using the taper modifier to make the tree look a little thinner near the top. Select your trunk and apply a taper modifier to it. In the parameters rollout under taper amount I used -0.3 which gives a nice tapered look. The top of the trunk's radius becomes smaller than the width of the branch on the plane object but that's ok.

Next apply an edit mesh modifier to be able to select polys. Click on the poly button to enter sub-object mode. Now select random polys on the lower half of your trunk. Next apply an xform modifier to those polys. Use the select and non-uniform scale button to scale the polys larger on the xy axis. The top of the trunk will grow larger even though no polys were selected. Keep an eye on that part as you scale your trunk larger being careful that the radius at the top of your trunk doesn't exceed the width of your branch texture.  This gives the trunk a nice unique looking shape. When your done you need to Click on your xform modifier to deselect it.

Ok, that gave our trunk some random areas where it looks thick. How about giving the trunk a little bend? But let's do it using the edit mesh modifier.

With your trunk selected , apply an edit mesh modifier. Click on the poly button to once again go into sub-object mode. You should see your selected polys from the last step. Just Click in the window somewhere to deselect them.

We're going to select some new polys and give a little tug on them in the xy axis. This will give us a little bend. Select some polys around the middle of your trunk. You want to select all the polys of 1, 2 or 3 sections around the half way point. Here's mine.

I selected all the polys of the middle 3 sections.

Now use the select and move button to give those polys a little push on the xy axis. All we need is a little movement, not a big move or it will be harder to texture. When your done, deselect your polys and Click the poly button to exit out of sub-object mode. Save.

Texturing

So let's go ahead and texture this puppy.

Bring up the material editor and apply your canopy texture to the trunk. Apply a UVW Modifier. In the parameters roll out under mapping, select cylindrical.

Next apply an Unwrap UVW. Now Click on the edit button in the parameters roll out. We need to adjust the UVW's for the trunk just like we did earlier for the plane object with the branch and leaves texture. Select all those white boxes and use the horizontal scale button to resize the big white box so that all the UVW's are on the trunk. You'll also need to select rows of uvw's to move them right or left.

It should look something like this when you're done.

Once you get it , deselect the uvw's and close the window. Save. Your trunk should look something like this.


 

Branches

It's getting there but there's still lots more to do. We need to make more branches.

Select the plane with the branch texture. Click on the hierarchies tab. Click the affect pivot only button. Click the select and move button. Move the xyz gizmo down on the z axis and adjust it on the x axis so that it's lined up with the bottom of the v in your branch texture. When you have it aligned properly, Click the affect pivot button again to deselect your xyz gizmo.

With your plane object still selected, Click on the select and rotate button, hold down the shift key and rotate your branch on the z axis 90 degrees to create a copy of it facing to the side. The idea here is to make a copy of our plane facing to the side so that the player will see the branches and leaves from the front or the side.

When you let go, a window pops up asking you how many copies. Just Click ok with 1 being the default. If your copy ends up being a little off center, just move it over a little so that the branches line up with the branches on the original. You should end up with something like this. Save.

We're almost done with this model. We just have to clone those 2 planes to add more branches.

Select the 2 planes,  press and hold shift, drag the planes lower on the z axis using the select and move button. Just choose 1 copy in the pop up window that follows.

Use the select and rotate button to rotate the 2 planes simultaneously on the y axis either clockwise or counter clockwise. I just rotated mine to the 11 o'clock position. The pivot was in the center though. So we need to move the planes together along the x axis so that they look like they're starting from the trunk of the tree and not protruding both sides. Save.

Now, with those 2 new branches still selected, press and hold shift, rotate again on the y axis, this time in the opposite direction, to create a new pair of branches . Move them along the x axis to the opposite side of the trunk. Hopefully your tree is looking something like this.

Just 1 more step for this model and then we add a collision object, a helper point and tag it for Ghost Recon.

Select those new groups of planes on the left and right. There's 4 planes in all. An easy way to do it is by pressing "h" and selecting planes 03, 04, 05 and 06. Planes 01 and 02 are the tree top and we don't want those selected. Hold down shift again and rotate the 2 groups of planes 90 degrees on the z axis. You may need to move them over a little on the x and y axis so they're aligned properly with the trunk. You might even want to lower them a little on the z axis so that all the branches aren't at the same height on the tree. Play around with them until you're happy with how it looks. You may want to make more branches even. It's up to you. Just be careful about how many branches you add because you don't want to have too many polys.

Here's how mine came out.

 

The Collision Object

Time to add the collision object.

The level building pdf that comes with GR recommends using a 4 - 6 sided object to represent the 2d collision of the tree. They recommend that it exceeds the bottom of the tree and is at least 200cm long from the base of the tree. How you proceed from here is up to you but I don't follow those rules to a "T" and rarely have any troubles.

I know in this case , my tree's trunk is 3m or 300cm. I also know from reading the pdf that the player's character can't step up onto anything higher than 60cm. So as long as the collision object is more than 60cm high, there shouldn't be a problem. So a collision object just half the height of this tree's trunk should be fine since it would be 150 cm tall.

Select the trunk of the tree and go to edit/clone to make a copy of the trunk. I add collision to the name of the new object so I know it's the collision object. And just to be sure there's no problems caused by the texture that's applied to it, I delete the unwrap and uvw modifiers from the stack of the new collision object. When you do that, the edit mesh modifier becomes the top modifier in the stack.

Click the poly button to enter sub-object mode. Select the polys of the top 2 sections of your collision object and delete them. Answer yes to delete isolated verts. This leaves us with 3 sections of the trunks collision object which is more than half of the total length or 180 cm to be more precise. Think of it this way. The length starts out being 300 cm. The length is divided into 5 sections. 300cm / 5 = 60cm. 60cm x 3 sections = 180cm. Should be enough to serve as a proper collision object.

The Helper Point

Now we add the Helper point.

The helper point must be added while using the top viewport. Here's an easy way to do it. Switch to the top viewport. Make sure your collision object is selected. Under the create tab, Click on the helpers tab. It looks like a tape measure. Click on Point and then Click on the center of your collision object in the top viewport. Right Click away from the center to deactivate it. Name it "O" , that's a capitol letter O with no quotes.

Yes Kids, I know your tired but we're almost there.

We just have to tag everything and then group it and we're done. Yay! Let's start with our collision object. Select your collision object. Click on the utilities tab and then Click on the map editor which I hope you've added a button for. If not you can just Click on "more" and then select the map editor from the window. When you open the map editor you'll see the polygons tab. All you have to do here is put a check in the boxes that say "not collidable 3d" and "not rendered". Click ok.

Select the trunk. Open the map editor. Place a check in the box that says "not  collidable 2d". There's a drop down menu for surface property. Use it to select "wood". Click ok.

Press "h" and select all your branches. Open the map editor again and place a check in the box for "not collidable 2d". Click ok.

You've just tagged your branches, trunk and collision object. Wasn't that easy? ;)

Grouping

Now we group the whole shebang.

Select all of the objects. Easy way to do it is by pressing "H" , clicking "All", and Clicking select. Under the group menu, Click on group. This brings up a little window where you name your group. You need to name your tree following this format. r_<n><tree>x  where r is replaced by the room number of the map which is usually 1 for an outside room, and x is replaced by a unique name that you give it.

My outside room number is 1 and my unique name is going to be "canopy_tutorial". So the group name will look like this.    1_<n><tree>canopy_tutorial. Before you Click ok to close that window, select and copy the unique name you chose. So I select and copy "canopy_tutorial" . Click ok to close that window.

Open the map editor. Click on the general tab. In the window for LOD1: Model Name, paste in your unique name. Place a check in the box that says "cast shadows" if you want your tree to cast a shadow in your map. You won't actually see a shadow until you use the lighting tool on your map. You might notice that there's a window for LOD2 also. This is for using a 2nd low poly model to switch to in game for when the player isn't near the tree. The idea is to save on resources since the player is too far to see a lot of detail.

So that's it, congrats! You've just created a tree for GR.

Here's what mine looks like in GR.

That's it in the middle of the screen. Too small ? No Problem.

Apply an xform modifier to your original grouped tree or a copy of it. Click on the Select and Uniform scale button. Scale the tree larger on the xyz planes. Don't forget to go back into the map editor to change the LOD1 model name if you give your tree a different unique name. Using this method you can have copies of the same tree but different sizes. Here's another shot from GR of the same tree scaled bigger using the above method. You can see the original directly behind it.

 

In the next installment we will create a Fir Tree .  

 


The Fubra Group - Internet Consultancy and Hosting GhostRecon.net is sponsored by
The Fubra Group Internet Consultancy and Hosting
Images 2002 GhostRecon.net
Privacy Policy