0% found this document useful (0 votes)
20 views14 pages

Palm Tree Generative Components Guide

The document is a tutorial by Martin Rohacek on creating low polygon palm tree models using Generative Components. It details the process of modeling unique palm trees through parametric design, utilizing random point functions and various parameters to control the shapes and features of the trees. The tutorial emphasizes the efficiency of this method compared to traditional manual modeling techniques, allowing for quick generation and export of 3D models.

Uploaded by

Daoud
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
20 views14 pages

Palm Tree Generative Components Guide

The document is a tutorial by Martin Rohacek on creating low polygon palm tree models using Generative Components. It details the process of modeling unique palm trees through parametric design, utilizing random point functions and various parameters to control the shapes and features of the trees. The tutorial emphasizes the efficiency of this method compared to traditional manual modeling techniques, allowing for quick generation and export of 3D models.

Uploaded by

Daoud
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Palm Tree

Generative Components Tutorial.

Martin Rohacek

Palm tree Generative components (Martin Rohacek)


After trying to find some useful low polygon palm
1tree 3D models on the internet (failed) I made the
decision to use Generative components and make
my own, fully controlled models.

Generative Components offers endless


possibilities, e.g. creating sets of 10 palm trees,
each one unique. This could be done manually,
creating basic models and modifying it one by
one…or, branches and trunks could be modelled
in GC using the Random Points function which
creates various orientations, lengths, branches
and trunks with variable widths.

All parameters are controlled within a defined


tolerance: palm tree height +/-, tree crown
diameter +/-, branches elevation angle +/-…etc
Typical Internet 3D models.
This script took me about one hour to get done, so
if I needed to create 10 palm trees: 6min per tree.
Some people might model this manually in any 3D
CAD application (some endless CAD enthusiasts
could use Google Sketchup and spend hours
trying to model something similar to freeform
surface) but the beauty of parametrically driven
design is the endless flexibility as each model
could be changed within seconds by any of
parameters modification.

Palm tree Generative components (Martin Rohacek)


Sketch with parameters

A,B,C – trunk curve points

Point A[0,0,0]

Point C: randomly generated +/‐ tolerance

Point B: randomly generated +/‐ tolerance

R – palm tree crown radius +/‐ tolerance

Alfa+ Beta angles: highest/lowest points


definition

D1…Dx ‐ branch endpoints defined by Radius,


Alfa +Beta angles

CD1 – palm tree branch construction line

H1 ‐ palm tree branch construction line


defined as ½ of CDx distance

Palm tree Generative components (Martin Rohacek)


Random point function (in general)

transaction modelBased 'point P'


{
feature [Link].point03 [Link]
{
Function = function (CoordinateSystem CS)

{
double X = {};
double Y = {};
double Z = {};
for (int i = 0; i < 100; i++)
{
X[i] = Random(0, 10);
Y[i] = Random(0, 20);
Z[i] = Random(0, 30);
}
Point MyPoint = new Point ();
[Link] (CS,X,Y,Z);
return MyPoint;
};
FunctionArguments = {baseCS};
}
}

This creates point cloud of 100 points

X values varies from 0 to 10

y values varies from 0 to 20

z values varies from 0 to 30

This function will result in creating 100 points, i.e. P[0] with coordinates X=7, Y=12, Z=5

Palm tree Generative components (Martin Rohacek)


1. Trunk curve
We need 3 points in order to get a nice palm
tree trunk.

Bottom point is set as[0,0,0]

Top point is set as 5m +/‐ tolerance

X[i] = Random(-10, 10);

Y[i] = Random(-10, 10);

H[i] = Random(-50, 50);

X/20,Y/20,5+H/50

These function parameters create point (X


coordinate) in range ‐10 to +10 divided by 20
as random function works with integers only,

So in this case the lowest X and Y value would


be:

‐10/20=‐0.5m and highest value


+10/20=+0.5m

And Z value would be 5m+ value in range +/‐


1m

Middle point B is generated in similar way as


top point C. Palm tree trunk curve is created
as Bspline curve by these 3 points.

Palm tree Generative components (Martin Rohacek)


2 Trunk surface
2. e Th
he trunk curve is populated with (in this case
11) points defined as Point by Param
meter
allong the curve and values as Serie es(0,1,0.1)
- this means from 0 to 1 with step 0.1 = 11
pooints equally distrributed on the curv
ve.

Profile curves are defined


P d as circles with
ce
enter located on previously
p createdd points.

Circle radius: a bit of mathematics but


