For Autodesk 3ds Max
Running the Script
The filename for the script is MaxGrass-100.mse
Simply drag the script file into 3ds Max. Or click on menu MaxScript->Run Script and select this script. No installation is needed.Alternatively, run the macroscript MaxGrass-Macro.mcr which will allow you to add it as a menu item or keyboard shortcut (via Customize User Interface Menu of Max)
The folder MaxGrass-100 must be copied to your default scripts directory (e.g C:\Program Files\Autodesk\3ds Max 2011\scripts) so that the menu item or keyboard shortcut works properly.
Its that easy.
To see the script in full action:
Try creating a few more times with Delete Last option checked
and Animate option
unchecked (for speed). If
you keep the last grass instead of deleting it, you can combine various
kinds of grasses and vegetation to get a more interesting scene. Each
creation produces a separate mesh and can have a different material.
Now its time to play with various
parameters to really know the power of MaxGrass.
MaxGrass provides 7 kinds of preset materials, which are standard 3ds Max materials. These materials are simple and can be picked in 3ds Max Material Editor, where you can tweak them further, and assign your own textures etc.
Select a preset
material before creating (or you
can assign a material after creating also by selecting the MaxGrass
clicking the >> button.) To
assign a material to many Grass meshes, select all those
and click the >> button. You can also assign any material available in 3ds Max.
If you choose Texture Map from the drop down, the script will prompt you to select a texture image. The names of the materials are self explanatory.
If you need a particular kind of grass/vegetation, you can quickly create one using a Preset. These presets are available:
You can create your own preset files via Save/Load Preset buttons. These save the parameters described below for future use.
Click the images to see full
size renders (1280x720) in a new tab.
If you are still not satisfied with the Presets, go ahead and unleash your creativity, tweak the parameters to get what you want.
Seed is an
object which is cloned as many times as specified to get a bunch of
grass. MaxGrass provides a built in seed object, which you can
customize using a few spinners. You can also provide your own seed
object, if you need something more complicated or if the seed needs its
Seed Group :
Pick : Click this button to pick an already modeled (and textured or animated) object from your scene. This object will now serve as a seed. For example if you modeled a flower and pick it as a custom seed object, this flower will be cloned in the bunches. If the flower is already animated as opening, the result will be many bunches of flowers growing over time as they open.
Right click on
the Pick button to clear the custom seed.
The material of the seed is automatically used for the clones. Or you can assign a built in material after creation.Its important that you place the pivot of your custom seed properly to get a bend at right place. Usually it will be at the bottom of the object. In case you do not want it to bend, you can set the Bend Angle to 0.0 (See below for description of Bend Angle etc).
Tri Count Group :
Shows the estimated poly count (triangles) of grass objects
you are going to create. This changes interactively as you change the
Default Seed Group:
This set of parameters change the size, shape and geometry of
the seed object. An interactive preview of the seed is shown in the
viewports. The parameters are
explained as follows:
Length/Width : Sets the length and width of the blade/leaf.
and Curve1/2 : Same as the taper and curve spinners of Taper
modifier. Sets the narrowness of the tip and curve of the leaf.
Fold : Sets the angle of fold in the middle of the blade/leaf.
Twist : Twists the blade/leaf along length.
H and V Segments: Segments in horizontal and vertical directions. More segments means smoother geometry and more polys.
The angle of threshold of smoothing groups of polygons. Used to enable
a sharp fold along the length.
in this group change the properties of the bunch of grass or leaves. A Bunch is a
group of seeds arranged in a circular and random way so that the ones
in middle are almost erect and long, while those on border droop/bend
and go smaller with distance from the center.
interactive preview is shown in the viewport. This is renderable but
gets deleted when you press the Grow
it! button. The parameters for Bunch are as follows:
Count : The
total number of Bunches that will be created in the scene. By default
each Bunch is randomly placed on a ground object. You can control the
bunch distribution (See the Ground Object rollout help below).
per Bunch : The number of blades/leaves that make up the bunch.
So the total blades created are Bunch Count x Blades per Bunch.
Controls how tightly the bunch is packed.
Controls the length of blades within a bunch. Higher value means, the
border blades will be smaller and will lie flat. Lower values make all
blades more or less equal in length.
Bend Angle: The maximum angle by which the blade will bend. Note that this is a range from (-X < +X). So if its value is 130 then the blades bend randomly in the range of -130 to 130 degrees.
Bend Direction: The direction of the bending of a blade (+/- 20 degrees randomly).
Use TrackBar Times:
When checked, the animation will be from the trackbar start time to
trackbar end time.
Time Variation : The growth of each blade can be started at
random times instead of all growing at once uniformaly. This gives it
a natural look. This is a range. Higher values mean that the blade
delays are (randomly) longer. Low values result in
more or less same growth times.
Time : While growing the blades wiggle around to make it look natural. This
parameter controls how fast they do so. 0 or high values will produce a
smooth or mechanical growth and low values make it chaotic.
Time Variation : The random variation in Wiggle
Bend : This is the range of bend angles through which a blade
Wiggle Direction : This is the range of bending directions a blade can take when it wiggles.
Sample Interval : This is the time interval for baking the animation. Smaller values will result in more detailed animation (and will take longer to create). Larger values will remove some detailed movements resulting in smoother animation (and will be faster).
There are some options here:
Any object(s) on which the grass can grow are called Ground Objects. Its mostly an EPoly or EMesh.
MaxGrass has a Default Ground object (Just a Plane). You can specify your own object for Ground. You can use maps to control the distribution, height and color of the grass/vegetation. These maps are image files and are mapped on the Ground object while creating the grass to get the intensity or color at a point. The blade position, height and color are then taken from the intensity or color of that point.
If the Ground is custom, it must have a UV Map in order to use these maps.
You can also specify the distribution of grass via selected faces or via angle of orientation of the faces.
You can combine all these settings controlling the distribution and height of the grass.
Pick Custom Object: Click this button to pick an already modeled object as Ground Object. Note that this object will be collapsed to an EMesh. Right click on this button to clear the object.
Use Distribution Map: Specify an image to be used as a distribution map on the ground. The grey areas get less grass and the white areas get more. Black areas get none. The total count is still Bunch Count x Blades per Bunch.You can set the map by clicking the Browse button. Right click it to clear the map. You can specify a greyscale image or a color image. In case of a color image the distribution depends on the intensity of the color. (Average of RGB values at that point).
Use Grass Height Map: This map controls the height of grass at a particular point on the ground. Grey areas get short grass and white areas get tall grass. Black areas get very tiny sized grass, almost invisible, so you may see less number of bunches than actual setting (Use a distribution map to avoid that).
You can set the map by clicking the Browse button. Right click it to clear the map. You can specify a greyscale image or a color image. In case of a color image the distribution depends on the intensity of the color. (Average of RGB values at that point).
Use Grass Color Map: This map can be used to assign a texture map to created mesh. You can set the map by clicking the Browse button. Right click it to clear the map.
Use only selected faces: Checking this option will enable grass creation only on the selected faces of the Ground object.
Angle Dependent: Checking this will enable the grass to be distributed only on faces that make an angle below a specified value with horizontal plane.
Angle Threshold: If a face has an angle with horizontal greater than this angle, it will not get any grass/vegetation. For example, to keep the grass mostly on the horizontal areas of your ground, set it to a lower value. Now there will be no grass on the vertical faces.
Use Default Ground: If no custom object is selected as a ground, MaxGrass will use a default ground plane. You can delete this plane without affecting the Grass, if not needed.
With/Length : Width and Length of the default ground.
H/V Segments : Horizontal and vertical segments for default ground. More segments are useful if you wish to use selected faces only option to distribute the grass.
This is a little value addition to the script and is very useful for quickly setting a scene.
Sun : Check
this checkbox to enable Sun. It creates an Omni light with shadow maps
and with an Inverse falloff. The color of Sunlight is controlled by how
high the Sun is in the Sky. You can also set the color by clicking on
the swatch next to this checkbox and override the auto color. Another
Omni light is also created to simulate the glow of the sky. Its
intensity is auto set based on Angle of the Sun.
Please note that you may get a too bright or too dim
light depending on the materials and sizes of objects, so you may want
to manually adjust the intensity, or create your own lights or daylight
systems. When Final Gather or GI are enabled, the renders may look
overexposed and you should reduce the light intensity. The Sky light
can be deleted when FG is enabled.
Angle : This spinner specifies the angle of the Sun in degrees above the horizon. At 0 degree it is at the horizon (Z = 0) and at 90 degrees it is exactly overhead (X=Y=0).
Sky : Check this checkbox to enable Skydome creation. It creates a hemispherical dome with flipped polys and assigns a procedural map to it. You can find that map in the material editor. There are three swatches besides this checkbox for assigning the high, mid and low altitude colors to the Sky. The Sun Angle setting will auto set the colors for you, but in case you want to override them, set the colors manually here, or after creation, in the material editor.
The Lock button : It toggles the link between Sun Angle and colors of Sun, Sky and Clouds. Click it to set everything by hand.
Clouds : Enables the cloudy/clear sky. You can tweak the clouds in material editor. They are simply the built in noise functions in 3ds Max.
Env Size : Size
of the sky dome.
Please note that whenever you create a new Environment, the old Environment (If any) is deleted !
Contact and Support
For free support, bug reports, requests or queries please contact on email@example.com
One upgrade of this script is free for registered users.
Click on the Register button on the Help rollout to register via Email.
Customization requests are most welcome. So if you need extra features in this script for your project please contact with full requirements.
This SCRIPT, MaxGrass 1.0.0, is being provided by
OORMI CREATIONS "as is" .OORMI CREATIONS makes no claims or warranties
of any kind concerning the safety, suitability, compatibility,
performance and durability of this SCRIPT. There are inherent risks in
the use of any software, and you are solely responsible for determining
whether this SCRIPT is compatible with
your equipment and other software installed on your equipment. You are
also solely responsible for the protection of your equipment and backup
of your data, and OORMI CREATIONS will not be liable for any damages
you may suffer in connection with use of this SCRIPT.
©Oormi Creations 2014, All rights reserved.
This document was created by KompoZer . Open source and free html editor.