Xfrog tutorials - vid01 - Introduction and basic objects
Xfrog Tutorials - vid01 - Introduction and basic objects
The video begins with a title, and a slide showing what subjects we will cover, most likely preceded by video of already existing trees tumble in VRAY rendered look, just eye candy for 10 sec with music. The intro, a little flashy.
XFROG stands for X-windows based Finite Recursive Object Generator.
Xfrog is not exactly fractals or L-Systems, but rather a unique approach to representing growth, form, and the processes of nature in computer graphics.
Open to the Maya interface, describe turning on the plugin, view the Xfrog shelf, and begin by opening the Xfrog Visor. Show that Visor can be inside a panel. The Maya file will already have default Sun Sky from Vray, and a simple 2m x 2m forest ground plane. Place the initial branch object. This thing is born at default size 10 cm, so scale up both curve and circle up 20x to a size of 2m just larger than average man. First thing put on a birch bark texture so it is not boring looking.
Next hit display CV's on both curves and manually show how the circle and main trunk can be deformed both by hand translating CV's, and by standard Maya deformers. Put on a bend deformer to make a fast elbow. Here you demo increasing resolution by adjusting Path and Shape smoothness, as well as showing the Growth variable and how it can be keyframed.
Inherit. By default growth, thickness, and other features are inherited from parent branch to the children, here you can disable that so child branches can control their own parameters. Also can turn Evaluation on/off here to stop the the creation at this point in the hierarchy.
- describe the Visor, put visor into a panel, speak about the 10 buttons
- place two branches, scale up to 40, child branch 2 simple tree, size
- bend branch1 with deformer, pull CV's to deform branches
- increase path smoothness to 3 to get rid of polygon edges
- slide the growth variable from 0 to 100 and describe animation
- select branch2, click the thickness and growth inherit, evaluation
Standard Curve Parameters
With this one single branch I can introduce the concept of Curve Parameter, demo this tool on Thickness to make the sharp pointy branch end as a cylinder. Explain that these curves can be edited by hand, by numerical input, by an expression, and even key framed for animated effects.
By default no curves are present, so you hit the plus sign to create a default curve, then adjust this by adding points and moving then around along the length of the branch. As soon as you create a parameter curve for branch1 for instance, that curve will appear listed in the Visor hierarchy of that object.
Edit Node Distribution and Node Growth on get branch higher and longer in areas along the trunk or branch1. Then Node Angle. Insert additional points in these curves by clicking icon and clicking middle mouse. To finish this show the page in the manual where every parameter is described with a picture.
- Standard Curve parameters, start with thickness, move points around
- increase node number, add Node Distribution, node growth, node angle
Xfrog Visor - child, head, delete, and hierarchy
Just remember, always select the child first, then target, then hit the button. Staying with the branch object, I next start showing linking branch objects together, using the Child button. Select Branch2, then Branch1, hit child, this keeps branch1 at top of hierarchy, and branch2 is distributed underneath. Scale both curves up by 20 and 50 to view them, and describe that we could do this same trick with any geometry, demonstrate with a leaf/flower object. Demo select flower object, branch2, the head button, puts a flower geo at the end of each branch. Show explicitly where this flow geometry now lives in the outliner.
Make a tourus, then select branch2, and hit child button, this will place a string or chain of donuts along each branch. Scale that original torous up to view, and note where it lives in the Visor hierarchy. Put a chrome shader on these donuts to show where they live in the Xfrog Visor.
- ungroup and display the flower, pick flower - branch2 - head, move with node Angle
- actually do Head, Shape, Child to show the difference, end with head
- create a quick torus, select, branch2 - shape, move node Angle, apply chrome, GPU render
- select branch2, Node preset Lateral, Alt perpindicular,
Multiplication tab - still inside branch
The update mesh, textures, transforms and multiplication type switches are default on and will work for most cases. If you want to create handmade variations (and not using the standard Variation object), then you could switch these off, delete your chosen meshes, and sort of break history to get the look you want.
Node Number is an important variable here that controls the maximum number of child branches that grow from the tree trunk. Keep in mind that this number of branches is also adjusted with parameters Growth, Node Growth, and Node Density.
Another fun one is Node Preset which allow you to adjust how the children are arranged along a branch, giving you choices that are commonly found in nature such as Perpendicular and Altlateral. Here you can further increase the number of children with Node Multiplicity, and you need to hit the update button after. Demonstrate this by making our branch2 hidden, and showing only the chrome torus children and how they can be adjusted. With these variables you can get specific plant shapes like pine tree or fern leafs.
Last important thing inside the Multiplication tab is Multiplication Type, which by default has xfrog generating a single mesh for what you define. If for example you wanted to have a spotlight at the head of every branch, you would set this to instance or copy, and xfrog would build copies for each head. OR, considering the flowers we have now, they are a single mesh, you could change to copy, then you would have 20+ separate flowers, or instances if wanted. Pull down select Copy, hit update, then see 20 flowers in the Visor. Everything still behaves para metrically, you now just have a number of meshes rather than one.
Show Copy and Paste inside the xfrog visor in order to make a full additional full history or LIVE copy of the original tree.
Family Curve Parameters
This collection of information allows you to swap parts of your existing hierarchy, allowing you to Free out the original Path Curve, with a new different rez or shaped and oriented path curve. To demonstrate, I will Copy Paste my full tree, and freehand draw a new high rez path curve on the ground. The steps are to select original path curve for branch1, and hit Free, the tree will vanish. Then select new path, Cntrl select branch1 to see in attribute editor, and hit red plus sign on the Path Curve entry. Using this collection of Family controls, you can mix and match the live xfrog hierarchy in any way you imagine, and make endless variations from the root level.
- show copy/paste, need to select nothing before paste, move tree to the side
- run the grow slider on the copied tree to show it is active in xfrog
- make a nurbs curve on the ground, on branch3, free the curve, tree vanish
- select new curve, cntrl click branch3, hit plus sign on shape curve
Tropism
The Tropism object allows you to define a force field that will bend curves or branches in a certain direction. This feature can replicate plant phenomenon such as phototropism where the leaves will bend towards a light source or gravitropism where branches bend downward.
To make this happen you simply select the curve of the branch nodes you want to effect, then cntrl select your empty newly created tropism object, then under Family hit the plus sign on Curve. You are simply assigning that curve to have a special tropism general bending behavior.
- select the CV's of the branch2 curve, make Z = 0 to straighten the branch
- free the flower by selecting bottom node, hit free, make poly super ellipse, select Plus sign
- create a tropism object, increase intensity curve, then adjust trunk node angle
Phyllotaxis and Hydra objects
Here we will look at two additional xfrog object nodes that can be discussed together because they are both considered multiplier nodes. The Hydra multiplies the child objects into a circular arrangement around the center of the Hydra, imagine a fan shape as a simple explanation. After the default shape you can further modify with new curve parameters such as Fan, Twist, Spin, and Node Growth among others.
The object Phyllotaxis arranges the children to be placed on the surface of a revolution which by default is a sphere, but then has specific natural curve parameters such as Orientation, Node Angle, Node Scale, and more. This Phyllotaxis object is often used to describe the arrangement of plant organs, such as seeds in a flower.
These two biology based natural multipliers are used extensively to create nature based flowers, buds, and shapes that can be found everywhere in plant life.
- push the tree back, and create three branches, assign RGB mtls
- create hydra and phylo, pick child first and create both fans, move them to sides
- Hydra, shape circle, twist, fan, scale, Phylo, only adjust and scale, on both adjust thickness
- create variation, put inside Phylo, free first branch, then re Plus sign two branches
Variation
The Xfrog object Variation is often paired up with one of these two previous multipliers in order to mix the shapes of branches that are born out of a dense Hydra object for example. Rather than just one branch replicating 90 times out in a Phyllotaxis shape, you can have 3 or more objects being created in this natural spiral, in patterns that are controlled, or random. This can be used to break up mathematically repeating patterns that can appear too perfect in computer graphics. It can also be used under tree trunk branch to have 5 different branches sprouting out just to add more variety.
For this demonstration I create new Hydra, and Variation objects, in addition to the 3 demo branches I have hanging around. Select Variation, then Hydra, then Child to put Var under the hierarchy. By default the Variation is ready for 2 children, so I must first increase child count to 3 and hit update. Then I can put all 3 child branches under the Variation node, and adjust Hydra parameters to taste, with number 50 and Sequential being very cool looking.
CurveNurbs
The main use of this CurveNurbs object is to replace the shape curve of any of your branch objects with a different form of nurbs curve which we can consider to be more of an Xfrog nurbs curve. This means it has expression control and curve parameters allowing the curve to be created step by step, and for each of these steps a rotation and translation is defined. This object replaces and improves upon the Horn component that was in previous versions of Xfrog, and it was implemented to improve the way Xfrog could replicate the natural growth process of plants. This is a more advanced object that has uses with shaping branches, and animating the grow variable in Xfrog, which I will show in a later tutorial, but here I will show you how to insert it into your branch hierarchy, or basically anywhere you want to replace a standard Maya spline with amuch more controllable Xfrog CurveNurbs spline.
First choose a branch that needs to have its Path Curve swapped out. Select that path curve in the Xfrog visor where is usually called curve8, or some number. Hit the Free button, so that curve will be outside the hierarchy, and the branch will vanish, waiting for a new shape curve. Then select your existing CurveNurbs object, cntrl select the branch, then in attribute editor hit the red plus sign at Path Curve, which will make your branch re-appear with a new or similar shape. You have basically swapped the construction curve on this branch.
In the Curve Parameter X-Rotation, hit plus sign, add an expression such as cos(u*25)*15, then adjust the curve. Bake the curve, and carefully adjust Movescale on the CurveNurbs and Growth on the branch.
default expression is id(x).
Other ones to try, sqr(x), cos(x), noise(x), U, or U*10, cos(U*25)*X, cos(U*X)*20
Comments
Post a Comment