Contents
In this tutorial you will learn how to work with libraries of procedurally generated 3D plants in Grasshopper and render them with Thea for Rhino. You can use this workflow to replace the parametric tree with a tree from a 3D library for all of the planting exercises in this course. Xfrog is software for procedurally generating 3D plants based on processes such as branching, spiraling, and gravity. It has been used to generate large libraries with thousands of plants. This tutorial uses a European Aspen from the XfrogPlants Europe 3 library and a Ryegrass from the XfrogPlants Agriculture library. Download the Grasshopper definition for this tutorial.
In Rhino models from Thea libraries (.lib.thea) are imported as blocks. Blocks are a way to efficiently work with repeating geometry, while keeping file sizes small. A single block definition describes all instances of the block in the file. So when a 3D tree is imported as a block and copied multiple times, the geometry is only defined once. Use the extended geometry parameter from the plugin Elefront to work with blocks – such as 3D trees – in Grasshopper.
First in Rhino install a Thea library with 3D plants,
then import a model of a 3D tree from the library.
The model will be imported as a block.
Place the block at 0,0,0
– the origin of your scene.
If necessary move the block on the z-axis
so that the roots are just below the World XY plane.
TheaInstallLibrary
TheaImportModel
In Grasshopper add an extended geometry parameter
from Elefront
to your canvas.
Right click, select set one extended geometry
,
and pick the block in Rhino.
Now you can work with the block in Grasshopper.
Before you can render the results,
you will need to bake them.
Model a small circular region of ground for your tree and grass. First generate a circle, then create boundary surface from the circle, and extrude the surface to form a solid.
Bake the solid to a new layer named ground
in Rhino
using the
bake objects
component from Elefront.
Define the new ground
layer for the baked object
by connecting a panel to
Define Layer
and
Define Object Attributes.
Click Activate
to bake the geometry to the new layer
and then add a Thea material.
Randomly place a tree in the circular region.
First create a random point on the boundary surface with the
populate geometry
component.
Try changing the seed to get a different point.
Then move
the block with the tree to the random point.
Define the motion vector with
vector2pt
with the origin 0,0,0
as the base point
and the random point as the tip point.
Bake the resulting block to a new layer named tree
with
bake objects.
Randomly place a tree in the circular region. First create hundreds of random points on the boundary surface with populate geometry. Then move the block with grass to the random points.
Randomly rotate and scale the blocks.
Bake the resulting list of blocks to a new layer named grass
with
bake objects.
Photorealistically render the scene with Thea for Rhino.
In the Thea panel of the sidebar
turn on soft shadow and uniform illumination in the environment tab
and sync the resolution with the current Rhino viewport in the camera tab.
Add lighting such as the
sun
to the scene.
Add a material from the Thea Content Browser to the ground.
Then open Thea Darkroom, set production mode, and start rendering.
When the rendering finishes,
adjust the settings
and then hit save image
to export a .png
.