Mapdev:howto height blender: Difference between revisions

From Spring
Jump to navigationJump to search
Flozi (talk | contribs)
m recategorise -> Map Dev (also, category at _bottom_ of markup)
 
(4 intermediate revisions by one other user not shown)
Line 1: Line 1:
[[Category:Map making]]
= Creating a Heightmap in Blender =
== Preparation ==
= [http://www.youtube.com/embed/7f2tYgyF0W8 Video] =
== Video Script ==
1. Delete Cube and Light


Get the latest blender 2.63 and up should do it. Blender can render images as large as your ram allows.. I've found that on a system with four gig of ram I can render easily and reliably a 2049x2049 height(Displacement) map, translated into game units thats a 32x32 map size. more ram would allow larger maps, not sure what Spring's map size limit is.
2. Create Terrain Mesh
- add plane
- enter edit mode
- scale plane to size you want
- subdivide plane to match grid
- enter object mode


if your ram restricts you from making large maps, get the plugin, the name escapes me now but it allows you to render any size image in any number of pieces and stitch them together using imagemagick. ive successfully rendered a 32Kx32K map with this method.
3. Add Multires Modifyer
- set subdivision to simple
- subdivide until level 6
- set preview level to 6


== Begin ==
4. Sculpt Terrain Mesh
* Open up blender
- enter sculpt mode
* Delete the default cube and the light, since they arent used
- set transform locks
- sculpt
- enter object mode


== Add a Plane ==
5. setup camera
Were going to be using blender units as Spring Map Units.
- select camera
The newly created plane size is 2x2, scale it by 4 to get 8x8 etc.
- set position and rotation
- change to camera view
- set camera to ORTHO
- set scale


== Add another plane ==
6. Setup Render
* Add another plane to use for the water reference
- set render dimensions
* Scale it up to roughly
The height map resolution is defined as SMU * 64 + 1, see [[Mapdev:height]]
* Name it
* Put it on the second layer so you can turn it on and off easily.
* Turn off your ability to select it using the outliner


== Render Settings ==
7. Setup compositor
FIXME- need discussion on non square maps, pretty sure the largest dimension wins. anyway...
- change space type to node editor
- select compositor nodes
- check use nodes
- redirect Z
- add normalise
- add invert
- render
[[File:Blender-node000.png|600px]]


* Change the renderer to cycles
8. Colour Management
* Change render resolution
- set display device to none
The height map resolution is defined as SMU * 64 + 1, so for this map, 8x8 = 513x513
* Make sure render percentage is 100%


== Camera Settings ==
9. Save
* Move camera to [0,0,?] z needs to be higher than he highest point on the map
- set type to tiff
* Rotation to [0,0,0]
- set BW
* Adjust clipping to be [0,?] as large as it needs to be so that the bottom of your map isnt cut off.
- set depth to 16bpp
* Change camera to orthographic
* Set orthographic scale to the largest SMU, our map is square so its 8
* Move the camera to layer 3 to make it managable
* Turn off your ability to select the camera in the outliner


== Shading ==
==Additional Information==
* Select your terrain
* Need discussion on non square maps, camera settings for altering which dimension gets priority when rendering.
* Change the material to the only available option(default new material)
* Consider using this type of material to help understand your sculpting
* Select Use Nodes
[[File:Blender-node001.png|600px]]
* Change type from ''Diffuse BSDF'' to ''Emmission''
* if your ram doesnt allow rendering large maps due to image dimensions, consider the render regions add on.
 
=== 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.
 
[[File:Blender-node000.png]]
 
=== Incline Map ===
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.
 
The colour ramp will probably need adjusting depending on your needs. [[File:Blender-node001.png]]


=== Examples ===
=== Examples ===
Height map [[File:Blender-screen-000.png]] Visual of build/walk [[File:Blender-screen-001.png]] Detail distribution [[File:Blender-screen-002.png]]
Height map [[File:Blender-screen-000.png]] Visual of build/walk [[File:Blender-screen-001.png]] Detail distribution [[File:Blender-screen-002.png]]
 
[[Category:Map Dev]]
== Sculpting ==
* subdivide the plane to create the exact number of verts that you will see in game
 
w,subdivide 9 times 2,4,8,16,32,64, 128, 256, 512
 
* Change to sculpt mode and set up the restriction to only transform on the Z Axis
* Sculpt away
 
I also use basic mesh editing to flatten certain areas with falloff enabled, this lets me scale in the Z direction to give truly flat areas for building on etc.
 
== Render ==
* Happy times!
 
== FIXME ==
* make the height map node properties driven by the terrain values.. so no manual adjustment is needed after the fact.

Latest revision as of 01:31, 22 February 2014

Creating a Heightmap in Blender

Video

Video Script

1. Delete Cube and Light

2. Create Terrain Mesh

- add plane
- enter edit mode
- scale plane to size you want
- subdivide plane to match grid
- enter object mode

3. Add Multires Modifyer

- set subdivision to simple
- subdivide until level 6
- set preview level to 6

4. Sculpt Terrain Mesh

- enter sculpt mode
- set transform locks
- sculpt
- enter object mode

5. setup camera

- select camera
- set position and rotation
- change to camera view
- set camera to ORTHO
- set scale

6. Setup Render

- set render dimensions

The height map resolution is defined as SMU * 64 + 1, see Mapdev:height

7. Setup compositor

- change space type to node editor
- select compositor nodes
- check use nodes
- redirect Z
- add normalise
- add invert
- render

8. Colour Management

- set display device to none

9. Save

- set type to tiff
- set BW
- set depth to 16bpp

Additional Information

  • Need discussion on non square maps, camera settings for altering which dimension gets priority when rendering.
  • Consider using this type of material to help understand your sculpting

  • if your ram doesnt allow rendering large maps due to image dimensions, consider the render regions add on.

Examples

Height map Visual of build/walk Detail distribution