Tutorial: Trees Last edited 1 year ago2022-09-01 12:51:49 UTC

I don't think trees were ever used in the original Half-Life, but it is possible to make them, in any of several ways. So here we go...

Sprite Method

This is the method employed by Neil Manke for the mod They Hunger. Actually, it wasn't the only method he used, but it's the most noticeable, because of the strange effects it can cause. In fact, it's virtually the same method that games like Doom used to produce trees (and everything else as well). All you need to do is place an env_sprite somewhere in your map, and set it up to use a sprite representing a tree. Of course, this means you need a tree sprite in the mod's sprites folder, because there aren't any that come with the game.

This method is quick and simple, and it was spiced-up a bit in They Hunger by covering the area of the sprite in a trigger_multiple, which triggers a rustling leaf sound whenever the player moves through the 'tree'. The main disadvantage is that the tree follows the player, so that its centre is always facing the player. This means that walking up to the tree and looking down makes the tree look like it's parallel to the ground. But you save on r_speeds...

Plate Method

That's not a very good name, but I can't think of any other way to describe it. This is a better method than the one above, and it too isn't very difficult to create. All you need is a couple of 'plates', covered in the '{blue' texture. Then cover each big (non-edge) side in a foliage texture (you'll need to provide your own; there are none in the original Half-Life install). The plates should bisect each other at right angles in the top (x/y) view. Then turn the plates into a func_illusionary, and make its Render Mode Solid and FX Amount 255. Being illusionary means it's not solid, and the rendering settings make all the blue parts transparent.
The Plate TreeThe Plate Tree

Stacked Foliage Method

This one can get quite ugly looking, but probably produces the most interesting results. All you need is a trunk, and several 'plates' placed near the top. As with the method above, you should make the plates using the '{blue' texture, then apply a custom foliage texture to the top and bottom. This time the plates need to be facing the top - (x/y) view, so the foliage texture should be a top-down view of a layer of branches and leaves. You can then rotate and manipulate each layer to create some randomness, and finally do the func_illusionary stuff, discussed above.
The Stacked Foliage TreeThe Stacked Foliage Tree

Brush Method

The brush method is probably the least realistic and could be the most problematic, but it would do fine for 'shaped' trees and hedges etc. This time you don't have to use a custom texture, because you should be able to find one in the original PAK that looks okay. Create the foliage as a cube, cylinder or spike, then sculpt it using the carve and / or vertex manipulation tools so that it resembles a rounded tree. Don't go too far though, because r_speeds will go up, and the chance of problems appearing will increase.
The Brush TreeThe Brush Tree
There's no example map with this tutorial because the tree textures I used are not mine, but the pictures shown above should help you build your own trees from scratch.


Commented 14 years ago2010-01-24 03:39:23 UTC Comment #100503
Ah, But there is another way.

There is also the model trees. It was introduced in DoD.
Commented 14 years ago2010-03-08 07:13:48 UTC Comment #100504
yes there's model method, and also mix model+sprite like in cs_industrywest.
Commented 5 years ago2018-05-08 19:51:54 UTC Comment #100505
brush trees remind me "thief".

You must log in to post a comment. You can login or register a new account.