Power tips for Xfrog users
Get more from the $399 vegetation-generation software included on the disc for 3D World issue 134 with Jan Walter Schliep’s expert tips
Recreating natural patterns like the branches of a tree or the petals of a flower can be a daunting task. But issue 134 of 3D World makes it simple.
On the disc, you can find a full commercial copy of Xfrog 4 for Maya (Win/Mac; requires Maya 6.5, 7 or
and a trial edition of version 5. The licence key printed in the magazine enables you to save $100 when you upgrade to this latest version of the software.
The magazine also includes artist Jan Walter (‘Walli’) Schliep’s tips for smarter, trouble-free workflow in Xfrog. Walli has kindly provided some extra tips for us, which you can find below. (Note: the screengrabs are taken using version 5 of the software and Maya 2011.)
Click here to buy issue 134 online (Oct 2010)
Click here to visit Xfrog online
1. USING THE VISOR
All work you have to do on Xfrog objects should be done inside the Xfrog visor (visible at the bottom of the screengrab above), especially if you want to delete or add something to a Xfrog hierarchy.
The left column of the visor shows the content of the scene, similar to the Outliner. The middle column shows Xfrog-related objects only. The right column displays the resulting polySurfaces.
If you want to delete or free a component, use the according button inside the Xfrog visor. Xfrog 5 offers some additional controls that will speed up the work flow (Copy and Paste).
2. WHERE IS THE TOP OF MY TREE?
This is one of the most common questions asked by new Xfrog users. It arises so often that Xfrog Inc. should consider printing a warning on the DVD case!
Xfrog offers two different types of connections: a multiple link (a parent branch will create many child branches) and a simple link. In this case one branch component is set on top of another. An example would be a stalk made of a branch object with a bud set on top of it.
Try this: after loading the Xfrog plugin, create two branch components. I renamed them to BranchParent and BranchChild_on_top. Select BranchChild_on_top, [Ctrl]-select BranchParent then press the Head button inside the Xfrog4Maya Control Center.
The child branch is assigned as Head object and should be visible on top of its parent – but it is not. (If you want to compare, click the Child button instead of the Head button. In this case, the child object is visible.) So where the top of our tree? I have heard many wild speculations, but the solution is rather boring: our BranchChild_on_top object simply has not been grown yet.
To understand this, select the parent object and take a look at its attributes. Go to the Node Growth parameter and click the little plus sign. Click again to open the Node Growth control curve. When you take a look at the Point Parameters Visualization you will notice that the curve starts with a value of 50% at the left and then goes down to 0% at the right.
This means that children at the base receive a growth factor of about 50%, whereas children in the upper regions receive less. The rightmost control point specifies the amount of growth which is passed to the child objects on top of the parent – currently set at zero.
Select the rightmost control point of the parent Node Growth curve and drag it upwards. Voilà… nothing happens. But it isn’t aliens, stealing the tree on top. It’s just another parameter.
This time, take a look at the Thickness control curve of the parent component. You will notice that the rightmost control point is set to 0%. This zero thickness at the tip of the parent is also passed on to the child object. Drag this control point upwards and the tree on top will finally appear.
It is important to understand that Thickness and Growth are passed from parent to child. Zero thickness of the parent will result in zero thickness of the child object. The same is true for the Growth parameter.
Of course, there’s also a simpler solution if you need a tree on top: select the child object and go to the Overall attributes. If you want Thickness and Growth to be independent from the parent, just turn off Growth Inherit and Thickness Inherit.
3. MATHS IS FUN
The most common response to which will be: “Not really”. But even if you don’t like maths, it can save you a lot of time in Xfrog work, if used well.
All Xfrog parameters controlled by curves offer an expression field. By default you will find the expression id(x) which means the input of the control curve is directly used.
Try this: add a Branch component, then go to the Thickness parameter and click the red plus icon to create a control curve. Click a second time to open the curve. Enter sin(u*6.28) into the Expression field. You can see the result in the 3D view. If the shape is too coarse, select the branch object and take a look at the Overall section of the attributes and increase the value of Path Smooth.
Now replace the equation with x or id(x), add some control points to the curve and create a shape you like. Then replace the equation with x+sin(u*6.28*10)*0.2. This time, we are controlling the overall shape with the control curve (x) and adding a sine curve on top (+sin(u*6.28*10)*0.2).
The interesting part of this equation is u. Think of it as gradient or ramp, returning values between zero (the base of the branch) and one (the top of the branch).
4. MORE FUN WITH MATHS
Two very helpful functions are i and n. i is the iteration number, so the first child returns i=0, the second i=1, and so on. n returns the total number of children.
Try this: create a Branch component and a Xfrog CurveNurbs. Open the hierarchy of the Branch object and delete the default curve – we want to use CurveNurbs instead.
Select the CurveNurbs object, [Ctrl]-select the Branch and go to the Family settings in the Attribute Editor. Click the red plus icon of the Path Shape parameter. The CurveNurbs is now used to create the path for the branch.
Add a Phyllotaxis component to the scene: this is a multiplying object. Select the Branch, [Ctrl]-select the Phyllotaxis and click the Child button of the Xfrog visor. You should get a spiky shape.
Now select the CurveNurbs, click the red plus icon of X-Rotation, click a second time to open the curve and add the following to the Expression field: i/n. The spikes in the upper area still should be straight, but towards the base the spikes should start to turn upwards. This is because i is increased from spike to spike.
I am dividing this by n to normalize the output, since n is the maximum number of children. If you used the default Phyllotaxis, this should be 50. (To be precise, n equals 50-1, because the iteration starts with zero and not with one. So the first spike uses X-Rotation = 0/49 which is zero and means no rotation; the last spike uses X-Rotation = 49/49 which results in a constant rotation.)
If you want to strengthen this curvature, you could multiply the equation by x and control the strength with help of the control curve. The expression could look like this: x*i/n. Raise at least one of the control points and view the result.
5. GOING FURTHER
Xfrog 5 offers many more functions. You can find a list inside the manual. The screenshot above shows some simple examples. The best thing to do is to play with those expressions and see what happens. Usually they don’t bite, but of course I can’t take any responsibility…
6. VARIATION OR ALTERNATE?
Xfrog 4 and above offer a component called the Variation object. Let’s say you use a Phyllotaxis to distribute petals. All the petals would look the same, so the result would be rather artificial. With the help of the Variation object, you could create two or more petals which would then be arranged by the Phyllotaxis.
Xfrog 5 offers a new feature called Xfrog HD. Press the red plus icon of Generate alternate. You just created an alternate control curve. Offset specifies which of the children make use of the alternate curve. Alternate contains the link to the additional curve. You can create as many alternate curves as you want to.
So when should you make use of Generate alternate instead of the Variation object? I think it´s a matter of taste, but especially when you want to gain direct access to a specific child object (or to a group of children). Enter the desired child into Offset (use its iteration number), or a comma-separated list. It is also possible to access a sequence: 0*1*10 would select the first ten children (start with iteration number 0, step size of 1, do 10 steps).
7. AVOIDING PREMATURE AUTUMNS
Autumn is a beautiful season, but sometimes, your client will insist on a summer look to your 3D vegetation. Yet no matter what you try to do, your trees always look barren. Even when increasing the Multiplication value of the last branching level, only few leaves show up, especially at the tip of the tree. Xfrog developers must love autumn and winter.
But that´s not the reason – again we have to face the attack of tree-loving aliens, this time robbing our leaves. To bring them back, we have to remember that Growth is passed from parent to child to grandchild. Mostly, you use a Node Growth curve with lower values at the tip. The children also make use of a similar curve and this builds up until no leaves (or even branches) are generated in the upper areas of the tree.
To fix this, we have to work on the Node Density parameter instead of just upping the Node Number values. Think of Node Density as correction parameter. If you don’t get enough child objects because of a Node Growth curve, use roughly the inverse curve inside Node Density to counteract it.
The screenshot above shows this in action. The Node Number values have not been changed: only the Node Density parameters of the trunk and of the first branching level have been adjusted. Node Density of the trunk will affect the number of grandchildren produced by the first-level branching. So the parameters Node Number, Node Growth and Node Density all work together.
Click here to buy issue 134 online (Oct 2010)
Click here to visit Xfrog online
Click here to visit Jan Walter Schliep’s website
Posted on Friday, August 27th, 2010 at 9:00 am under Technique, Tutorials. You can subscribe to comments. You can leave a comment, or trackback from your own site.

















