Tackling a Thorny Challenge - trueSpace 
By Darris Dobbs
Page - 1
Return to trueSpace Tutorials Index

As a writer, my assignment for this issue was to devise a tutorial that would demonstrate how to create some type of photorealistic plant life using my chosen software platform. Since I am the trueSpace editor, I wanted to come up with a plant subject that was appropriate to the program. I decided to create a cactus garden. This may seem a strange choice given the variety of flora I could have chosen. In many ways, however, the cactus seems a fitting symbol for trueSpace. Both tend to be underrated and often overlooked by many people. They both have a somewhat unusual appearance at first glance. Just as the cactus is lacking in lush foliage, trueSpace lacks many of the esoteric features of some of the more expensive programs. But, they are also alike in other ways. Both are efficient and brilliantly engineered for their environment. Both use ingenious and effective unconventional strategies for overcoming problems. Finally, both the cactus and trueSpace can only be truly appreciated once you come to know them and understand just how well suited they are for their chosen tasks.

A Prickly Problem
We are going to begin this assignment by creating a member of the opuntias genus, better known as the prickly pear. Prickly pears are common around the world; often the fruit is eaten in Mexico and other parts of the SouthWestern United States. The most noticeable feature of these cacti is that the bodies are shaped like flat paddles. These pads are covered with evenly spaced needles. Believe me, you do not want to fall off of your horse and land in a patch of prickly pear. Take my word for it, you will not want to sit back down on the saddle.

There are a variety of ways to approach modeling this particular cactus. For this exercise we are going to concentrate on minimizing the number of polygons. This can be an important consideration when creating digital plants, since the large number of leaves and branches, or in this case needles can create a huge number of polys. The plants are rarely the focus of the scene, so it makes no sense to waste unnecessary polygons on detail that will never be noticed. You have to make the decision on a case by case basis as to how much detail to put into each plant, but if it is not going to be seen up close then use the most efficient method.

To begin crafting our first cactus, switch to top view and use the draw spline tool to create the shape shown in Figure 1. Think of it as the shape of a beaver's tail.

Switch to front view and extrude the shape you just created, using the sweep tool, as shown in Figure 2. The idea is to create a somewhat rounded profile.

All right, now we need to stand our little cactus upright. Click on the snap to grid tool to constrain movement and rotate the object ninety degrees so that it is perpendicular to the ground plane as shown in Figure 3.

Page - 2

The next step is to create a cube object and scale it to the size seen in Figure 4. This cube is going to become one of the pads to which the spines of the prickly pear are connected. Although these pads are rounded in reality, we will lower our polygon count significantly by beginning with the cube shape.

Select the front face of the cube using point edit/ faces. Next, scale this face so it is smaller. Instead of a cube the object should now be narrower at the front as shown in Figure 5.

Move the new object into position on the face of the cactus. Begin copying the object and arranging the copies in a diagonal manner as shown in Figure 6. Don't attempt to be precise in their placement. In fact, a little irregularity will add realism. Scale these pad objects larger toward the center of the cactus and smaller toward the edges.

Continue placing the pads until the face of the cactus is covered and then place them around the edges of the cactus as shown in Figure 7. If both sides of the cactus will be seen in your scene, go ahead and add pads to the backside as well. Otherwise, do not waste the polygons. Now that the pads are in place, join them to the cactus using the object union boolean tool. Finally, click on the smooth quad divide tool to round the cactus into a more organic shape. You should notice a real difference. Similar effects can be achieved by using the ThermoClay 2 plug-in or using the NURBS tool in trueSpace4. Each will give you somewhat different results. Suit the method to the project. See Figure 7.

Once we have created the prickly pear itself, it is time to put the prickly in the pear. In other words, it is time to build the spines. Begin by right clicking on the create sphere primitive tool. This will open the numeric property panel. Enter 4 for latitude and 4 for longitude. Once again, we are attempting to keep polygons to a minimum. As mentioned earlier, this can become a thorny problem. Sorry, no more, I promise. Back to the subject at hand. The spines are going to be so small that once a smoothed texture is applied, the blockiness will be unnoticed. Click on create sphere. The resulting sphere should resemble Figure 8.

The sphere we just created represents the small fuzzy tuft at the base of a cactus' needles. Apply a pale, yellowish-white color to the object making certain that smooth is selected in the materials panel. Set roughness high and shininess low, and select the wrapped rough option for displacement.

The next step is to create the actual needles. Before starting, reset the displacement to none. Then switch to Top View and click on the Draw Regular Polygon tool. Set the number of sides to 3. We are still trying to minimize polygons. By creating a 3 sided needle as opposed to a round one, we are saving a lot of polygons when you consider the total number of needles involved. Switch to front view and click on the tip tool to extrude the triangular polygon into a long needle shape as shown in Figure 9.

