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
 Exporting individual tiles - Problem « View previous topic :: View next topic » 
Author Message
Tobbo
PostPosted: Sat Mar 19, 2011 11:02 pm    Post subject: Exporting individual tiles - Problem Reply with quote



Joined: 03 Nov 2010
Posts: 5

If I export the entire scene it works fine. If I export tiles individually the edges do not line up, or they do, but the shade values are different.

I'm using the General Large Data Export to a .png

I matched up the two tiles in Photoshop to confirm my suspicions.



Anybody know what the problem might be or how to fix it?

Thanks,
Tobbo
Back to top
View user's profile Send private message
ALicu
PostPosted: Mon Mar 21, 2011 7:51 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Hi,

This is most probably caused by masks export units per pixel not matching the size of the masks as created in Grome.

Can you send me the following information:
- Size of your masks in Grome
- Size of your terrain zones (the edge o one terrain zone) in world units
- What export options did you choose, mainly the Resolution at Terrain layer masks. Here you can post a screenshot with the plug-in UI before exporting.

Best Regards,
Adrian L.
Back to top
View user's profile Send private message
Tobbo
PostPosted: Mon Mar 21, 2011 9:46 pm    Post subject: Reply with quote



Joined: 03 Nov 2010
Posts: 5

Sorry for being a noob. I'm still learning.
That example was taken from the Mountain Example that came with Grome.

1. How can I find the size of the masks in Grome?
2. How can I find the size of my terrain zones after they have already been created?

Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Mar 22, 2011 8:31 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Hi,

Oh, I see. I've tested the export and then I've remembered that the exported heightmaps are normalized. Basically the PNG format is 1 channel of 16bit containing the height values. So the range of the export is 0 to 65535 (the maximum value representable for 16bit). Grome uses floating point values so it has a very large range on which you can work on the heightmap. The PNG (or raw) cannot contain this range so we need to scale the values to its representable range.

At export, when exporting for one zone, the maximum and minimum heights from that zone is taken and then the values are brought from that [min, max] to [0, 65535]. Then when importing into your engine you need to bring the values back from the 0, 65535 to the original range. The original size is shown in the Input Info entry in the plugin UI, something like: Terrain height: 1861.92 - 3273.45 (min - max).

But, when you are exporting the entire terrain, the height min and max is computed for the entire scene and each zone is normalized in this common range. So they appear continuous when put one next to eachother. Shown terrain height is the global one in this case.

When exporting individual tiles (they are called terrain zone in Grome) they have different normalization ranges so they are discontinuous when put next to each other in their export format. The exporter cannot trivially detect the global range is all cases (for very large scenes for example) when exporting the individual tiles so it uses this per-tile approach.

Now, if you want to control the range of the exporting normalization you can use the Text Export plugin (don't let the name fool you Smile, it can save png heightmaps). There you can select "Export heightmap as 16bit raw/png images" and then press the Options button underneath. From there you can select various options of normalization. These options lets you export all the zones or only the selected ones within a certain range. Look at the plugin help file for details.

To find out details about your scene (the height range is the one we are interested in) you can call the scene statistics plugin (from application menu: Utilities -> Scene statistics and look at Terrain height range (Y)).

You can get this range and use it in the Text Exporter to control the normalization process.

About the size of the masks and heightmaps, this is easy to be found from the layer view (the second tab in the left panel). Choose Selection tab and then the first subtab (the one the icon as with the 5 points linked with lines), the heightmap subtab. You can now press the + button next to the heightmap layer name and see the zones to which the layer is assigned. Under the zones thumbnails you see the sizes (in vertices which is the number of tiles + 1, so usually is power-of-two + 1) of heightmaps:



The same can be done for masks, just open the third tab (the material layers) and expand the layers. You will see the size of the masks (in pixels).

Regards,
Adrian L.
Back to top
View user's profile Send private message
Tobbo
PostPosted: Wed Mar 23, 2011 6:11 am    Post subject: Reply with quote



Joined: 03 Nov 2010
Posts: 5

That fixed the problem. The "zones" line up properly now. Smile Thank you for your detailed responses! They are much appreciated!

-Tobbo
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