Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member

Painting grass, shrubs, and 3D geometry

From: Unity 4.3 Essential Training

Video: Painting grass, shrubs, and 3D geometry

Grasses and other shrubs, detail meshes, are an These are some standard terrain assets that ship with Unity.

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.

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 of the rock and cliff because I've already put that in. What I'll bring in though, are my two grass textures here, checking both and standard terrain assets grass.

I'll leave off the cliff, leave off the good dirt, and leave off the terrain textures of grass hill because that's actually a flat grass that we paint on. Lastly I'll check grass and rock. This'll help give me a little bit of camouflage under the grass instead of grass coming down to just bare dirt. I'll click Import. I have yet another new folder in my standard assets and 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 has an alpha channel, and the grass color has been extended 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, you can also check out the alpha channel in the preview. Clicking on the button to switch between color and alpha, and that'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 against its 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 close enough, 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 other terrain objects, we have a selection of brushes and we can add in detail objects 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 it and 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 my Assets here in the Select Texture2D dialogue, 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 noise spread, and a healthy and dry color, and the option to billboard. Billboard for us, means that this will always face 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's say 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 on with this really screaming neon, it'll be far too bright. I'll click that healthy color and back off that color a bit, pulling it down and grading it out slightly. I'll leave the dry color alone and see how it looks, and then click add to add that grass in. My detail meshes will show up here in the detail section 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 very quickly, 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, and I've got some obvious bare spots, which are okay. I'll fill in the grass around the lake and I can come back later and erase grass, much like I was erasing trees. I've got a really good variation here between the two colors between that yellow, 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 hills here 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, just filling in the edges, as if it was nice and full where the water seeped into the soil. This is a section that's more of a clearing and so 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 out some 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 the grass seeps into the water very nicely and even 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 some camouflage 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 through and the color really varies as does the height. It's definitely rolling fields and trees beyond, and as I go around walking on the 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 one more in, editing details, adding in another 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's an 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 the right 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 what would be otherwise just a plain hitting the terrain. I'll let some of that grass grow into the water, work my way along and trim it gently. Because these are just textures, you may find it very easy to 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 dry looking 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 make it into a texture, cutting around it and making it your own. I've trimmed my grass back from the water and I'll take one final look at it and see if it works. As I walk on the water, again, I can see that the grass really has some good variety. Now we may not get this close, so it's okay that it's just really waving plains in the 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 places to 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, but most of it is huddled back on the lake edge.

Show transcript

This video is part of

Image for Unity 4.3 Essential Training
Unity 4.3 Essential Training

78 video lessons · 10577 viewers

Adam Crespi
Author

 
Expand all | Collapse all
  1. 2m 57s
    1. Welcome
      41s
    2. What you should know before watching this course
      52s
    3. Using the exercise files
      1m 24s
  2. 21m 21s
    1. Designing the game
      4m 39s
    2. Setting the project
      4m 9s
    3. Exploring the Hierarchy, Scene, and Inspector windows
      5m 45s
    4. Creating and transforming objects
      6m 48s
  3. 21m 34s
    1. Organizing the Assets window
      2m 55s
    2. Exporting objects from 3D modeling programs
      8m 33s
    3. Importing and configuring models and textures
      4m 54s
    4. Setting properties for models and textures in the Inspector
      5m 12s
  4. 29m 8s
    1. Introducing the game environment
      4m 27s
    2. Placing the player controller
      4m 29s
    3. Publishing project settings
      5m 32s
    4. Adding sky and fog
      8m 17s
    5. Fine-tuning the First Person Controller
      6m 23s
  5. 57m 25s
    1. Creating the terrain geometry
      3m 29s
    2. Forming the topography
      9m 54s
    3. Painting the terrain textures
      7m 9s
    4. Painting trees and forests
      10m 55s
    5. Painting grass, shrubs, and 3D geometry
      9m 38s
    6. Painting detail meshes
      8m 46s
    7. Adjusting terrain settings
      7m 34s
  6. 39m 45s
    1. Creating materials and assigning shaders
      8m 56s
    2. Handling multiple materials
      7m 13s
    3. Adding textures to a material
      3m 57s
    4. Manipulating textures
      5m 20s
    5. Adding reflections to materials
      8m 1s
    6. Creating lit materials
      6m 18s
  7. 47m 12s
    1. Creating GameObjects
      5m 2s
    2. Understanding components
      6m 15s
    3. Using colliders for barriers
      6m 22s
    4. Using colliders for triggers
      8m 1s
    5. Exploring physics
      8m 22s
    6. Working with Physic materials
      5m 3s
    7. Adding joints to rigid bodies
      8m 7s
  8. 20m 33s
    1. Setting up prefabs for animation and batching
      5m 8s
    2. Animating an object
      6m 32s
    3. Adjusting timing in an animation
      3m 50s
    4. Animating transparency and lights
      5m 3s
  9. 11m 58s
    1. Importing skinned meshes
      4m 51s
    2. Separating animations into clips and states
      3m 14s
    3. Creating transitions between states
      3m 53s
  10. 30m 22s
    1. Customizing ambient light
      2m 59s
    2. Creating the sun using a directional light
      5m 49s
    3. Using layers and tags for lighting
      3m 32s
    4. Adding spot and point lights
      4m 25s
    5. Using point lights for fill
      4m 30s
    6. Adding and fine-tuning shadows
      5m 10s
    7. Creating lighting effects with cookies
      3m 57s
  11. 9m 15s
    1. Adding scripts to GameObjects
      2m 42s
    2. Using correct script syntax
      6m 33s
  12. 23m 7s
    1. Setting up a 2D project
      3m 13s
    2. Importing sprites
      2m 30s
    3. Slicing in the Sprite Editor
      3m 6s
    4. Layering sprites and setting the sorting order
      5m 12s
    5. Creating 2D colliders
      3m 12s
    6. Adding 2D physics
      2m 25s
    7. Animating 2D elements
      3m 29s
  13. 30m 25s
    1. Creating light shafts and sunbeams
      5m 20s
    2. Using ambient occlusion to add gravity
      4m 37s
    3. Adding depth of field
      8m 40s
    4. Applying motion blur
      5m 46s
    5. Tuning color for mood
      6m 2s
  14. 38m 16s
    1. Exploring water effects
      7m 36s
    2. Working with wind zones
      2m 8s
    3. Using an audio source
      4m 3s
    4. Creating a sound zone
      5m 59s
    5. Triggering audio
      3m 37s
    6. Adding audio effects
      3m 13s
    7. Creating particle systems
      2m 26s
    8. Adjusting particle systems
      9m 14s
  15. 25m 23s
    1. Setting up occlusion culling
      5m 52s
    2. Enabling batching to reduce draw calls
      3m 28s
    3. Testing in the game window using statistics
      4m 27s
    4. Building a development build and debugging
      6m 0s
    5. Building the executable
      5m 36s
  16. 49s
    1. Next steps
      49s

