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
 Can Grome 3 import L16 height image format? « View previous topic :: View next topic » 
Author Message
dagri
PostPosted: Wed May 11, 2011 9:35 am    Post subject: Can Grome 3 import L16 height image format? Reply with quote



Joined: 08 Feb 2010
Posts: 3

I know that grome 2 can't import L16 height image format.

Can Grome 3 import L16 height image format?

We need the function.
Back to top
View user's profile Send private message
ALicu
PostPosted: Wed May 11, 2011 11:18 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1328

Hi,

When you said L16 heightmap image format are you referring to luminance (greyscale) 16 bit (one channel) image?

If so, you can export these images in 16 bit raw files (from programs like Photoshop) which are supported by both Grome 2 and 3.

If you are referring to another format, please let us know the details, maybe we can help with conversion tools or an existing import plugin.

Best Regards,
Adrian L.
Back to top
View user's profile Send private message
dagri
PostPosted: Thu May 12, 2011 2:07 am    Post subject: Reply with quote



Joined: 08 Feb 2010
Posts: 3

Hi, Thank you for your fast reply.

The image format is L16 png.
1 pixel is 2 meter.
Max height is 4000 meter



I want to attach a sample image. But I can't. Crying or Very sad
Back to top
View user's profile Send private message
ALicu
PostPosted: Thu May 12, 2011 6:09 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1328

Hi,

You need to use an external uploaded image (An image uploaded somewhere else). Most forums don't allow upload on their servers. Anyway you can send the image directly to me (licu @ quadsoftware.com) and I will try to convert it for you.

Regards,
Adrian
Back to top
View user's profile Send private message
dagri
PostPosted: Thu May 12, 2011 7:14 am    Post subject: Reply with quote



Joined: 08 Feb 2010
Posts: 3

Hi,

I send the image to licu @ quadsoftware.com.

Thank you.
Back to top
View user's profile Send private message
ALicu
PostPosted: Thu May 12, 2011 7:37 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1328

Ok, I've receive it. I will try to convert it in 16 bit raw and see if I can import. I will let you know my results.

Kind Regards,
Adrian L.
Back to top
View user's profile Send private message
ALicu
PostPosted: Thu May 12, 2011 7:58 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1328

Hi,

I've done the following steps to import this file into Grome:

- Open the file in Photoshop (I guess other image manipulation programs can be used)
- Save the file as Photoshop raw. I've chosen Byte Order: IBM PC, and 0 for header (no header).
- The opened Grome and choose File -> Import and selected Raw Terrain Import plug-in (*.raw).
- Selected our raw file and the import plugin detects the size of the terrain zone to be created based on the file size (the raw files don't contain any information about the size of the data so the plugin tries to guess this based on the file size). It seems that the plugin default values are ok. Your image is 257x257 pixels and the plugin correctly detects this. It also uses no header and 16 bit per channel and one channel.
- In the plugin UI, at Heightmap section you need to indicate how big is your zone. You can use a scale factor (to scale between 0 and maximum unsigned 16 bit value of 65535) or more conveniently you can just indicate the minimum and maximum height. For testing I've chosen 0 and 1000 here (1 km height as I consider 1 unit = 1 meter).
- At tile size (the distance between two pixels/vertices in the heightmap) I've chosen 10 (10 meters between vertices) so your zone is 256 x 10 = 2.5 km wide.
- Then at Scene I choose 1 for both Zones on X and Zones on Z so I create one single zone and I center this on 0,0
- Next I press Ok and the zone was created:



You can also use very big raw images with this exporter. In this case you may consider creating more than one terrain zone (512x512 and 1024x1024 tiles are the optimum sizes for one zone). You can also check "Unload imported zones" in the importer so the new zones are sent to Grome swap as they are loaded. In this way you can import very big number of zones at once, without running out of memory.

Also, it is a good idea to have the import images power of two + 1 (as you had in this case). So in Grome the zone is created power of two in tiles number (number tiles = number of vertices + 1).

If you want to avoid the external conversion step (save of the image to raw files) you can create a direct importer from 16 png with Grome SDK (has all the necessary support and examples how to do it). Or you can make an external batch tool which takes a list of 16bit png images, read their pixels and save them in raw.

Kind 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