Friday, June 13, 2014

Creating a patch of grass in 3ds Max

    Throughout my years of playing video games I've come to observe many things a game holds, such as the environment. Looking at a games environment I've come to see what brings the scenery to life and what gives the scenery purpose. Some things being static meshes, lighting, sound, and even animations occurring in the scene. One game I played that really intrigued me with their environment was Final Fantasy 13 when you're in Gran Pulse. I found the environment quite fascinating due to the ways of how they went about doing it. For example, if you  were to look at their terrain for Gran Pulse, the grass is made up of a material that has a grass texture in it. Now imagine, if you were to play a game that has an outdoor environment and the only grass you saw was coming from a textured material, it would be pretty unrealistic. The reason being is because the texture material on a terrain isn't 3 dimensional. There has to be more than that on a terrain to actually enhance the terrain to bring it to life. Playing Final Fantasy 13 I notice they didn't just have a textured material on their terrain for Gran Pulse but they also had a deluge of models on their terrain, one being patches of grass. 

 
  Having patches of grass on a terrain, personally I feel enhances the scenery more because it brings an outdoor environment such as a terrain, more to life. From seeing this, it really made me wonder how they went about modeling the grass. I actually thought it would be quite difficult at first because of the bend and twist a patch of grass may hold. Recently, while working on models for my midterm project I decided to take the opportunity to model a patch of grass considering it would fit the scenery for my project. While modeling the patch of grass, I've come to realize how easy it actually is going about doing this.

  For starters, you really don't have to do box modeling nor nurbs for this. Your best starting off point is to begin with a planar because a patch of grass really doesn't have depth. Especially considering if its going to be in a game pretty small. When I was modeling the grass what I did was start of the planner with eight width segments. Having segments or edges of the width of the planner will allow the model to bend. Upon converting the geometry to editable poly I decided to weld the top two vertices together, creating one tri polygon. The reason why I did this was to create almost a sharp point at the top of the grass.


  After doing this I selected all polygons on the model and went to modifiers tab>bend. Doing so creates a bend in the model. Now the cool thing about this modifier is that we can bend this model in the x, y or z axis. We can increment or decrement the angle of which the bend occurs, or even the direction of the axis it bends. It's pretty cool because you can get really creative with this. For me, I decided to bend it about the x axis.


  When you look at a patch of grass, you may notice that the patch is made up of more than one blade. So after creating this bend for this single blade I actually grabbed one of the axis with the translation tool and held shift and moved it. Doing so gives you the option to create a copy, instance or reference. Considering this a patch of grass, I went with a copy. Now after creating a copy of the same blade the bend modifier was still active on the previous blade, even on the new copied blade. Doing it this way gives you way more control and saves a lot more time rather than collapsing the stack and hitting the bend modifier again. Now one of the cool things with the bend modifier is they give you something called upper limit and lower limit. With upper limit and lower limit, you can make things seem more realistic with your bend of the grass. Think of it like this, both upper limit and lower limit have a threshold. Once that threshold is met for the upper limit, the upper part of your model and only the upper part, begins to bend. Same thing for the lower limit. For some blades of grass, the bending doesn't occur all the way, the bending occurs at the top of the model. With the copy blade I created, what I did was play with the upper limit after hitting limit effects. Thus allowing me to create a more realistic bend for the copied blade.


  Like I said before, you can get pretty creative here and make all sorts of bends. If you wanted to, you could select some polygons on the model and hit bend instead of selecting all polygons. Now if you were to look at a real patch of grass or even just blades of grass, you may notice some have a twist to it. The cool thing is, 3ds Max actually has a twist modifier. So what I decided to do was create a copy of the copied blade and go to modifier tab>twist. The twist modifier is very similar to the bend modifier, the only difference is that you're twisting the model and not bending it. For the new copied blade, I played with the twist a little bit on the x axis, adding a limit effect to it to both the upper limit and lower limit.

  After doing this I grab the original blade model and created another copy of it. The reason behind this was to create a variety of different blades. Upon creating a new copied blade, I did the same thing with adding a twist to it. Now here comes the cool part. 3ds Max actually has an array tool where you're allow to create copies of a model and change the models rotation, translation, and scale of it. After completing four different blades I decided to go to the array tool to create even more variety of blades. Selecting the newest copied blade I created, I went to Tools>Array. Entering the array tool, the first thing I did was hit the Preview button and checked the box display as box. Doing so will allow you to preview multiple copies of your mesh in a box. I checked "Display as box" only because I find it easier to see versus seeing multiple blades of grass. After doing this you can really get creative here by messing with the translation, rotation and scaling of the models. But before actually doing so, I made sure to check "Copy" under the "Type of Object" and then begun messing with the different kinds of transformations.


  After achieving the look I wanted with the array tool for the last copied blade I made, I did the same with the previous copied blades I made. Doing so gave me a deluge of blades. Once getting all different variety of blades, I begun moving them all close together to create a patch of them. After finalizing the location for all blades I selected one of the blades and collapse the stack, allowing me to keep all modifies on the blade and going back to editable poly. Doing so, I went to the attach tool under Edit Geometry and selected all other models, allowing them to all become one model.

 
  Now you may be asking, how come I didn't UV map this? Well depending on what kind of texture your going to be placing on a model really depends whether or not if UV mapping is necessary. For example, placing a plane texture like green alone really doesn't require any UV mapping due to stretching of the texturing not being noticeable at all. However, if we really wanted to, we could make the patch of grass more realistic. Before actually using the array tool or even creating copies of the blades, I could've UV mapped one blade and then created copies and used the array tool to create copies. Upon exporting the model into Unreal Engine having all models attach to each other, we could make the grass even more realistic by adding some glossiness to the material, in the material editor.
  At the end of it all, it really does depend on what look you're trying to achieve. You can really get creative with this through the modifiers, texturing, or even animations. If you really wanted to, you could rig, skin, and animate the patch of grass to make it seem like wind is hitting it which would be pretty cool. After creating this patch of grass, has made me realize how much things can be taken into consideration when either making an outdoor environment or even indoor environment for a game. It just all depends on what kind of value will something like grass, lights or sound may add to the scenery of your level.

No comments:

Post a Comment