In this article we will talk about different ways to create trees. We will use the following entities:
Creating a realistic tree in CS is quite difficult. The key to success is the selection of high-quality tree textures. The first way to create trees is based on the use of an object
func_illusionary. As you know, you can freely pass through such an object, in addition, if you use a texture with a mask (with blue parts), you can make these parts of the object transparent. It is these properties that we will use.
The picture below shows the wood texture we will be using.

Let's build a brush with dimensions of 224 units in height, 128 units in width and 1 unit in thickness and place it perpendicular to the ground, as shown in the figure below.

Let's turn this brush into func_illusionary and set the following display parameters:
Render Mode — Solid;
FX Amount — 255
Thanks to these parameters, the blue parts of the texture will be transparent in the game, so only the crown of the tree will remain.
Now let's copy func_illusionary and insert it perpendicular to the first object (see figure below).
Thus, we have a rather nice tree :) You can also add branches, turning them at an angle of 45° to the main crown. The only thing we're still missing is the barrel. Let's make it using a tool Block and its functions Spike. In the "New objects" panel, in the "Objects" list, select the function Spike, indicate the number 8 in the "Faces" line (number of sides) and build a brush in the center of the tree measuring 256 units in height and 7x7 units in width and thickness (see figure below).

Let's turn the trunk into func_wall, so that it does not break the ground into a large number of polygons (you can read more about this in the chapter on R_speeds). We additionally placed 4 more such trees on our test map. To prevent them from appearing similar to each other, we rotated them at different angles.
In the game, our small garden looks like the picture below, on the right:

In the same picture, on the left, you can see other trees (palm trees). Now we will talk about how they differ from the trees described above.
The difference is that palm trees are not objects func_illusionary with tree textures applied to them. These are pre-made tree models saved in files with the extension *.MDL. The archive with our test card contains one tree model (palm tree). To run the map you need to copy the tree model to the directory cstrike/models..
And now let's talk about how to insert a tree model or any other model onto a map.
A point entity object is used to insert models cycler or cycler_sprite. Just insert such an object in the desired location on the map. In properties you must specify the path to the file *.mdl with the required model. If the object is used cycler_sprite, which is actually intended for inserting sprites (*.SPR), then in the properties, where the model name is indicated, you must first register *.*to display all file types, not just *.SPR. Then select the desired model.
In our case, the properties of the object cycler look like this:
Model — models/tree_palm.mdl
That's all the properties.
By the way, use the object cycler_spriteperhaps even better than cycler, because in this case, black and white blood will not spill out from the MODEL when shooting at it (sometimes there is such a thing), as happens when the model is inserted by an object cycler.
Since CS 1.6, we can use models that have masked textures (the blue parts that are transparent in the game). Now the trees look good and can even have animation: sway in the wind.
trees.zip [116Kb] - in the archive there is an example map in BSP and RMF formats, as well as the necessary models and textures.
The picture below shows the wood texture we will be using.

Let's build a brush with dimensions of 224 units in height, 128 units in width and 1 unit in thickness and place it perpendicular to the ground, as shown in the figure below.

Let's turn this brush into func_illusionary and set the following display parameters:
Render Mode — Solid;
FX Amount — 255
Thanks to these parameters, the blue parts of the texture will be transparent in the game, so only the crown of the tree will remain.
Now let's copy func_illusionary and insert it perpendicular to the first object (see figure below).
Thus, we have a rather nice tree :) You can also add branches, turning them at an angle of 45° to the main crown. The only thing we're still missing is the barrel. Let's make it using a tool Block and its functions Spike. In the "New objects" panel, in the "Objects" list, select the function Spike, indicate the number 8 in the "Faces" line (number of sides) and build a brush in the center of the tree measuring 256 units in height and 7x7 units in width and thickness (see figure below).
Let's turn the trunk into func_wall, so that it does not break the ground into a large number of polygons (you can read more about this in the chapter on R_speeds). We additionally placed 4 more such trees on our test map. To prevent them from appearing similar to each other, we rotated them at different angles.
In the game, our small garden looks like the picture below, on the right:

In the same picture, on the left, you can see other trees (palm trees). Now we will talk about how they differ from the trees described above.
The difference is that palm trees are not objects func_illusionary with tree textures applied to them. These are pre-made tree models saved in files with the extension *.MDL. The archive with our test card contains one tree model (palm tree). To run the map you need to copy the tree model to the directory cstrike/models..
And now let's talk about how to insert a tree model or any other model onto a map.
A point entity object is used to insert models cycler or cycler_sprite. Just insert such an object in the desired location on the map. In properties you must specify the path to the file *.mdl with the required model. If the object is used cycler_sprite, which is actually intended for inserting sprites (*.SPR), then in the properties, where the model name is indicated, you must first register *.*to display all file types, not just *.SPR. Then select the desired model.
In our case, the properties of the object cycler look like this:
Model — models/tree_palm.mdl
That's all the properties.
By the way, use the object cycler_spriteperhaps even better than cycler, because in this case, black and white blood will not spill out from the MODEL when shooting at it (sometimes there is such a thing), as happens when the model is inserted by an object cycler.
Since CS 1.6, we can use models that have masked textures (the blue parts that are transparent in the game). Now the trees look good and can even have animation: sway in the wind.
trees.zip [116Kb] - in the archive there is an example map in BSP and RMF formats, as well as the necessary models and textures.
Instead of func_wall must be used func_illusionary
. Let's set exactly the same display parameters. The only thing that still needs to be done is to place it in front of the grille
CLIP brush (regular brush, painted on all sides with a special texture CLIP). This must be done because through func_illusionary the player can pass freely, and
CLIP brush will not allow you to do this (see figure below). CLIP brush Usually they are made the same size as the grate, but this is not important, the main thing is that the player does not get through :)





Perhaps the author of the map specifically wanted to make such a feature, but this is in this particular case, and so, usually, the box is not brought to the ground by 1 unit, in order to reduce the parameter r_speeds, which shows the number of polygons drawn by the game engine. If the box is a regular brush (not an entity object) and is in contact with the floor, then the floor will be divided into smaller polygons, which will increase their number and, accordingly, the parameter r_speeds.