C b it is
ve
ery simple in princciple: we are aiming for very
niicely scaled curvee (circle) extrusion
n along the
cu
urve (already crea ated) so what we need is a
boottom and top circcle diameter and some
s
va
alues between de erived from Z coorrdinate of
eaach point. Higher Z = smaller circle e radius.

I used
u this formula for circle radius definition:
d

(5
5-point04.Z)/50+5/100

Once circles are creeated we extrude


O e them
allong the path we already created.

Voila! Trunk done!

P
Palm tree Generattive components (Martin Rohacek))
Random point set defining branches
3. Branches ‐ endpoints
endpoints.

Used function Point by spherical coordinates

R[i] = Random(10,30);
T[i] = Random(0, 360);
P[i] = Random(-30, 10);

Spherical coordinates consist of 3 values:

Radius= randomly generated values within


defined tolerance in this case

Theta =0‐360 deg (full circle)

Phi = angle between point and horizontal


plane. 0= point on the plane, positive values=
point located in top half of sphere, negative
values = point located in bottom half of
sphere.

Only limited part of the sphere should be


populated with points in order to get nicely
shaped palm tree, in this case form ‐30 to +10
degrees.

Construction Lines from trunk top point to all


random points were created automatically
thanks to automatic replication tool in GC.

Palm tree Generative components (Martin Rohacek)


4. Branches ‐ individual coordinate systems

I am going to use opacity map technique –


applying opacity maps to the surface as this
technique provides the most efficient way of
modelling and achieving very natural looking
rendered images.

So I need to create bended Bspline surfaces


radially arranged around the top trunk point.
Surfaces should be arranged radially in
random way, be random length and have
random surface endpoints.

The best technique for this is a profile curve


swept along the path.

Path will be defined as Bspline curve starting


at trunk top and ending at the randomly
generated points around this point. This curve
should be naturally bended, so we will need
at lest 2 additional points somewhere
between the start point and end point.

First additional point will be right in the


middle, so I am going to place Coordinate
system defined as parameter (0.5) on the
curve. This provides me a starting point and
direction for the construction line providing
the first additional curve point.

Palm tree Generative components (Martin Rohacek)


5. Branches‐additional point 1

This point is defined as the endpoint of this


newly created line. Line length is defined as
¼ of the line created in step 3. This distance
can be adjusted in order to get nice bend of
the curve.

So far we have got 3 points but after I did


some testing it did not look very natural as
curves in this case look like arcs, so we will
need to add one additional point and increase
the curvature close to the trunk.

Palm tree Generative components (Martin Rohacek)


6. Branches‐additional point 2
We are going to use the same tool we used in
step 4 for coordinate system creation but
now we will use a much smaller parameter
(0.1) as we want to place this point close to
the trunk.

Once we created this point we can place line


starting from this point defined as distance
along the branch coordinate system Z
direction. Distance in this case is 1/5 of the
branch line length .

Finally we have got all 4 points we need for


the branch backbone curve.

Palm tree Generative components (Martin Rohacek)


The branch backbone curves will work as a path
for cross section swept along the path, so now
7. Branches‐construction curves and lines
we need this cross section. It will be defined as a
line at the end of the branch, parallel to branch
horizontal coordinate system.

The length of this line should be defined


accordingly to the image(we are going to use as
the opacity map) proportions, in my case 1:3.

So half of the line will go 1/6 one direction and


second line 1/6 of the opposite direction.
1/6+1/6=1/3.

Once these 2 (help) lines are done we can create


cross sections between endpoints of the
previously created two lines.

Palm tree Generative components (Martin Rohacek)


8. Final GC step: Bspline surface and 3D model export
Once the path and cross section are done – we
can simply make the last step of this exercise:
Bspline surface.

Each time we hit button “update all graphs”


Generative components will create a unique
set of random points and run the whole script
again, so each new palm tree will be unique.

Once we are happy with the current palm tree


shapes, we can hit the last button in the script,
and export the 3D model as a standard
Microstation DGN file.

This file can be referenced in assembly files


where we can just simply copy and paste this
geometry, go back to Generative components,
run the script and generate new palm tree,
export and replace DGN again, reload
reference in assembly file and copy& paste
new tree in our assembly file. Repeating these
steps we can get a set of 10 palm trees in a
matter of minutes. GC script with all the
tuning can take advanced users around 1 hour.

Palm tree Generative components (Martin Rohacek)


9. Applying maps and rendering in Microstation

Palm tree Generative components (Martin Rohacek)


Final render done in Microstation

Palm tree Generative components (Martin Rohacek)

You might also like