MaxGrass 1.0.0

For Autodesk 3ds Max

Help Document

Oormi Creations

http://oormi.in




MaxGrass 1.0.0 for 3ds Max




Contents



Introduction

MaxGrass is a MaxScript for creating realistic grass and vegetation in 3ds Max, in a single click.
The script also animates the grass/vegetation growth which looks completely natural.

No plugins of any kind are needed. It does not use hair or particles, it creates real geometry, so that you get total control on each blade or leaf and the results are ideal for close up shots. Several parameters have been provided to get an infinite variety.

MaxGrass caters to a beginner as well as advanced users of 3ds Max. A beginner needs to click just one button to start off and an advanced user can customize many aspects of the grass/vegetation, such as use of custom models as seeds, custom grounds, distribution/height/color maps, various animation parameters, materials and much more.

The script also has an Environment creation function to create Sky, Sun and Clouds with correct colors depending on the Sun's position in the sky. All the renders in this help document were done with Max's default Scanline renderer or Mental Ray.

Registered users get full support and one free upgrade.



Feature List

Current version 1.0.0 has these features:

  • Single click Grass creation
  • Static as well as growth animated grass/vegetation.
  • Also creates and animates many other kinds of vegetation.
  • Grass grows in bunches and has natural bending of blades.
  • Shows live preview of the blade and a bunch as you adjust the parameters.
  • Built in seed which is highly customizable using 11 parameters.
  • Properties like bunching, bending of blades, quantity etc are supported using 6 parameters.
  • Animation is customizable using 7 different parameters to control timings, bend variations etc.
  • Custom models can be used as seed.
  • Custom models can be used as ground.
  • Animated seed model is supported.
  • Distribution map, Height map and Color maps can be used to control growth and look of the grass.
  • Face selection based and angle based distribution.
  • 8 built in Presets.
  • 7 kinds of built in materials. Custom materials can be used.
  • Saving and loading of user presets.
  • Assign or change built in materials any time.
  • Estimation of final poly count and warning for very high counts.
  • Environment creation (Skydome, clouds, sunlight) utility.
  • Free Upgrades and Support

The trial version has a limited feature set and some features are disabled in the trial.



System Requirements

Supported versions are Autodesk 3ds Max 11 to 3ds max 2014. (English Language Versions)

For satisfactory speeds the minimum recommended hardware is a CPU with dual cores and 2 GB of RAM with Windows XP.
Windows 7, 64bit with Quad cores, high end GPU and 8 GB of RAM is the preferred config.



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.


Quick Start

  1. Press the Grow it ! button
  2. You are Done !!

Its that easy.

To see the script in full action:

  1. Adjust the length, width or any bunch parameters interactively with a preview.
  2. Press the Grow it ! button when done.
  3. Or select any preset from Preset list and Press the Grow it ! button.
  4. Render the View as a still or animation.

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 Materials

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 mesh(es) and 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.

BrightGreen-01.jpg

Bright Green

GradGreen-01.jpg

Gradient Green

TransGreen-01.jpg

Translucent Green

DryGrass-01.jpg

Dry Grass


GradFlower-01.jpg

Gradient Flower 1


GradFlower-02.jpg

Gradient Flower 2

TexMap-01.jpg

User Texture


CustMat-01.jpg

Custom Material (E.g. Ink n Paint)
NoMat-01.jpg

No Material


MaxGrass Presets

If you need a particular kind of grass/vegetation, you can quickly create one using a Preset. These presets are available:

  1. Default Static : Creates good looking grass and serves as a starting point for tweaking.
  2. Default Animated : Same as above but with growth animation.
  3. Short and Dense : Creates randomly scattered short length grass with a high number of blades and no bunching.
  4. Long : Tall big grass, growing in bunches.
  5. Leafy : A kind of plant with long leaves.
  6. Veggie : Another kind of plant with more rounded and numerous leaves.
  7. Flower : A flower with pretty colors.
  8. Low Poly : Less polys for games or for distant grass.

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.

Default

Short and Dense

Long

Leafy

Veggie



Flower (with default)

