From the course: Maya: Natural Environments

Procedural modeling with 3D Paint Effects - Maya Tutorial

From the course: Maya: Natural Environments

Start my 1-month free trial

Procedural modeling with 3D Paint Effects

- [instructor] The term entourage refers to objects that populate a scene. And for natural environments, entourage would include things like rocks and plants. In this chapter we'll look at a couple of different generative modeling techniques. First, the toolkit Paint Effects, and then later, XGen. Paint Effects is a procedural modeling tool that generates complex geometry, such as plants. It was developed over 20 years ago, by a guy named Duncan Brinsmead, and it's still useful for background geometry. Before we draw any paint effect, we want to check in on the paint effects global settings. That'll be found in the modeling menu set, in the generate menu, under paint effects globals. Go into the scene section, and we'll see an attribute labeled scene scale. That's a multiplier for the size of paint effects presets. So there's a scale setting stored in each paint effects preset. And when we load a preset, those settings are going to be entered into a buffer, or a template brush, also known as the paint effects brush settings. And then in turn, when we draw to create a stroke, which is a particular instance of a paint effects brush, then the template brush scale will be multiplied by this scene scale, to produce the resulting final scale of the brush, or the object in our scene. So the final object scale is going to be the preset scale, multiplied by this. Well, the presets we're going to be using will be drawing very, very tiny in our scene. We can accommodate for that by increasing the scene scale. Set that up to a value of 100. And that's going to be stored in this current scene, and it's not part of your Maya preferences. Close the paint effects globals, and now we want to paint onto the landscape. So select the terrain object, go back to the generate menu, there's a menu item down here that's enabled by default, paint on paintable objects. We just need to make this terrain paintable, with it selected, choose, make paintable. That's equivalent to making an object live to draw a curve on it, but paint effects predates the make live feature, so it's got its own version of make live. So we'll be able to draw a line on this terrain, and then we'll have trees and plants sprout from that line. The next thing we want to do is load up the template brush. I want to do that so that we can see how the template brush changes when we load presets. we don't need to have this object selected anymore, so we can de-select that, go back into the generate menu, and choose template brush settings. We get a window that launches, with a kind of inconsistent name here. It doesn't say template brush, it says paint effects brush settings. This will be the settings for the stroke we're about to create in our scene. Open up the tubes section, and then within that open up the creation section, and you'll see a whole bunch of attributes in here. I just want to display those to indicate how the template brush changes, when we load a preset. And that'll be done once again from the generate menu. And we'll choose get brush, that launches up the content browser. By default, we're taken to examples, paint effects, airbrush, scroll down, and let's go to trees, mesh. And if we click on one of these, then all of the parameters within that preset are loaded into the template brush, for the next stroke we're about to draw. As we click on these, we'll see those parameters change. Scroll down, the preset we want is called, oak, white leafy, medium, click on that to load its parameters, and then we can close the content browser. We've made that terrain paintable, so as we hover the cursor on the surface, we see a 3D brush icon, and just click and drag to draw an object. Okay, that looks pretty large, but we're going to fix that in the next movie. Let's just talk about what happens when we drag a stroke to create a paint effects object. I'll go back to the select tool, so I don't accidentally create more strokes. And then open up the attribute editor, control A. And within here we'll see that the selected object has three nodes, we've got the traditional transform node, a stroke node and also if we navigate with the arrow keys, we can get to another node, which is the brush node. The brush node holds the high level generative attributes, such as the density of leaves on a tree. And we'll see that the brush node attributes are the same as the ones we see here in the template brush. If we open up tubes and creation, when we created an object in the scene, the brush node inherited all the settings from the template brush. Of course we can change these, but the template brush determines the starting point. We also have a stroke node, we can go over there and select that. The stroke node is the shape within the 3D scene. It's the resulting geometry instance. The stroke node holds parameters that are specific to that instance, such as the display properties. We can go over here and for example, change out the display quality. We can reduce that, and we can see how that affects our display. That won't affect the rendering if you're using the Maya software render. Stroke node also holds the random seed, which determines the unique random properties, of that particular stroke. As we'll see in the next movie, multiple strokes can share the same brush settings, and we can change many objects at once, using the brush settings. And the seed parameter here within the stroke will make sure that each one of those instances is unique.

Contents