Start learning today

Get unlimited access to all courses for just $25/month.

Become a member
Sometimes @lynda teaches me how to use a program and sometimes Lynda.com changes my life forever. @JosefShutter
@lynda lynda.com is an absolute life saver when it comes to learning todays software. Definitely recommend it! #higherlearning @Michael_Caraway
@lynda The best thing online! Your database of courses is great! To the mark and very helpful. Thanks! @ru22more
Got to create something yesterday I never thought I could do. #thanks @lynda @Ngventurella
I really do love @lynda as a learning platform. Never stop learning and developing, it’s probably our greatest gift as a species! @soundslikedavid
@lynda just subscribed to lynda.com all I can say its brilliant join now trust me @ButchSamurai
@lynda is an awesome resource. The membership is priceless if you take advantage of it. @diabetic_techie
One of the best decision I made this year. Buy a 1yr subscription to @lynda @cybercaptive
guys lynda.com (@lynda) is the best. So far I’ve learned Java, principles of OO programming, and now learning about MS project @lucasmitchell
Signed back up to @lynda dot com. I’ve missed it!! Proper geeking out right now! #timetolearn #geek @JayGodbold
Share a link to this course

What are exercise files?

Exercise files are the same files the author uses in the course. Save time by downloading the author's files instead of setting up your own files, and learn by following along with the instructor.

Can I take this course without the exercise files?

Yes! If you decide you would like the exercise files later, you can upgrade to a premium account any time.

Become a member Download sample files See plans and pricing

Please wait... please wait ...
Upgrade to get access to exercise files.

Exercise files video

How to use exercise files.

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.


Exercise files

Exercise files video

How to use exercise files.

For additional information on downloading and using exercise files, watch our instructional video or read the instructions in the FAQ.

This course includes free exercise files, so you can practice while you watch the course. To access all the exercise files in our library, become a Premium Member.

Join now "Already a member? Log in

Are you sure you want to mark all the videos in this course as unwatched?

This will not affect your course history, your reports, or your certificates of completion for this course.


Mark all as unwatched Cancel

Congratulations

You have completed Unity 4.3 Essential Training.

Return to your organization's learning portal to continue training, or close this page.


OK
Become a member to add this course to a playlist

Join today and get unlimited access to the entire library of video courses—and create as many playlists as you like.

Get started

Already a member?

Become a member to like this course.

Join today and get unlimited access to the entire library of video courses.

Get started

Already a member?

Exercise files

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

Get started

Already a Premium member?

Exercise files video

How to use exercise files.

Ask a question

Thanks for contacting us.
You’ll hear from our Customer Service team within 24 hours.

Please enter the text shown below:

The classic layout automatically defaults to the latest Flash Player.

To choose a different player, hold the cursor over your name at the top right of any lynda.com page and choose Site preferencesfrom the dropdown menu.

Continue to classic layout Stay on new layout
Exercise files

Access exercise files from a button right under the course name.

Mark videos as unwatched

Remove icons showing you already watched videos if you want to start over.

Control your viewing experience

Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.

Interactive transcripts

Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.

Are you sure you want to delete this note?

No

Your file was successfully uploaded.

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:

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:

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

   
submit Lightbox submit clicked
Terms and conditions of use

We've updated our terms and conditions (now called terms of service).Go
Review and accept our updated terms of service.