Video: Painting grass, shrubs, and 3D geometry

Grasses and other shrubs, detail meshes, are an important part of terrain along with the trees. What they let us do is ground those trees. Right now I've got, well, trees in a barren landscape and I could use to flesh it out, especially down by the edge of the pond. So, it really looks lush and natural. I'll bring in some grass assets and then start to paint them in, much like I painted in the trees. What I'll do is go into my Standard Assets. Right-click and choose import package.

Interested in game making? Start in Unity—a game engine for mobile and desktop games and real-time simulations. Author Adam Crespi shows techniques used in game development with Unity and introduces the basics of scripting and game functionality. First, learn how to import models and textures, organize your project and hierarchies, and add terrain, water, and foliage. Next, Adam explores how to use lighting to bring the game to life, and add rendering, particles, and interactivity. The end result is a sample game with a lush environment, fully animated characters, and some basic interactive gameplay.

Painting grass, shrubs, and 3D geometry

Grasses and other shrubs, detail meshes, are animportant part of terrain along with the trees.What they let us do is ground those trees.Right now I've got, well, trees in a barren landscape and I coulduse to flesh it out, especially down by the edge of the pond.So, it really looks lush and natural.I'll bring in some grass assets and then start topaint them in, much like I painted in the trees.What I'll do is go into my Standard Assets.Right-click and choose import package.

And I'll pick Terrain Assets.These are some standard terrain assets that ship with Unity.You could always make your own grasses and I'd highly encourage that.This way, you can have your own custom made pieces that really match your world.We can also customize and randomize these somewhat in the editor,allowing us to add variation across a field of like grass.What I'll do is to uncheck all the items here.I'm going to avoid the palms and avoid some ofthe rock and cliff because I've already put that in.What I'll bring in though, are my two grasstextures here, checking both and standard terrain assets grass.

I'll leave off the cliff, leave off the good dirt, and leave off theterrain textures of grass hill because that'sactually a flat grass that we paint on.Lastly I'll check grass and rock.This'll help give me a little bit of camouflage underthe grass instead of grass coming down to just bare dirt.I'll click Import.I have yet another new folder in my standard assetsand it's called Terrain Assets, and this has my grasses.I'll take a quick look at what these are before I start using them.When we look in the terrain grass we can see Grass 1 and Grass 2.

And each one of these as we can see in the preview window is grass and it hasan alpha channel, and the grass color has beenextended out and mats that grass against that alpha.That way we don't get a halo in the grass of black or white, or another color.That way the grass fades to transparent, especially in fine detail.It does so against that green that it is its color, and so it looks correct.If you'd like to see how these look, youcan also check out the alpha channel in the preview.Clicking on the button to switch between color and alpha, andthat's actually the shape of the grass we're going to use.

Grass two is similar.A little more of a solid reed versus kind of a thin grass.And again, its alpha channel is pretty concise, but it's matted againstits own green, so it looks correct when it anti-aliases against the alpha.And now I'll paint some grass in.I'm going to go in and select my plane, which is my stand in lake.Press F to focus and then zoom in on it.And when we paint in grass, it wont show up unless we're closeenough, so we need to make sure we zoom in and paint accurately.I'll go into the terrain and then into the terrain script.

I'll click on the paint details tool In here, like with our otherterrain objects, we have a selection of brushes and we can add in detailobjects to paint in, so if you'd like to have multiple species of grass,for example, or grass and mushrooms or something similar, you can add those in.I'll click Edit Details and add a grass texture.In my Add Grass Texture, I need to assign a texture to itand I'll pick one of the grasses that I had just brought in.I'll click on the button for Choosing The Detail Texture and in myAssets here in the Select Texture2Ddialogue, I'll scroll down and there's grass.

I'll start out by picking the first grass,close the dialogue, and look at the parameters.We've got a minimum and maximum width and height, a noisespread, and a healthy and dry color, and the option to billboard.Billboard for us, means that this will alwaysface the camera and so it'll always look full.It's still just a plane, but it'll look a little more volumetric.I'm going to bring up the max height to let'ssay three, so the grass really has some range to it.I'm going to make this healthy color a little bit dimmer.

We'll see that if we paint the grass onwith this really screaming neon, it'll be far too bright.I'll click that healthy color and back off that colora bit, pulling it down and grading it out slightly.I'll leave the dry color alone and see how itlooks, and then click add to add that grass in.My detail meshes will show up here in the detailsection and I can pick and choose what to paint on.I'll zoom in on the lake edge and start to paint in some grass.We can see that that grass gets very, very full veryquickly, so I'm going to pull it back just a little bit.

