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?
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.
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.
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.
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?
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.
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.
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.
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.
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.
Replies
Have you guys tried using the generated heightmaps as a base for specular maps, and what are some of the pros and cons?
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.
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.
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.
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.
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?
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.
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.