Friday, 7 March 2014

Creating Game Quality Vegetation Assets

One of the things I was keen to add to my level was vegetation, I thought adding these elements would really bring it to life, fill in bare areas of the terrain, and add interest to the landscape. The problem with creating these elements was in keeping the polygon count low while making them look as realistic as possible. Trees are also some of the most complex natural shapes and whilst there's plenty of ways to create trees, including presets in Max and programs like SpeedTree in UDK, It's a technical process that I wanted to learn, and update my skillset.

With this being a very technical discipline, to create the vegetation I had to follow a tutorial that covered this process. I found a great tutorial by 3D Motive called 'Creating Foliage for UDK' that I used to help teach myself how to bring these elements into UDK but also animate them though the use of materials in the engine.
 
The first element I learnt to create was grass, again what should be something simple, if we created individual blades of grass as models and then import them into UDK, we would need thousands of instances to get any decent coverage, and the polygon count would be astronomical.

To keep the poly count low but still create realistic looking grass, we can still model the grass in a 3D program such as Max and then 'bake' the models to a texture plane. In this way we can capture all of the lighting, specular, and diffuse information of a 3D asset but then it will still read in a similar way on an image plane when in a game engine.



Once the texture was complete I then took it back into Max and applied it to the plane that was used as the render to texture object. I then split the plane into the two smaller polygons at the top and the larger grass asset at the bottom. With preserve UV's enabled I then moved the vertices of each asset to tighten up the geometry around the grass texture, it also means less geometry is rendered in UDK (every little helps).


 

Both the grass and trees were going to be animated in UDK through the use of materials. To do this I had to paint the vertices using 'vertex colour', a red gradient lighter at the top meant the grass should bend more at the top whilst staying fixed at the base.


I went through each asset in a similar fashion and then created random clumps that I can scatter about my terrain.

 The trees were created using the same techniques as the grass, modelling the branches, baking textures and normals, painting the vertices, and then grouping the planes.


  I used splines to create the trunk and branches, and then attached the planes to them trying to create a naturalistic looking tree.




No comments:

Post a Comment