Reply
Reply
 
Thread Tools Display Modes
Dario_ff's Avatar
Old (#1)
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):


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


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.
Offline , null, 4 Posts, Join Date Jan 2011,  
   Reply With Quote

Dario_ff's Avatar
Old (#2)
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.
Offline , null, 4 Posts, Join Date Jan 2011,  
   Reply With Quote

Xenobond's Avatar
Old (#3)
Make sure that for all tiles you use the same scale for the y axis. Otherwise height information would be different for each piece.
Kurtis Smith
Senior Artist - Petroglyph Games
Offline , dedicated polycounter, 1,886 Posts, Join Date Nov 2005, Location Las Vegas, NV  
   Reply With Quote

Dario_ff's Avatar
Old (#4)
Quote:
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.
Offline , null, 4 Posts, Join Date Jan 2011,  
   Reply With Quote

Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Copyright 1998-2012 A. Risch