getting height maps from imported mesh

was following this tut for making heightmaps in blender and not getting it to work after some digging I discovered that the method only seem to work if the mesh is modelled in blender is this true or can some thing be done to have blender recognise an import obj mesh as a height field.

p.s I should not that the the object imports duplicate vertices and I tend to delete them could that cause the issue

I’m the author of this tutorial [1] and I don’t see a reason for it to not work in your case (You can make heightmaps/bumpmaps out of virtually any geoemtry) The most important thing in the tutorial is the material-setting for your mesh.

At what point in the tutorial do you get problems and what exactly do you get as a result? Maybe the problem is something simple :slight_smile:

EDIT: I supect maybe you are importing the obj with a texture/material already applied. This could be a problem, but should be easlily solved by going into the material panel ([F5]) and clicking on the ‘X’ (Deletes link to this Datablock) next to the MA:xxxx text before creating the heightfield material. … But then again this assumes you’ve skipped the “ADD NEW” part until now :wink:

EDIT2: A screenshot of your model + material-panel could help finding the problem.

Werner

[1] Or at least i’ve created the text+images of the tutorial, the ideas came from somwhere on the web or this forum.

I deleted the materials once I brought the mesh in tried it by following the tut- didn’t work

then I tried appending to your example file deleted the mat and applied yous didn’t work.

the material applies but as a straight colorband white to black with no distortions to represent height

do youknow where I can find a trouble free uploader I,ll post a blend

If i understand you right that’s exactly what should happen. the mesh-parts nearer to the camera should be white and the ones farther away should be black:
http://static.flickr.com/89/232670296_f77c51e3a7.jpg
Imgur

Note: The back-side of the mokey mesh is very far away from it’s face and thus the gray-white differences in the face-area are only minimal.

do youknow where I can find a trouble free uploader I,ll post a blend

Sorry, I’ve never really used such an uploader … no clue :-/

Werner

no you you misunderstand, see the preview window for the material on the terrain it applys like that from left to right regardless of camera distance or mesh height as if it was an unedited plain.

as an experiment try an imported mesh please and see what you come up with

Hmm, strange.

as an experiment try an imported mesh please and see what you come up with
If i import an .obj and apply the heightfield material to it it displays&renders correctly.

Could you send me your blend-file via mail? I’ll send you my mail address via PM.

Werner

Got your email … now it’s clear what’s ‘wrong’ with your imported meshes … either you rotated them in ObjectMode after import or the importer did that without telling you.

The gradient is applied to the objects local axes (these are the ones defined in the “Map to” panel) and is thus rotated as well (i.e no change of colors relative to the mesh) if you rotate the object instead of the vertices in EditMmode. I’ll add a note to the tutorial on that soon.

In your blend file the fastest way to solve this is a simple [Ctrl]+[A]->Apply scale and rotation :slight_smile:

BTW: I suggest you to enable “Draw type” = “Shaded” (icon next to “Object mode”) so you can see the result before rendering.

HTH,
Werner

thank you man most appreciated, it works now