www.quadsoftware.com
FAQ  FAQ   Search  Search   Memberlist  Memberlist   Usergroups  Usergroups
Register  ::  Log in Log in to check your private messages


Post new topic  Reply to topic
 Heightmap Import « View previous topic :: View next topic » 
Author Message
vahid
PostPosted: Sun Jul 05, 2009 1:38 pm    Post subject: Heightmap Import Reply with quote



Joined: 03 Jul 2009
Posts: 2
Location: Stockholm

I have a 13825x11521 pixels heightmap which I want to import to Grome, I want to know if there's a direct way to do it without splitting it up?
Back to top
View user's profile Send private message Visit poster's website
ALicu
PostPosted: Sun Jul 05, 2009 5:00 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Hi,

What format is your heightmap? What engine are you using?

Maybe best way is to use the raw importer. Save the heightmap into 16 bit raw (using a program like Photoshop) and then use that raw importer by choosing to break it into multiple zones upon import.

From the memory point of view, the best way is to have multiple zones, each of power of two tiles (a tile is the distance between two vertices, so if you have power of two tiles, you have power of two + 1 vertices per zone). Grome supports multiple terrain zones.

Unfortunately your heightmap is not power of two. You can choose to import 25 by 25 zones of approx. 553 tiles each. Or you can resize your heightmap to be power of two (just resize the canvas in Photoshop and add blank pixels (pad it with new pixels, don't stretch the existing ones) to make the image 16384 by 16384 in size, this being the next size to 13825 which is power of two).

If you resize your heightmap to 16384, then select to create 32 by 32 zones (on OX and OZ) of 512 tiles each during import. Also please check "Unload zones" in the importer so zones are send to swap once they are created. That is necessary since they will not fit all into your memory at once. After importer they are swapped out state. When working on them you can swap them in groups of 3 by 3 or 4 by 4.

Just remember, that best sizes are power of two (Grome supports non power of two but Graphite, the renderer library, and other engines actually support only power of two so they can apply terrain LOD). And the best sizes are 512 by 512 tiles or 1024 by 1024 for each Grome terrain zone. The scene can be made of as many zones as you like, but not all of them will fit in memory at once, so you need to use Grome swap (check tutorials for examples).

Regards,
Adrian L.
Back to top
View user's profile Send private message
vahid
PostPosted: Sun Jul 05, 2009 5:32 pm    Post subject: Reply with quote



Joined: 03 Jul 2009
Posts: 2
Location: Stockholm

Hi Adrian,

Thanks for the answer.

I am using 16 bit RAW format, and Graphite engine.
Back to top
View user's profile Send private message Visit poster's website
ALicu
PostPosted: Mon Jul 06, 2009 6:40 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Ok,

Let me know if you have problems with importing it. I can send you a FTP account and you can send me the heightmap to try it myselft.

Regards,
Adrian L.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

Jump to:  



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 vote in polls in this forum


Based on a template by Dustin Baccetti
Powered by phpBB © 2001, 2005 phpBB Group