I'll undo that paint stroke and pull back the opacity.My brush size is nice and small, and I'll pull back the target strength as well.Now stroke in some of the grass, andI've got some obvious bare spots, which are okay.I'll fill in the grass around the lake and I cancome back later and erase grass, much like I was erasing trees.I've got a really good variation here between the two colors between thatyellow, dry color, and the nice dark green alive color, or bright color.I'll paint in my grass, zooming in to make sure it looks good.

I'm going to leave some areas unpainted and paint up some of the hillshere and there, letting some of the grass disappear in depth in the view.I'll paint in some grass down at the lake,and pull back that brush size even more, justfilling in the edges, as if it was niceand full where the water seeped into the soil.This is a section that's more of a clearing andso I'll bring up that brush size and really grassify it.That's a highly technical term.And now I'll give it a quick test play before I start editing the grass.

Along the way, I also need to take outsome trees that got submerged in the water accidentally.I'll play first and see how this looks.I've hit Play and I'm inside the bright, blown out exterior.Dashing through a wall and falling down onto the water surface, I can see that thegrass seeps into the water very nicely andeven has its own wind that waves it gently.And this way it doesn't look exactly static therefore a little bit odd.It looks good, the grass comes into view as we get closer.So I definitely need to make sure I've got somecamouflage in the surrounding soil so it's not just brown.

I like how it's looking.I like how there's bits of soil poking throughand the color really varies as does the height.It's definitely rolling fields and trees beyond, and as I go around walking onthe water I see that the trees recede occasionally and there's more of a meadow.I'll stop playing and do some erasing really quickly.I'll zoom in first, switch over to the trees, downsize that brush,hold Shift, and take out the trees that accidentally grew in the water.Now, go back to the grasses; my detailed meshes, and add onemore in, editing details, adding inanother grass texture, choosing the other grass,cranking up the max height just a bit, pulling back that healthy color.

Again, I like it a little bit darker.I'll make the dry color a little bit whiter, so it'san obvious mismatch with the other grass, and leave it to billboard.I'll add this in and paint away.For this grass, I'm going to pull back that opacity.This way I'm just painting in a little bit of it.I need to make sure that I've chosen theright grass and I can paint in the alternate.Now, I'm ready for some lakeside editing.What I'll do is again downsize that brush, choose a harder brush,pull up that opacity and hold Shift and gently remove grass.

Holding control while you do this erases a selected detail type.So if you want to take out just some of the species you can.I'll pull this back and give my lake edge a bit of a haircut.Grass is a terrific way to camouflage whatwould be otherwise just a plain hitting the terrain.I'll let some of that grass grow into thewater, work my way along and trim it gently.Because these are just textures, you may find it very easyto make several different kinds of grasses and bring them in.You could bring in, in a situation like this,cattails, for example, or other kind of water reeds.

Maybe there's some that are more drylooking and some that are definitely wetter.We can use this approach on anything, really.Anything we want could be a grass.It's only limited by your imagination, and what you'd like to paint.You could also take pictures of an existing grass, and makeit into a texture, cutting around it and making it your own.I've trimmed my grass back from the water and I'lltake one final look at it and see if it works.As I walk on the water, again, I cansee that the grass really has some good variety.Now we may not get this close, soit's okay that it's just really waving plains inthe wind, but I like the color variation and how it really helps to fill that in.

I'll come back and add in some more green in placesto sort of camouflage those hills, but it looks pretty good.And I like how things recede into and the grass reveals as we get close.Some of the grass has grown into the water, butmost of it is huddled back on the lake edge.

Learn by watching, listening, and doing, Exercise files are the same files the author uses in the course, so you can download them and follow along Premium memberships include access to all exercise files in the library.

Already a member ?

Learn by watching, listening, and doing! Exercise files are the same files the author uses in the course, so you can download them and follow along. Exercise files are available with all Premium memberships.
Learn more

Upgrade to our Annual Premium Membership today and get even more value from your lynda.com subscription:

“In a way, I feel like you are rooting for me. Like you are really invested in my experience, and want me to get as much out of these courses as possible this is the best place to start on your journey to learning new material.”— Nadine H.

Thanks for signing up.

We’ll send you a confirmation email shortly.

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.

Keep up with news, tips, and latest courses with emails from lynda.com.

Sign up and receive emails about lynda.com and our online training library:

new course releases

newsletter

general communications

special notices

Here’s our privacy policy with more details about how we handle your information.