About Store Forum Documentation Contact



Post Reply 
Area Heightmap distortion when drawing back?
Author Message
necdel Offline
Member

Post: #1
Area Heightmap distortion when drawing back?
Hello, I am having a slight issue with heightmap distortion or so I think. I am creating a heightmap image from an area.

Code:
Image temp; temp.createSoft(33, 33, 1, IMAGE_F32);

       RectI ah = RectI(VecI2(0,0), VecI2(33, 33)); // area heightmap
         for(int hy=ah.min.y; hy<=ah.max.y;hy++)
            for(int hx=ah.min.x; hx<=ah.max.x;hx++)
               temp.pixelF(hx, hy, the_area.data().height().pixelF(hx, hy));

I have attached an example of an area heightmap I am getting from this. The problem is when I reapply this heightmap, using a similar function above, my world loads great but with jagged terrain? Almost like its the outline of the pixels, giving a staircase effect?

Anyone have any suggestions on what I might be doing wrong?


Using EE 1.0 SDK 22

   
(This post was last modified: 04-11-2013 10:12 PM by necdel.)
04-11-2013 10:00 PM
Find all posts by this user Quote this message in a reply
Esenthel Offline
Administrator

Post: #2
RE: Area Heightmap distortion when drawing back?
Hello,

Quote:The problem is when I reapply this heightmap
How are you doing this?
Are you exporting the image to some file in the process? (using export and not save on image may cause loss of precision)
04-11-2013 10:24 PM
Find all posts by this user Quote this message in a reply
necdel Offline
Member

Post: #3
RE: Area Heightmap distortion when drawing back?
Thanks for the quick reply, yeah I was using export on the height maps to save a bitmap! I will take a look at the save and see what kind of image I get!
04-11-2013 10:33 PM
Find all posts by this user Quote this message in a reply
Ozmodian Offline
Member

Post: #4
RE: Area Heightmap distortion when drawing back?
Hi there,

That code looks familiar... smile. I had the same issue. If you look at the end of my tutorial post, I get a darker section at the intersection of two Areas (randomly, not consistent). I thought it was just my code but I loaded up a vanilla version of Ineisis and got the same issue on the default flat HM.

I have not had a chance to look into it but my guess was it was something the client does on the rendering side. The actual HM image was all correct from what I could tell.
04-12-2013 01:09 AM
Find all posts by this user Quote this message in a reply
Post Reply