Mapdev:howto height blender: Difference between revisions

From Spring
Jump to navigationJump to search
m added fixme section
m created section.
Line 39: Line 39:


=== Incline Map ===
=== Incline Map ===
setup nodes like this: SHOW IMAGE
The below image shows the node setup I use to do two things.
# Check while sculpting if terrain is walkable or buildable
# Generate helper map for Splat detail textures.
 
to use for terrain build/walk checking connect the true normal to the cross product instead of the normal,it will show the face normal rather than the smoothed normal.
 
the colour ramp will probably need adjusting depending on your needs.
[[File:Blender-node001.png]]


== Sculpting ==
== Sculpting ==

Revision as of 03:27, 23 May 2012

preparation

things to decide before beginning

  • how large do you want the map to be?

blender can render images as large as your ram allows.. ive found that on a system with 4 gig of ram i can render easily and reliably a 2049x2049 height map, transalted into game units thats a 32x32 map size. more ram would allow larger maps, not sure what Spring's upper limit is.

rendering the texture map is a different story, its pretty difficult to render a 16384 pixels square map so i will leave that for another tutorial. It's Doable, but needs to be done in segments and stitched together later.. anyway.

Begin

  1. open up blender
  2. delete the default cube and the light, since they arent used

Add a Plane

The plane is 2x2 units by default, so scale it up to the size you want. lets make an 8x8 map 8x64 = 512 units. 2*256 = 512.

Render Settings

FIXME- need discussion on non square maps, pretty sure the largest dimension wins. anyway...

  1. change the render to cycles
  2. change render resolution to 513 and the percentage to 100%

Camera Settings

  1. move camera to 0,0,10, and rotation to 0,0,0
  2. change camera to orthographic
  3. Set orthographic scale to 512

Shading

  1. Select default new material
  2. change it to nodes
  3. change type from diffuse BSDF to emmission

Height

The image below shows the node setup I use to render a height map.

Once you are finished sculpting you will modify the add value and the divide value based on your completed terrain.

  • The Add node is used to raise the terrain height values to compensate for being negative z values or under water in this setup. it will have to be manually set
  • The Divide node is used to give maximum precision of black and white values and should be the maximum z dimension of your terrain, found in its transform properties.

Incline Map

The below image shows the node setup I use to do two things.

  1. Check while sculpting if terrain is walkable or buildable
  2. Generate helper map for Splat detail textures.

to use for terrain build/walk checking connect the true normal to the cross product instead of the normal,it will show the face normal rather than the smoothed normal.

the colour ramp will probably need adjusting depending on your needs.

Sculpting

  1. subdivide the plane to create the exact number of verts that you will see in game

w+enter 9 times 2,4,8,16,32,64, 128, 256, 512

  1. pull out the sculpt mode and set up the restriction to only transform on the Z Axis
  2. sculpt away

Render

  1. happy times!

FIXME

  • make the height map node properties driven by the terrain values.. so no manual adjustment is needed after the fact.