necdel
Member
|
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 |
|
Esenthel
Administrator
|
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 |
|
necdel
Member
|
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 |
|
Ozmodian
Member
|
RE: Area Heightmap distortion when drawing back?
Hi there,
That code looks familiar... . 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 |
|