Page - 3

Position the needle you just created in the center of the white sphere. Next, begin creating six copies of the needle and arranging them in a star pattern as shown in Figure 10. The needles around the perimeter should point outwards at an angle of about 45 degrees. It will help if you open a second window in side view while placing the needles. Once the needles are in place, join them to the central sphere using object union. Save this new object as spines.cob. To save time, we will be using these same needles on all of the cactus we create. Although, the number, color and arrangement of spines actually varies from cactus to cactus, these will serve fine for our purposes. When you are actually creating your own cactus, however, it will be worth your while to invest a little time researching such details.

Take the set of spines that you have created and scale them so that they are in correct proportion to your cactus. Finally, begin positioning a copy of the spines on each pad of the prickly pear. Once you are done, join them to the cactus using Glue as Sibling and save the entire object. Your prickly pear should resemble Figure 11.

Prickly pear grow in a strange fashion. New ears branch off of the original cactus. Some miniature indoor varieties are known by such names as Angel Wings and Bunny Ears due to this unusual fact. Therefore, to create a larger and more believable cactus, simply copy the original cactus, scale it smaller and position the copy on the edge of the original as shown in Figure 12.

Prickly Pear cactus tend to grow in clumps. There is a good deal of variation among varieties. Often the ears are somewhat curled. The prickly pears which are found in pastures in my native Kansas have spines that attach directly to the ears without the pads and sport longer needles. I can say this with the confidence born of painful, firsthand experience. Also, during extreme droughts in Texas, ranchers have been known to take flame-throwers into their pastures and burn the needles off of these cacti to provide sustenance for their starving livestock. Likewise before eating the meat of this cactus in Mexico the locals char it to burn off the spines.

A Cactus For Music Lovers
The next cactus that we are going to create is part of a genus known as the torch cacti. This same family includes the stately Saguaro, familiar to everyone who loves Western movies. It also includes such oddities as Snake Cacti, a slender variety that grows along the ground and the Old Man cacti, whose long needles resemble rows of bushy whiskers. Our subject, however, is a variety known as Organpipe cacti. They are called this because of their unusual shape. They tend to be long and thin, growing upright in groups so that they resemble a pipe organ. Okay, so they are only vaguely reminiscent of an organ, just play along. Whatever they look like, they grow up to 20 feet in height.

Page - 4

The first step in creating the organpipe cactus is to switch to Top View and create a polygon using draw spline that resembles the one in Figure 13. Don't waste polygons on unnecessary detail, just draw six slightly rounded arms in a vaguely circular arrangement.

After you have drawn the polygon, switch to front view. Begin extruding the shape upwards as shown in Figure 14, using the sweep tool. Open a second top view window to make it easier to observe the results. Alternating layers should be scaled larger or smaller in all directions to create the rippled shape shown in Figure 14.

Rather than create an all-new set of spines, it will be easier to just reload the spines.cob object we created while building the prickly pear. Once it is loaded, begin placing copies on each projection of the current cactus. By this I mean the wider areas of the cactus as shown in Figure 15. Once again, I remind you not to bother putting the needles on any part of the cactus that will not be viewed by the audience. Placing the spines may prove difficult. Using multiple views can make this easier. Once the spines are all in position, join them to the cactus with the Glue as Sibling tool. The result is one section of cactus.

As you should know by now, good 3D artists are among the laziest people on Earth. Otherwise, we would all go get real jobs. So, if we can save a little time, by all means, let's do it. In other words, let's cheat. Fortunately, cactus are more or less modular in construction which facilitates shortcuts. Copy the current object and move the copy upward so that the bottom of the copy is embedded just inside the top of the original. Organpipe cacti grow like this, a section at a time. Repeat this process, but this time scale the copy so that it is slightly longer. The sections of the cactus grow longer toward the middle then begin getting smaller as they near the top. Continue to repeat the process until your cactus resembles Figure 16.

Once your cactus is about seven sections tall, it is time to finish it off. Select the very top face, using point edit/faces in top view. Next you will extrude this upward into a rounded shape, using the sweep tool, as shown in Figure 17. You need to make sure that this looks right in both front and side views. Pull the final extrusion down into the cactus slightly to leave a shallow depression. Check the top view to be certain none of the edges protrude through the wall of the cactus.

As you have probably guessed, these cactus rarely grow perfectly straight. In fact, they tend to curve upwards and lean slightly outward. The easy way to simulate this is to use the deform object tool. Simply create a deformation lattice with four divisions along the Z axis as shown in Figure 18. Then move and rotate the control planes to create the desired shape. To create an entire stand of these unusual plants just begin with the basic cactus that we have built and vary the size, shape and number of sections of each copy.

