Page 1 of 1

Import 3d model as terrain / 3d mesh to heightmap

PostPosted: Tue Mar 30, 2010 1:31 pm
by mattmatt
Hello :)

Im wonderng if l3dt can import 3d models as terrains, I allready have a nice terrain that I would like to work on in l3dt, is this possible ?

Or I am also trying to get a heightmap from the 3d mesh of the terrain itself but with no luck, ive tried z-depth from camera in Maya and a few other things, any tips on how I could get a 3d model to just the heightmap ? It dont have to be exact :)

Thanks for any help !

PostPosted: Thu Apr 01, 2010 1:05 pm
by Aaron
Hi Mattmatt,

At this time L3DT does not have an algorithm to rasterise a 3D terrain model into a heightfield. My only suggestion would be what you are already trying; z-depth camera in Maya, Blender, or similar 3D rendering/modelling engines.

Perhaps a member of the community has experience with this and can offer some advice? (anyone, anyone?)

Best regards,
Aaron.

PostPosted: Thu Apr 01, 2010 11:38 pm
by Brad789
I saw a Blender tutorial once on a way to do this and the concept might help you. In the tutorial the writer creates a grayscale image that is a gradient that is white at the top and black at the bottom. Then they used whatever is the up axis to determine the texture coordinate. So all texture coordinates are generated off of how high each point is. Also I think lighting and materials was disabled because the displayed texture must not be altered by material or lighting information. It seemed there was some fine tuning they had to do to get the top of the gradient to match up with the highest point. Also when you do this they note that when you do this you will probably get some stair stepping because an 8-bit grayscale image only has 256 possible values. You can probably get rid of that effect by running a smoothing filter in L3DT.

PostPosted: Thu Apr 22, 2010 11:25 pm
by Telarus
I just learned how to crunch this through Maya. Unfortunately, I have class soon, and saw this just as I'm jumping in the shower. Here's a quick breakdown. I'll check back after class.

The function you're looking for is called "transfer maps", and you need 2 objects.

1) the complex 3d mesh height field. This will need to have a vertically projected ramp shader from black (low) to white (high).

2) a flat (poly or nurbs plane). this hovers above (just not touching) the terrain.


The Transfer Maps tool will have you draw a box. Draw this around BOTH objects. It will then "bake" the texture onto the flat plane.

Search for "texture baking" and "transfer map tools" for the specifics.


EDIT: I seem to be mixing up 2 workflows. I'm writing a couple of tutorials on these different workflows. I'll post a link to my blog when the 1st one is done.

PostPosted: Sat Apr 24, 2010 2:35 am
by Telarus