keskiviikko 18. tammikuuta 2017

UNITY & 3DS MAX - heightmap

NAV16AP & NAV15AP

3. jakso lukuvuonna 2016-2017

Heightmap is a greyscale image in which white color represents maximum height and black color represent minimum height. The concept is similar to normal mapping and can be used with normal maps to create extra definition.

Heighmaps can also be used to make 3D terrains. We’re going to make one in 3DS Max as well as in Unity.

HEIGHTMAP IN UNITY

Unity wants to import the heightmap in raw format. You can create your own heightmap in Photoshop. The most simple way to test this is by using filter render clouds. This creates a greyscale image that can be used as heightmap.



When you save the image remember to save it in Photoshop raw format. Choose non-interleaved order in the save settings under save channels in. This way the image will create normal bumpy terrain without jagged edges.


Next create terrain in Unity. Go to the settings button and choose import raw. Choose your photshop raw file. 


In the pop up window select correct size for width and height and decide your terrains size. Now you should have terrain created by the heightmap image. You can still make adjustments to it with other terrain tools and paint texture.


HEIGHTMAP IN 3DS MAX

You can use the same heightmap that you created in Photoshop for Unity in 3DS Max. You need to save the heightmap in jpg so that 3DS Max will recognize it.

Start by creating plane. Size for it can be for example 500 x 500. Add about 100 length and width segments. The amount of segments will affect on how much detail the terrain will have.



Then add a modifier called displace. 


In the image bitmap sections choose your heightmap image. Now the 3DS Max will take the color difference and use it as a height difference.


You can change the strength of the height difference by changing the number under displacement parameter/strength. In this image the strength was 100.


You can make changes after that but at least you have a decent base to work on. 


Next add texture to your model. Paint suitable texture in Photoshop using heighmap as guidelines. After adding texture to the model you are done.


Now you can export your model as fbx and use it in Unity.

TASK: Create your own heightmap and a texture for it in Photoshop. Create terrain with these instructions in 3DS Max and in Unity.

Ei kommentteja:

Lähetä kommentti