3ds Max to generate 2d height map from model

FictiousWill

Newbie
Joined
Jul 22, 2003
Messages
2,658
Reaction score
1
I have a 3d model in max, and would like to generate a 2d top-down height map of it. Any idea how?
 
use linear fog (black) and color the entire model pure white, or a gradient surface, linear from black to white, the white part being closest to the camera, or use the depth buffer (z-buffer) if Max has an output for that buffer, which I imagine it will have. Depending on what you plan to use it for, try get a none perspective distortion, IIRC simply rendering from one of the viewports in Max will do that just fine.
 
i dont know anything about this kind of thing, so go with Fenric, but my first thought was to make a gradient texture and map it from the side, so the black is at the bottom, and whitens out higher up. then take a top view shot of it...would that work Fen ?
 
Nope, the fog refuses to render in an ortho window or a flat camera, and the gradient does not fade through when viewed from the top rather than the side. Perhaps I am not setting up the fog right? Even so, I still get problems from the ambient lighting in the scene. All I want is a 2d height map, surely there is a correct way to create one and not a work-around?
 
random: Yup, that should work fine. The trick is simply to get the top parts white and the low bits black

Will: hmm, ok tell ya what, if you can't get it working, send it over via ICQ and I'll knock out a map for you

Question, is this for a bump map yeah? If its for a normal map you don't want to be doing what your trying to do as it wont work

Here's a couple of examples, One using a proper depth buffer. The other one was via the fog method (100% luminous objects, no lighting atall, no shadows and linear fog with its most distant and closest points just fitting the extents of your object. Notice little to no difference

depthexample.jpg

depth version

fogexample.jpg

Fog version
 
That's exactly what I want, I'm not on ICQ though. I'll just upload the .max file in a few minutes and PM you with the url or post the url here.
 
Nevermind - the fog method seems to work fine (The heightmap is inverted in max so I just reinvert it in a drawing program, go figure). Thanks for the quick replys and help!
 
FictiousWill said:
Nevermind - the fog method seems to work fine (The heightmap is inverted in max so I just reinvert it in a drawing program, go figure). Thanks for the quick replys and help!

Yeah the depth buffer inverted for me too, inverted back its just fine. The fog effect works great for this sort of thing, its probably easier to setup than a gradient on complex objects, and providing you have some visual input in your app, such as atleast two rings, one for where the fog is at 100% and one where its at 0% so you can easily position it to bound your object then it'll work fine every time.

It's also good for certain kinds of renders too. Having a black dense fog very close in can turn a pretty boring model into something quite impressive. I got the idea from Dave Adams, one of the big guys from the now departed Foundation Imaging (I think he's at Dreamworks now) anyhoo he was working on a Vampire head and used the close fog on that, was a brilliant effect. So I tried it out on a model I did of an ex and with some noise and some, I'll be honest, quite lame facial animation. I managed to create a pretty realistic animation of her. Surprised the hell out of me how well it worked. Otherwise it was a pretty simple and rather boring head with no hair. Looked almost photorealistic with the fog trick applied, like I'd done more work on it than I really had at that point heh. Insider tricks are handy :E I bet I've still got that or one of them knocking about somewhere on an old backup, if I ever find it I might post it.
 
VERY SIMPLE WAY TO DO THIS!

  • Make a new material
  • Make diffuse black
  • Assign a gradient map (black to white) to the self-illumination
  • Select the entire model, and make a UVW map, with the plane oriented to the side of the model, or use a box, and make sure the orientation/size is correct.

You can make all sorts of adjustments to the gradient for fun effects.
 
phantomdesign said:
VERY SIMPLE WAY TO DO THIS!

  • Make a new material
  • Make diffuse black
  • Assign a gradient map (black to white) to the self-illumination
  • Select the entire model, and make a UVW map, with the plane oriented to the side of the model, or use a box, and make sure the orientation/size is correct.

You can make all sorts of adjustments to the gradient for fun effects.
How incredibly long winded :)

fog trick

1. make black fog
2. make surface pure white
3. render

done
 
I'm using the heightmaps for a basic 3d engine. By using multiple heightmaps and modular level design (as well as strategic placement of bridges, i.e. very few :D) I hope to be able to reasonably simulate 3d collision detection. A demo of the engine can be downloaded from here:
http://www.angelfire.com/wi3/williamresume/Hosted_Extras/Engine_Demo_1.zip

Right now you can scale any height, and the heightmap is working reasonably well. The heightmap for the whole area in the demo there is only a tiny 100x100 pixels. I hope to increase the resolution to at least 512x512 for a similarly sized area, to improve the height detection on smaller objects like the boxes (or anything else that is small in the game world). Using the heightmap technique I can do curved surfaces too, but there are none in the demo.

The final product is most likely going to be a singleplayer doom-style fragfest. I have a 2d rpg in the works, too - but that is a larger project and I'm taking a break from that for a while.
 
Back
Top