Home Technical Talk

3dsmax render a heightmap

Cyph3r
polycounter lvl 9
Offline / Send Message
Cyph3r polycounter lvl 9
Hey all, ive made a level but i need to use a heightmap, and i was looking through max's render to texture and i see that 'heightmap' is an option. how do i get it to work? everytime i tried it just renders solid black?

Replies

  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    I think you need to set the "min" and "max" heightmap output values in the render to texture dialog. They're near the bottom. It needs a range to work with.
  • gamedev
    Options
    Offline / Send Message
    gamedev polycounter lvl 12
    What is the height map for / going to be used for?
  • Talbot
    Options
    Offline / Send Message
    Yeah, you can set the min and max under the Projection Settings in the Render to Texture dialog.
  • ArtsyFartsy
    Options
    Offline / Send Message
    Sorry for piggybacking on this thread with a different question.


    Have you guys tried using the generated heightmaps as a base for specular maps, and what are some of the pros and cons?
  • MoP
    Options
    Offline / Send Message
    MoP polycounter lvl 18
    I wouldn't bother with a heightmap as a base for specular, that doesn't really make any sense... it's not like "higher" things are always more shiny than "low" things... for example imagine you have a metal plane covered with some thick cloth, the metal is "lower" in the heightmap but more shiny than the cloth... like I say, doesn't really make sense.

    Probably a more useful thing is to take your normalmap, run it through crazybump and get a tight occlusion pass from it, this will give you cavities and corners regardless of the "height", it's much more useful for overlaying on both specular and diffuse.
  • Mark Dygert
    Options
    Offline / Send Message
    I like MoPs suggestion by running it through crazybump.

    You can also run another AO pass and set the Bright color from white to gray 127. It can give you a pretty good base to lighten/darken into a spec map.

    Also instead of doing another render, you can multiply your AO over a layer of flat 127 gray, it will probably give you the same results.
  • Cyph3r
    Options
    Offline / Send Message
    Cyph3r polycounter lvl 9
    man guys, i still cant get it to work, i set the range so itd definaltly 'catch' the mesh, but it just renders pure red (the "ray miss" colour) any help please?
  • gamedev
    Options
    Offline / Send Message
    gamedev polycounter lvl 12
    I'm still unsure if you want to render a height map for terrain or if you want a height map for displacement / bump offset / parllax mapping in engine on a particular asset.

    If you are indeed trying to use this on an asset, and not as a height map for terrain, there is a check box in the render to texture dialog to render a height map into the alpha of your normal map. If your normal map is baking alright, then your height should be baked right along w/ it.
  • Cyph3r
    Options
    Offline / Send Message
    Cyph3r polycounter lvl 9
    its for a level ive modelled, but it needs to be as a heightmap to work correctly in the game engine.
  • Cyph3r
    Options
    Offline / Send Message
    Cyph3r polycounter lvl 9
  • Ryan Clark
    Options
    Offline / Send Message
    Ryan Clark polycounter lvl 18
    Are you able to bake a normal map (tangent space) from this geometry?
  • glib
    Options
    Offline / Send Message
    Really stupid question, but are your UVs laid out correctly in 0 to 1 space, and are you sure your bake is looking at the right uv channel?
  • ArtsyFartsy
    Options
    Offline / Send Message
    You're missing a big step somewhere if your rays aren't hitting anything.

    I have the slight suspicion that what you've done is created a bumpy terrain, and then are trying to get a heightmap solely out of that, without using a surface to project it on.

    You'll need a flat plane which will take your projection modifier, and assign the bumpy terrain as the reference geometry on the modifier rollouts. Then you can render to texture.

    This would go easier if you posted screenshots of everything. Post a screen of the render to texture dialog, your viewport, and the projection options dialog.

    If you have access to mudbox, you can get terrain heightmaps much easier by starting out with a plane, and then doing 8-bit displacement mapping.
  • EarthQuake
    Options
    Offline / Send Message
    Post some images of your models, the problems your getting, etc.
  • Cyph3r
    Options
    Offline / Send Message
    Cyph3r polycounter lvl 9
    Test_Level_new6.jpg

    This level, with the bridges deleted obviously.

    can someone go through step by step what i need to do to render a heightmap from this please?
  • CrazyButcher
    Options
    Offline / Send Message
    CrazyButcher polycounter lvl 18
    put a orthographic camera on top of it all looking downwards. and use "render elements" to get the depth buffer into a texture. adjust near and farplane of camera to be within the limits. that would be my try.
  • gamedev
    Options
    Offline / Send Message
    gamedev polycounter lvl 12
    1 - delete your water and bridges.
    2 - place a plane mesh underneath the island meshes
    3 - open render to texture (press 0)
    4 - enable projection mapping, and pick the islands as your source objects.
    5 - grab the cage and pull it up above the islands. Just make sure the cage doesnt intersect the islands. And you may want to reset the cage first.
    6 - Add a height map to the element list.
    7 - choose a size and location for the map and bake.

    hmap.jpg
  • Tumerboy
    Options
    Offline / Send Message
    Tumerboy polycounter lvl 17
    Ignore them! LOL

    Make an ortho camera looking down from above. Apply a gradient texture into a diffuse slot (black to white). Apply said material to your land mass. UV the whole thing from the side, using Fit, to autosize the texture.

    Render camera.
Sign In or Register to comment.