Page - 5

Nobody Knows My Saguaro
Our next project is another member of the Torch Cacti genus. The stately Saguaro (pronounced suh-hwa-ro) is the state flower of Arizona. Most of you will recall seeing this cactus in countless Western movies or on the cover of Arizona Highways. Older saguaros can reach up to 60 feet. Their familiar form often resembles a man with arms raised as if in surrender. Unfortunately, the popularity of these and many other varieties of cacti have made them very popular for landscaping in the Southwest. This has led to a real problem with cactus poachers. Not only has this resulted in making these cacti scarce in many areas but, but it also means destruction of habitat and disruption of a fragile ecosystem

Since they are closely related, it should not surprise you that constructing the saguaro is a very similar process to building the organpipe cactus. Start just as we did before by creating a polygon using the draw spline tool. The only difference is that this polygon will have nine lobes rather than six. The new polygon should resemble Figure 19.

We are going to be building an immature saguaro such as might be found in an outdoor cactus garden, so we will not have to worry about adding arms or branches. Switch to front view and extrude the polygon you created, using the sweep tool, as shown in Figure 20.

At the very top of the cactus, scale the top face smaller and pull it down to create a small depression in the top of the cactus. This is a common feature in most cacti as this is where the bud will appear and eventually bloom into a flower. Refer to Figure 21.

With the main body of the cactus complete, it is time to begin adding the needles again. Load the spines.cob object we saved earlier. Begin positioning copies of this object on the lobes of the cactus. You will notice in Figure 22 that the spines are placed in a diagonal or diamond pattern. This pattern is common to most cacti. Nature, with her usual efficiency has arranged them so that the cactus is completely protected using the least number of needles possible.

Our last step is to place several copies of the spines.cob object facing straight up in the depression at the top of the cactus. Place them close together so that the spheres are touching. On a real cactus this area is an uneven fuzzy spot with needles pointing outward. Your cactus should now resemble Figure 23. Glue all of the pieces together using Glue as Siblings and save the object.

Page - 6

The Mystery Cactus
The next cactus that we are going to attempt to recreate is actually a mystery to me. The model for this cactus resides in a terrarium on my desk. I know that it is a variety of Pincushion cactus, which makes it a member of the genus Mammilaria. There are a huge variety of these particular cacti, most of which come from Mexico. Although I don't know exactly what variety my little cactus is, it will nevertheless make an excellent subject. One of the basic characteristics of these cacti is that they are covered with bumps or lobes so that they vaguely resemble a pineapple.

To begin, we will create a sphere primitive in front view. Boolean subtract a cube primitive to remove the bottom one fifth of the sphere. See Figure 24. This sphere will serve as the main body of the cactus. We will then cover this sphere with the bumps or lobes.

Next we want to switch to top view. Using the draw spline tool, we will create a polygon like the one shown in Figure 25. We are going to extrude this polygon into one of the lobes that cover the exterior of the cactus.

Extrude the polygon into a volcano shape using the Sweep Tool. The resulting object should resemble Figure 26. Be certain to round the object as you near the top. Don't be overly concerned that your effort matches the illustration precisely. These lobes vary a good deal in size, shape and roundness from variety to variety and plant to plant.

Rather than cover the cactus with copies of our lobe object and then repeating the process with our spines, it will be much more efficient to simply combine them at the outset. Therefore, rotate the lobe object ninety degrees so that it matches Figure 27. Then load the spines.cob object. Position the spines on the lobe as shown in Figure 27 and combine them with Glue as Sibling. Be certain that they have a different color.

Finally, begin placing copies of the lobe object, with spines attached, so that they cover the entire cactus. Space them as shown in Figure 28. This will require quite a bit of effort and you will need to open multiple windows to be certain the lobes are properly placed. Once this is done, load the spine object again and place a number of the spines pointing directly upward at the very top of the cactus. Join all of the objects using Glue as Sibling and save the resulting object.

Now for Something Completely Different
For our final subject I have chosen something completely different. Okay, that's not true. It is not completely different, but it is not a cactus. In fact, it is a succulent. But, I should point out that cacti are succulents as well.

Page - 7

Succulents are plants that have adapted to an arid environment. They have fleshy leaves or stems for storing water and a waxy surface to prevent evaporative water loss. So what is the succulent we are going to create for our finale? I will give you a hint. It belongs to the Lily family. Give up? Our subject is none other than the aloe. Aloe is not actually native to North America. It was introduced into Mexico and the Southwest by missionaries. They prized this plant for its medicinal value. Aloe is still valued for these properties and you will find it as an ingredient in everything from hand lotion to shampoo.

