Mapdev:howto height blender

From Spring
Revision as of 03:16, 23 May 2012 by Enetheru (talk | contribs) (modified text)
Jump to navigationJump to search

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.

and warning that this method wont be pixel perfect for now, because of the added pixel i will extend the tutorial to handle that later on. its not difficult.

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

setup nodes like this: SHOW IMAGE

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!