Sunday, February 16, 2014

Jeremy Reid - Week 2 Milestone



This week, I decided to experiment with creating terrains using a third party program called World Machine. I also finally discovered a way to conform splines to an uneven mesh, such as a terrain. Using this technique I also aligned railings to the shape of the terrain. However, I will talk more on that later.

Before doing anything, I first took the time to learn and research all of the useful terrain creation tools that World Machine lets you play around with.

After messing around with the program for a couple hours and following tutorials, I finally came up with a decent snowy mountain terrain.



As can be seen below, I used a variety of helpful filters and tools to create this snowy mountain. Using the “device” layout, I was able to modify the procedural generation of this particular terrain by changing settings related to Layout generator, Advanced Perlin, Erosion, Snow, and Basic Coverage. New filters and modifiers could be added to this layout and connected with other “tabs” to produce different results in your terrain. It was surprisingly really fun to play around with.



Though, it’s not a primary feature of the program, World Machine even allowed me to create texture maps for the terrain from within the program itself. Though since I was limited to the free version of the program, the highest resolution I could get for my maps was 513 x 513. That restriction was virtually the only difference between the free and paid versions of the program.

 Heightmap, Colormap, and Snow Mask generated from World Machine

I then used the heightmap within 3ds max to generate a terrain mesh.



With the 3 maps (colormap, snow mask, heightmap) created in World Machine, this is what the mountain looked like in 3ds Max with the materials applied. Obviously, the resolution on the texture map was too low to be of use for our game; however, it was still useful to know that World Machine could create more than just heightmaps for you.

Next, I moved on to trying to create a terrain that would I actually be able to test within Unity. I started up World Machine again and created this terrain.



This area was just a simple mountainous areas with some land flattened through the middle so that I could plant a road through it. I just wanted something really quick to test within Unity.




And….Here it is within Unity. It was relatively simple to get a heightmap working within the program. I just had to make sure to output the map as a Raw16 image so that Unity could use it.

Next I decided to research a way to procedurally texture a terrain within Unity. To achieve this I downloaded a free add-on for Unity called “Terrain Toolkit”. This useful add-on allowed me to play around with texturing the terrain in a much easier and realistic way than if I had to paint all of it myself. I experimented with different texture combinations.



After all of this experimentation within World Machine and Unity, I decided to return and find a solution to my old problems with aligning objects to terrain within 3ds Max. I wanted to place railings on the terrain shown above.

First however, I needed a way to export the terrain from Unity in a file format that would be readable by 3ds Max. Looking online, I found a script that allowed me to export Unity terrain as an obj file.



Success! The unity terrain shown above has now been imported into 3ds Max. 

However, since I could find no way to conform splines to the terrain like other objects, I couldn’t get the railings that I created to fit a path that molded with the terrain. However, after looking online again, I found a Max Script that would allow me to align vertices and splines to the terrain, which was exactly what I was trying to do.



Now I finally have railings that are molded to the shape of the terrain. I spent many hours of frustration on this and it all came down to a simple Max Script that I found online.
 


No comments:

Post a Comment