AECbytes Tips and Tricks Issue
#40 (March 23, 2009)
Growing Grass in 3ds Max Design 2009
Book & Video Author
It has always been a challenge to render convincing 3D grass in a reasonable time-frame with most visualization software. Designing a realistic grass material is not the problem; it's the grass geometry that's the big challenge. Modeling myriad blades of grass invariably blows the polygon count through the roof and consequently slows rendering to a crawl.
As is so often the case in AEC, we rely on the trickle down of innovative software technology from the Media & Entertainment field to make our visualizations look ever more life-like. Enter Hair and Fur. Since 3ds Max 8 (circa late 2005), there has been a built-in modifier designed to represent life-like hair and/or fur for 3D characters—which you can even style with hairbrushes! Most in the AEC space wouldn't give this modifier a second thought, and indeed when the AEC-specific Autodesk VIZ existed (it was discontinued in 2008), it didn't contain Hair and Fur. This tutorial shows you how to adapt the Hair and Fur modifier to grow realistic grass in 3ds Max Design 2009.
Grow a Patch of Grass in the Greenhouse
The first thing to do with Hair and Fur is experiment. The goal is to get a small test patch of grass to look the way you want it to look before trying to turn vast swaths of landscape into lawns. Launch 3ds Max, and create a plane primitive. Switch to the Modify tab of the command panel and apply the Hair and Fur modifier to the plane. Hair and Fur is a special modifier that is actually a post-processed render effect. This is the secret of why Hair and Fur doesn't blow the polygon budget and why it's rendered so efficiently.
Without changing anything, do a test render to see what Hair and Fur does by default. The plane renders quickly and then the hair gets rendered afterwards in a post-process. I'd say it's more hair than fur, but we have a long way to go to turn this into grass.
Open the Material Parameters rollout. Hair and Fur is quite unusual in how it handles materiality in the modifier itself (you don't use the Material Editor for the grass at all). One exception is the material of the plane itself. If you plan to grow a patchy lawn, you will need to assign a soil material to the landscape surface itself. We're hoping to mostly cover the soil with grass and grass shadows, so choose a green object color for the plane.
Change Tip Color to light green and make Root Color slightly darker. If you like, select a Mutant Color (I chose tan) and set the Mutant % to some small value (say 5%). This will make a more variegated lawn appearance. Grass is nowhere near as shiny and glossy as human hair. Drag the Specular spinner way down and widen the highlights by decreasing Glossiness somewhat.
Do another test render and you will see that you now have green hair. This might work well if you are shooting for an unkempt lawn look, but we'll mow a more manicured lawn.
Expand the General Parameters and Frizz Parameters rollouts. Hair and fur tend to be much more frizzy and kinky (yes, there is a Kink Parameters rollout, but it's not kinky by default) compared to grass. Change the Frizz Tip angle from 130 to 30 so the grass won't frizz over so much.
Decrease Hair Segments from 5 to 3 so the math will be that much simpler and post-processing faster. You would need more segments if the grass was long and blowing in the wind (note that you can animate grass). Set Scale to 25—it's better to decrease the Scale parameter than Cut Length. Scale makes the whole grass blade smaller from root to tip and Cut Length chops off the tip. Set Root Thick to 5 and Tip Thick to 3 to make a thicker but still-narrowing typical blade.
Set Hair Passes to 1 to greatly accelerate the post-processing. Increasing this value makes the strands translucent and is more appropriate for folicles of hair than blades of grass.
Whenever you make substantial parametric changes, do another test render. As you can see, we're getting closer but grass coverage is still a bit thin.
Open the Multi Strand Parameters rollout. Set Count to 5 to create tufts of grass. Initially these new strands are all coincident, so it's necessary to splay them outward from each other.
Looking at the real-time display in the viewport, increase Root Splay a small amount (I used 0.07) and increase Tip Splay a little more (0.4 here). In the viewport, you can see splines move apart at their roots and tips, creating many tufts of grass. Set Randomize to 0.3 to make it all look more natural.
Do another test render and now we're really getting somewhere. Let's call this good enough for project work and save the file as Grass.max.
Seeding Grass in your Projects
Now that you've become a successful gardener (albeit virtual) you can dig right in and green your architecture and project landscapes. I'll show you one more technique that gives you god-like global control over all the grass in the project.
Open your project model in 3ds Max. Choose File > Merge and select Grass.max. Select the plane object and merge it into the scene. Right-click on the Hair and Fur modifier in the modifier stack and select Copy from the context menu. Select a surface that you'd like to seed in your project. Right-click in the modifier stack and choose Paste Instanced. Repeat this process on all the surfaces where you'd like grass to sprout. Now that you've made instanced grass everywhere, you can control it all from any one object containing the Hair and Fur modifier. If you want one particular object to get a different style of grass, then click the Make Unique button in the stack to give it independent control.
Do a final render and enjoy the green architecture.
The above design is by Drew Wilgus who won the Design Your Dwelling competition hosted by Dwell magazine and Google Sketchup last summer. This model is in Google's 3D Warehouse.
About the Author
Scott Onstott has a degree in architecture from UC Berkeley and worked in several prominent architecture, engineering, and interiors firms in San Francisco. In addition, he taught AEC software to thousands of students at several Bay Area universities.
Scott has written and edited scores of books, magazine articles, and video tutorials. He can be reached via ScottOnstott.com.
If you found this article useful and have not
yet subscribed to AECbytes, please consider
doing so. Subscription
is free, and more subscribers will allow this
publication to provide more of such content
Tricks > Growing Grass in 3ds Max Design 2009 >