RenderCity! ...a radical online rendering solution from Artifice, Inc.
 
 
RenderCity Standard Built-in Radiance Tree Models  
 

Intended for experienced RenderCity and/or Radiance users:

Standard trees in Radiance octree format, ready to use with RenderCity, are located on the rendering server in the /usr/local/lib/ray directory. These are standard Radiance advanced-quality tree models, which have been standardized and documented by Artifice for the convenience of RenderCity users.

The art_tree octree names are:

     art_tree.oct preview - (a maple-like deciduous tree)

     art_sapling.oct preview - (a pinetree sapling)

     art_poplar.oct preview - (a nice deciduous tree, though somewhat sparse)

     art_oleander.oct preview - (an oleander-like flowering bush)

     art_tripalm.oct preview - (a coconut-type palm tree)

     art_palm.oct preview - (a broadleaf plant with palm-shaped leaves)

RenderCity Home   -   Radiance Technical Information   -   Radiance Gallery   -   DesignWorkshop User Gallery

Each art_tree octree is 10 feet high and the center of the trunk is located at (0,0,0). North-South and East-West dimensions are proportional to the height.

Here is a basic example of how one of the octree files can be instanced:

     void instance art_tree_01
     9 /usr/local/lib/ray/art_tree.oct -s 1 -t 0 0 0 -rz 0
     0
     0

By the way, each art_tree octree file points to another octree, which is also located in the /usr/local/lib/ray directory.


These Radiance tree models are basically just files that contain the geometry for a tree, saved in a special Radiance format called an "octree", indicated by the file extension ".oct"s.

The name "octree" has a very technical menaing, and the octree format actually has nothing to do with trees in the normal sense. Octree files are created using the "oconv" command. The oconv command uses the .rad and .mat files to create what's called an octree file. This is done automatically when the "rad" command is given. Of course, all of this is accomplished behind the scenes when using RenderCity!

The way to add the trees to your model is to create an "instance" of the tree. This instance is created within the .rad file. All the instance does, really, is tell Radiance what octree you wish to use, where to put it, and how to scale it. All of the standard art_trees have their origins located at the base of the treetrunk; and at 1:1 scale, the trees are 10 feet tall.

DesignWorkshop writes a .rad file for you when you export a Radiance Scene. So, start by exporting the .rad file for your scene normally, using the File menu Export 3D > Radiance Scene command.

Next, use a text editing program such as BBEdit to open the .rad file, and type in the tree instances after the ground polygon definition. (We put the instances near the beginning of the .rad file like this simply so they are easy to locate.)

     groundColor polygon ground
     0
     0
     12
                       30 30 0
                       -30 30 0
                       -30 -30 0
                       30 -30 0

      void instance art_tree_01
      9 /usr/local/lib/ray/art_poplar.oct -s 2 -t 5 -10 0 -rz 0
      0
      0

      void instance art_tree_02
      9 /usr/local/lib/ray/art_sapling.oct -s 0.5 -t -2 5 0 -rz 25
      0
      0

Note that each instance definition consists of exactly four lines of text. In Radiance syntax, the first line always contains exactly three words, and each of the other three lines begins with a number. The elements on each line are separated by spaces, and the number at the beginning of the line denotes how many other elements are listed in that line.

The name for each individual instance is the third, and last, element in the first line of the instance definition. The name itself is arbitrary, but each individual instance has to have a unique name. Something like "art_tree_01", "art_tree_02", "art_tree_03", etc. provides for clear organization.

In these instancing examples, the first element on the second line is the name of the tree library file being referenced. So the "art_poplar.oct" and the "art_spaling.oct" are each references of this type, defining the base tree model being instanced.

The "-s #" is the scaling factor for the instance. All the art_trees have been standardized for convenience to a height of 10 feet, so "-s 1" will produce a 10 feet tall tree instance (10' x 1 = 10'). By using "-s 2", you will get a 20-foot tall tree (10' x 2 = 20').

The "-t # # #" specifies the location of the trunk of the tree. This is a transform in in coordinate form, using x y and z. All the art_trees have been standardized for convenience so the trunk hits the ground at the world coordinates 0 0 0. Note that the direction of y in Radiance is the opposite of y in DW. So, to put a tree at DesignWorkshop coordinates of x=5, y=10, z=0, the transform for the Radiance instance would look like this:

     -t 5 -10 0

The "-rz #" is the rotation value given in degrees. So, if you wished to rotate the tree 45-degrees about its z axis, it would look something like this:

     -rz 45
When creating a row of trees in a model, you can easily vary the size (-s #) slightly, and the rotation (-rz #) quite a bit, to enhance the visual variety of the trees.

After adding all the tree instances your project calls for, check your typing carefully, and then save the .rad file.

Then, to render your scene using RenderCity, just proceed normally from this point -- upload and go! Your renderings should now include the Radiance trees you have instanced.

Give this a shot sometime at your leisure. Let us know if you run into any problems and we'll be glad to give you a hand.

Artifice Technical Support - support@artifice.com
 
We welcome your suggestions for other RenderCity accessories you would like us to support for your use.

Send this page to a friend!

RENDERCITY | DESIGNWORKSHOP | GALLERY | FREE 3D | GREAT BUILDINGS | ACADEMIC | DISCUSSION | SUPPORT | SEARCH | INDEX
http://www.rendercity.com/rendering/standard_trees.html