I cant figure out how to do it in 3ds max. It just says all the rays miss when I try to bake it.
I just got blender, could you go through step by step on how you got your displacement map? I have no clue how to use this program.
The quick way:
Model your asteroid, set the render sizes to output a texture of the desired size (use the Camera button whose tooltip says Render in the horizontal bank of buttons on the right hand side of the default view, assuming Blender 2.57). Position the camera relative to the object to get the correct view of the asteroid. Select the asteroid and press Numpad-0 to get a camera-view; scale the object appropriately so that it fills the view. If desired, you can switch to an Orthographic perspective; for this, select the camera and go to the Object Data submenu on the right (the icon to get there, with the camera selected, will be a side-view of an old-fashioned projector-style camera). Under the camera Object Data, you can switch to ortho projection and adjust camera settings. Obtain a view of the asteroid that fills as much of the camera viewport as you can.
In the lower-left corner of the default 3D view is a button to switch views. Select it and go to Node Editor view. Along the bottom of this view are 3 picture icons; a black and yellow circle (material nodes), a red/white checker icon (texture nodes) and an icon that looks like two images stacked on top of each other (compositing nodes). Select the compositing nodes, then check the box that says Use Nodes. When checked, two default nodes will appear; the larger will be labeled Render Layer, and there will be some lines connecting them. Disconnect the lines by dragging the endpoints of the lines away from the smaller box so that the nodes are completely disconnected.
Next, at the bottom of the view you see a menu bar that has submenus for View, Select, Add and Node. Click Add, go to the Vector submenu, and under Vector choose Normalize. (Not Normal; Normalize should be the last entry). Select Add again, go to Color submenu, and select Invert. Now, from the Render Layer node, click and hold on the Z output, and drag a line to connect with the Value input of the Normalize Node. (inputs are on the left sides of nodes, outputs are on the right.) Connect the Z to the Normalize node, connect the output of the Normalize node to the Color input of Invert, and connect the Color output of Invert to the Image input of the smaller Composite node. When done, the nodes should look something like this:
[attachment=2447:BlenderScreenNodes.png]
Now, if you click the little camera icon on the Render Layer node, it will render the view from the camera, capture the depth (Z) map of the render, feed that Z map through a normalize and invert process, and spit out the final result as the render. From the render preview window, you can select Image->Save As Image to save out the displacement map.
This is slightly different than the baking method I discussed earlier, and will probably be a little bit easier, at least to do the displacement maps.