[SOLVED]How to bake heightmap at the same 'height'

The place for artists, modellers, level designers et al to discuss their approaches for creating content for OGRE.
User avatar
LJS
Greenskin
Posts: 138
Joined: Wed Jan 09, 2013 8:58 pm
x 6

[SOLVED]How to bake heightmap at the same 'height'

Post by LJS »

Hiya,

Am trying to bake several heightmaps within blender (2.65). They all make up one larger heightmap. I'll sum up beneath what I do, works perfectly fine for only one heightmap. My propblem follows after that.
  • Eh, ended up as a mini tutorial (edit: bstone's url is much easier and what I searched for):
  • make a plane
  • scale it (doesn't matter)
  • go into edit
  • [list]
  • select all vertices
  • hit U for unwrap (to bounds)
[*]Go to UV/Image editor window[/*]
  • This will be the heightmap
  • [list]In edit mode and all vertices selected
  • hit New in the UV window
  • [list]
  • In the pop up: Give it a name and set width and height to 513
  • _Uncheck_ alpha
  • Press OK
[*]For easy use, save that image already
(next time you load the blend, it loads in the last saved heightmap)[/*]
[/list]
[*]then set a multires on it (I divide it to 512 - 9 divisions - that makes 513x513 vertices)[/*]
[*]sculp it only on Z, or how you do it[/*]
  • Add a material to it, leave all as it is
  • [list]
  • Add a texture
  • [list]
  • Type: Blend
  • Mapping/X: X
  • Mapping/Y: none
  • Mapping/Z: none
  • Influence/Blend: Add
  • Influence/Colour: Black
[/list]
  • Add a second texture
  • [list]Same as previous but;
  • Mapping/X: Y
  • Mapping/Y: none
  • Mapping/Z: none
[/list]
  • Add a second texture
  • [list]Right a third: The Z for mapping i.e. the height
  • Mapping/X: Z
  • Mapping/Y: none
  • Mapping/Z: none
  • [/*]Influence/Colour: [b]White[/b][/*]
[/list]
[/list]
[/list]
[*]Save the blend file[/*]
[*]Apply all modifiers[/*]
[*]Then bake (Bake mode: Textures) with the object selected[/*]
[*]Save the heightmap in the UV/Image editor window[/*]
[*]Reload blend file or hit CTRL-Z until you have your modifiers back
or just quit as you are done \o/[/*]
[/list]

The above will be updated regarding the answers

Back to my actual question :lol:
With the above, two or more maps for one terrain and both maps have one mountain with a different height, it won't bake as I need. All height values are clamped to the min and max values resulting in mismatches at the borders. Leaving gaps. Anyone knows how I can change that, other methods are also welcome.

Regards,
Last edited by LJS on Tue Jan 15, 2013 2:22 pm, edited 1 time in total.
bstone
OGRE Expert User
OGRE Expert User
Posts: 1920
Joined: Sun Feb 19, 2012 9:24 pm
Location: Russia
x 201

Re: How to bake heightmap at the same 'height'

Post by bstone »

Here's a better way to do that: Sculpting Terrain. The key is using a material to generate colors. Then you have good control over the clamping.
User avatar
LJS
Greenskin
Posts: 138
Joined: Wed Jan 09, 2013 8:58 pm
x 6

Re: How to bake heightmap at the same 'height'

Post by LJS »

Saw that, did that, appreciated that.

You can even leave the multires on and set the preview lower and all comes out as it should. In all aspects, a much better way, especially the second material to check 'real-time' the walkability and so, all other values while creating the terrain.

Thanks a lot,
(am very clumbsy, especially with words on a static screen.)
Ogre 3D 1.9.0 static
Bullet 2.8 static