Pit

Default and Veggie combined

Low Poly (~10k)



Veggie with Default and flowers


Seed Parameters

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 own animation.

Custom 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).

Your Custom Seed

Results

Animated
Animated Seed

Results

Animated with Animated Seed

Tri Count Group :

Shows the estimated poly count (triangles) of grass objects you are going to create. This changes interactively as you change the parameters.


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.

Length = 200.0 Width = 2.0

Length = 100.0 Width = 8.0

Length = 50.0 Width = 10.0

Taper1/2 and Curve1/2 : Same as the taper and curve spinners of Taper modifier. Sets the narrowness of the tip and curve of the leaf.

T1=0.0 C1=0.0 T2=0.0 C2=0.0

T1=1.0 C1=0.7 T2=0.0 C2=0.0

T1=1.0 C1=0.65 T2=0.1 C2=-3.68

Fold : Sets the angle of fold in the middle of the blade/leaf.

Fold = 0.0

Fold = +90.0

Fold = -180.0


Twist : Twists the blade/leaf along length.

Twist = 90.0

Twist = 210.0

Twist = -360.0

H and V Segments: Segments in horizontal and vertical directions. More segments means smoother geometry and more polys.

Smooth Angle: The angle of threshold of smoothing groups of polygons. Used to enable a sharp fold along the length.



Bunch Group

Parameters 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.

An 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:

Bunch 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).

BC = 15

BC = 100

BC = 300

Blades per Bunch : The number of blades/leaves that make up the bunch. So the total blades created are Bunch Count x Blades per Bunch.

B/B = 20

B/B = 60

B/B = 180


Bunch Spread: Controls how tightly the bunch is packed.

BS = 0.0

BS = 12.0

BS = 40.0

Height Falloff : 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.

HF = 0.0

HF = 0.5

HF = 1.0


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.

BA = 30.0

BA = 110.0

BA = 220.0



Bend Direction: The direction of the bending of a blade (+/- 20 degrees randomly).

BD = 10.0

BD = 45.0

BD = 90.0





Animation Group : These parameters control the animation of the grass growing.

Animate : Enabled/Disable the growth animation.

Use TrackBar Times: When checked, the animation will be from the trackbar start time to trackbar end time.

Grow From/To : You can specify the start and end times of the growth.

Grow 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 growth delays are (randomly) longer. Low values result in more or less same growth times.

GTV = 0
GTV = 50
GTV = 100

Wiggle 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.

WT = 0

WT = 5

WT = 10

Wiggle Time Variation : The random variation in Wiggle Time.

Wiggle Bend : This is the range of bend angles through which a blade will wiggle.

WB = 10

WB = 90

WB = 180

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).



Options Group: There are some options here:

Warn if > XX M Polys: Enabling it will issue a warning if the triangle count is going to exceed XX Million polys after creation.

Delete Old : Will delete the last created grass group (if any) before creating a new one. Check this if you want to try many settings without generating a pile of grass (or without having to delete it again and again)

Save before create : Can be useful, if undo is disabled and delete old is enabled. This will prevent a loss of work in case of a crash or accidental delete of your favorite grass. This can add to the creation time.

Enable 2-Sided : This will enable two sided polys during render. (same as the render dialog setting of 3ds Max).




Ground Object

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.

Terrain as Custom Ground

GeoSphere as Custom Ground

Helix Shape as Custom Ground


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).

Distribution Map

Results

Text as Distribution Map



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).

Height Map

Results

Another grass type with same Height Map



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.

Color Map

Results




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.

Selected Faces

Angle Threshold = 45.0

Face selection and angle threshold



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.


Environment

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 !

Angle = 0

Angle = 15

Angle = 60





Contact and Support

For free support, bug reports, requests or queries please contact on oormicreations@gmail.com

One upgrade of this script is free for registered users. Click on the Register button on the Help rollout to register via Email.
Full support for registered users will be provided 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

MaxGrass 1.0.0

©Oormi Creations 2014, All rights reserved.

http://oormi.in


This document was created by KompoZer . Open source and free html editor.