To create our aloe plant we are once more going to turn to the draw spline tool. With this tool we are going to create the vaguely triangular shape seen in Figure 29. This shape is a cross section of one blade of an aloe plant.

You will need to switch to front view and open a second window in side view before continuing. Next, you will use the sweep tool to extrude the polygon as shown in Figure 30. Don't forget to watch the side view and make certain that there is a slight curve to the object on the flat side of the polygon.

To create the small teeth along the edges of the blade, create a cone primitive and scale it to size. Apply a different color to this object since it will be lighter than the blade when we texture it. Place this cone at the very tip of the blade. Then begin placing copies at even intervals along the sides of the blade as shown in Figure 31. Join the teeth to the blade using Object Union.

Rotate the completed blade so that it is at approximately a forty degree angle. Next, begin arranging copies of this blade in a rough circle. Don't worry about precision. Just arrange them in a group as shown in Figure 32.

Finally, begin arranging more copies of the blade in a smaller circle within the first circle. These blades should be rotated into a steeper angle, approximately seventy degrees. Aloe always grows in this sort of star-shaped clump. Refer to Figure 33. Glue all of the blades together and then save the object.

Adding the Final Touch
You should now have a pretty thorough grasp on the basics of cactus construction. With only the cacti we have constructed in this tutorial you could arrange a respectable cactus garden. But, unless we add a little color and texture to our creations, your garden is going to appear pretty bland.

Texturing these cacti was a piece of cake. I used the same basic approach on all of them, only varying the settings slightly between cacti. I realize some of you will be using trueSpace4 while many others are still using trueSpace3, so I will show you a quick and easy way to add realistic shading to these plants with each program.

Page - 8

If you are using trueSpace3, your best bet is to make use of the procedural textures. My choice would be to select the granite procedural. I would then set each of the colors to a slightly different shade of green, leaving one color tan or yellow. You can then experiment with the amounts until you get the right mix. I would then apply a bump map such as the orange bump that is included with the program. Give it a low amplitude and about five repeats. Because cactus tend to be somewhat waxy on the outside, you will want to set the shininess about a third of the way up the slider. The roughness slider needs to be pulled down all the way. The smoothed texture button should be enabled. This basic texture will work for all of the cactus we have created. You will only need to vary the colors and settings to suit your own taste. The color and texture of cacti in the real world is dependent on their location, the soil, the amount of moisture and numerous other variables. Therefore, there are no hard and fast rules.

If you are using trueSpace4, you will want to take advantage of the new shaders. Left click on the color shader and select layered colors from the color property panel. This setting allows you to layer up to eight different colors, textures or procedurals, assigning a different level of transparency to each.

Right clicking on the layered colors sphere will open the layered colors panel. Left click on the top space in this panel and then select solid color from the box that appears. This will set your base color. Right click on the same space to open a color selector. Choose a medium dark green as your base color.

Left click on the second space in the layered colors panel and select solid clouds from the box that appears. Now right click on the space and select two different shades of green and adjust the scaling to suit you. Now set the transparency for this texture to fifty-five percent. This means that fifty-five percent of the base color will show through this texture.

Right click on the displacement sphere and select Wrapped rough from the box that appears. Play with the scale detail and amplitude until you get the response you are looking for. Although cactus appear smooth at a distance, looking closely reveals a network of bumps similar to the texture of the skin on the back of your hand. Therefore, the key is to keep the amplitude setting low. Make certain that smoothed texture is enabled. Set the ambient light to zero. Set the diffusion to low. Set shininess low and roughness high. This should result in a believable and realistic texture.

A Final Point
I hope you found this tutorial to be entertaining and worthwhile. You never know when you are going to be called on to create a cactus. When and if that time comes, the most important thing to remember in creating a realistic cactus is that these plants lead very difficult lives. They bake in the hot sun in an arid desert, scoured by winds and sand. When it does rain, the usual result is a flash flood. They are also one of the few sources of nutrition and moisture to the variety of animals that dwell in the desert. This means that you must avoid perfection at all costs. The poor suffering cactus is not going to grow straight and tall, it is going to be bent by the wind. The surface of your cactus is going to bear the pits and scars of a difficult life, so add a bump map or textured map to simulate this. Likewise, a cactus in its native environment will not grow in a uniform manner. There will be growth spurts during the infrequent rains and times of almost no growth during the frequent droughts. So avoid uniformity and try to add as much character as you can to these hardy and unique plants.

Return to trueSpace Tutorials Index