Home Technical Talk

Rendering a particular heightmap [Max]

Hello Polycount, just joined in to ask a question.

I'm playing around in doing a 2D ISO engine, and for some clever effects and game logic, I would need to know the "height" of each pixel in my rendered bitmaps. The height would just be the z coordinate it represents in the real model.

I've been trying out the Bake To texture option, but I'm not really familiar with the settings and I only got wrong results(since I guess it's relative to the projection but not the ground).

For rendering I need to set the projection plane in the way of an ISO camera. Since I also need to bake the normals(though I'm still not sure if it's alright, but I'll find out later.

The particular type of rendering I want would be something like this(faked in photoshop):
scr1.png

That'd be the "final" render, and this the height map. (Again, I did a quick photoshop to show the idea):
scr2.png

As you can see, the height map would correspond with the z coordinate. Is this possible with tweaking the settings in Render To Texture in some way?

I've tried doing a gradient material and put the UV Map coordinates, and it somehow worked(though messed up sometimes due to the weird nature of the meshes). But I didn't really like that way at all, and I'm willing to believe it's just possible with Render To Texture.

Thanks for reading, I'd appreciate any help. :)

Replies

  • Dario_ff
    Options
    Offline / Send Message
    Sorry for double posting, but I figured it might be useful to someone.

    I solved this by using the gradient I described before, doing a UV map on the Y axis and fitting it to the model, using 100 as the self-illumination, and done! The results are exactly the same as the ones from a height map no matter the viewpoint.
  • Xenobond
    Options
    Offline / Send Message
    Xenobond polycounter lvl 18
    Make sure that for all tiles you use the same scale for the y axis. Otherwise height information would be different for each piece.
  • Dario_ff
    Options
    Offline / Send Message
    Make sure that for all tiles you use the same scale for the y axis. Otherwise height information would be different for each piece.
    I'm using a different approach, so that each individual objects can be set different height values. So it doesn't really matter the scale on the Y axis, but that full black is the bottom of the object, and that full white is the top.

    I resurrected this thread to ask kind of the same question again. I had decided before to go the "collapse all" "apply new maps" way before, but this method is complicated when it comes to animated objects. So I figured out a way to make the normal maps relative to the world axis with a material, so that works well.

    What I would like to figure out now is a way of doing these heightmaps without having to collapse all the objects into one and apply an UVW map. If I could get it working by just applying the materials to all the objects, it's fine for my purposes.

    Sorry again for resurrecting the thread, I just saw it was more fitting to this one.
Sign In or Register to comment.