PnP TerrainCreator - Forum

The PnP TerrainCreator Forum
It is currently Mon Nov 20, 2017 1:19 pm

All times are UTC




Post new topic Reply to topic  [ 12 posts ] 
Author Message
 Post subject: Exported heightmaps look blocky
PostPosted: Mon Oct 19, 2009 10:46 pm 
Offline

Joined: Sun May 31, 2009 9:45 pm
Posts: 20
I tried exporting heightmaps in these combinations: size 256 bpp 8, 16, size 512 - 8bit, Raw
The result is always blocky. I must be doing smth wrong i wouldnt imagine all of the guys using it are satisfied with the result im getting.
Attached are a few sample pictures (im aiming 256 and 8 bit but ill be satisfied if it worked on a higher res as well)
What could it be?

If i zoom in on the gray scale image it shows the blocks clearely in the places where they appear in my renderer as well.


Attachments:
Images.rar [56.97 KiB]
Downloaded 623 times
Top
 Profile  
 
 Post subject: Re: Exported heightmaps look blocky
PostPosted: Mon Oct 19, 2009 10:54 pm 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 892
Location: Braunschweig
can you show me a rendering, please?


Top
 Profile  
 
 Post subject: Re: Exported heightmaps look blocky
PostPosted: Tue Oct 20, 2009 6:52 am 
Offline

Joined: Sun May 31, 2009 9:45 pm
Posts: 20
Sure here you go, i attached a new image which works but is not made with pnp (the transitions between gray shades is smoother or that one for all i know)

This image and the image in the last post are both the same, 8 bit png and bmp (i exported png at 512 res from pnp as well and is the same)


Attachments:
terrain.png
terrain.png [ 100.67 KiB | Viewed 515 times ]
StrandedRendering.jpg
StrandedRendering.jpg [ 51.25 KiB | Viewed 577 times ]
Top
 Profile  
 
 Post subject: Re: Exported heightmaps look blocky
PostPosted: Tue Oct 20, 2009 7:04 am 
Offline

Joined: Sun May 31, 2009 9:45 pm
Posts: 20
and here there is a better rendering pov which shows the blockiness of the rendered terrain better and i also attach a good rendering using the previously attached image

The conclusion i draw from this is that somehow the heightmap output from pnp doesnt export smooth gray scale images.


Attachments:
StrandedGoodRendering.jpg
StrandedGoodRendering.jpg [ 59.54 KiB | Viewed 509 times ]
StrandedRendering.jpg
StrandedRendering.jpg [ 62.41 KiB | Viewed 546 times ]
Top
 Profile  
 
 Post subject: Re: Exported heightmaps look blocky
PostPosted: Tue Oct 20, 2009 8:39 am 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 892
Location: Braunschweig
Well, as far as I can see, this is a direct consequence of the quantization taking place when exporting a real valued heightmap into an 8 bit image.
http://en.wikipedia.org/wiki/Quantization_(signal_processing)

You can of course smooth the bitmap, for example with an average, median, or gaussian filter, but you will loose a lot of details.
The best way to go is use 16 or 32 bit for the heightmap using the RAW export filters. If you use 16 bit (integer/WORD) make sure that you map the heights to an appropriate range. With 16 bit you have a value range from 0 to 65535; so if you map a height range from 0 to 20000 meters (the default values of PnP) to this value range, you achieve a vertical resolution of about 30 centimeters. So I'd suggest setting the height range of your terrain as close as possible to the actually used height values. If you use 32 bit (FLOAT) as RAW export format, you will have the same precision as used within TC.

There is also a small note about this on the bottom of this page
http://wiki.pnp-terraincreator.com/doku ... eps:export


Top
 Profile  
 
 Post subject: Re: Exported heightmaps look blocky
PostPosted: Tue Oct 20, 2009 9:30 am 
Offline

Joined: Sun May 31, 2009 9:45 pm
Posts: 20
I tryed again the raw export again and yet is blocky, cant tell why. The first attached image shows it.
I got back to exporting to 8 bit bmp heightmap, i used the adapt option and it found a height of 20 for my terrain, i had to make the max to 50 cause pnp doesnt like it less. Now is less blocky (i tried to smooth the inclined areas with the average brush but there isnt to much change to the final result. The second attached image shows it

Thank you for the support!


Attachments:
StrandedRAWBlocky.jpg
StrandedRAWBlocky.jpg [ 96.18 KiB | Viewed 570 times ]
StrandedLessBlocky.jpg
StrandedLessBlocky.jpg [ 85.1 KiB | Viewed 578 times ]
Top
 Profile  
 
 Post subject: Re: Exported heightmaps look blocky
PostPosted: Tue Oct 20, 2009 9:58 am 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 892
Location: Braunschweig
What options do you use for the RAW export?

I don't mean the average filter within TC; this will only slightly improve the result. The exported bmp heightmap should be averaged. You can try and do this in any painting program.


Top
 Profile  
 
 Post subject: Re: Exported heightmaps look blocky
PostPosted: Tue Oct 20, 2009 10:50 am 
Offline

Joined: Sun May 31, 2009 9:45 pm
Posts: 20
2byte data, 64 patch size, one file, size + 1, factor 1, no fullscale, no flip y, no offset to 0.
The result raw file when i load it into the program shows correct width and length for the terrain but very very small height...if i scale the height with max int on 2 bytes (65 thousand) then i get the correct height, but the blockiness is like in the last image... So what might happen is that my terrain values height is mapped to a very small range from the values it can take in 2 bytes and hence the result


Top
 Profile  
 
 Post subject: Re: Exported heightmaps look blocky
PostPosted: Tue Oct 20, 2009 11:30 am 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 892
Location: Braunschweig
Try using a factor of 10 or 100.
Or use the full-scale option (after you adapted the height range).


Top
 Profile  
 
 Post subject: Re: Exported heightmaps look blocky
PostPosted: Tue Oct 20, 2009 11:45 am 
Offline

Joined: Sun May 31, 2009 9:45 pm
Posts: 20
Man, that did it (full scale), it looks perfect now
Thanks a lot!
PS: if you fixed the scalling problem when exporting Ogre mesh would be great. As it is now the mesh is only scalled on horz but no vertical


Top
 Profile  
 
 Post subject: Re: Exported heightmaps look blocky
PostPosted: Tue Oct 20, 2009 12:34 pm 
Offline
Programmierdochfix
User avatar

Joined: Tue Apr 27, 2004 12:53 pm
Posts: 892
Location: Braunschweig
Take a look at your other thread ;)
viewtopic.php?f=8&t=879
I fixed it this morning.


Top
 Profile  
 
 Post subject: Re: Exported heightmaps look blocky
PostPosted: Tue Oct 20, 2009 12:57 pm 
Offline

Joined: Sun May 31, 2009 9:45 pm
Posts: 20
Hey thanks, quite a surprise :)


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 12 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron