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
 Scale Terrain « View previous topic :: View next topic » 
Author Message
ckinard
PostPosted: Tue Apr 29, 2008 3:37 pm    Post subject: Scale Terrain Reply with quote



Joined: 25 Apr 2008
Posts: 7

Hi All,

I have just finished my terrain, but unfortunately it is exporting a lot larger than I had hoped. I now know what size it needs to be to load properly in our engine. What is the easiest way to recreate this with the proper scale? I wish I could just load a heightmap on a zone and not have to mess with the RAW importer. I just can't get the RAW importer to give me the same size and resolution.

Here is what I have done:
1) Exported a raw file from my final terrain.
2) Imported as raw into a new scene. Unfortunately terrain mesh is far to dense and not the scale I need.

I need my newly created terrain to be the following scale:

Terrain Dimensions
Edge: 41000

X Zones: 1
Y Zones: 1

Center Position
X: 2709
Y: 0
Z: 9795

Any help would be appreciated. Also, any word as to when we will be able to move/scale terrain inside of Grome. This seems to be a huge limitation.

Thanks,

Corey Kinard
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Apr 29, 2008 4:02 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Hi,

Raw is just an enumeration of the heights. It doesn't contain any dimensions so the resize of the terrain must be done when importing it in your engine.

So, first, I need to ask what is the resolution of your terrain? How many tiles does an edge has?
For example, if your terrain is of 1024 by 1024 tiles, to find the correct size between two height vertices you need to divide your desired edge size to the number of tiles. In this case 41000 / 1024.

Also, what engine do you use? The actual RAW import operations greatly depends on your engine. In case your engine is a public licensed one and we have access to its documentation I can provide more hints.

To be noted that Grome comes with a SDK so you can write your own save plugin directly to your engine format. You can also do a rescale plugin that can be called from inside Grome.

Regards,
Adrian L.
Back to top
View user's profile Send private message
ckinard
PostPosted: Tue Apr 29, 2008 5:01 pm    Post subject: Reply with quote



Joined: 25 Apr 2008
Posts: 7

Sorry about that. Here is the information on the terrain size I need:
Tiles No: 70
Terrain Dimensions
Tile: 585.714
X Zones: 1
Y Zones: 1
Center Position:
X: 2709
Y: 0
Z: 9795

What settings on the raw import would I have to use in order to get a terrain that matches those size, resolution and placement?

Also my RAW image file is 2048x2048.

Thanks,

Corey Kinard
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Apr 29, 2008 5:17 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Hi, when you referring to tile do you mean the space between 2 vertices or a terrain zone? I'm asking this because if your RAW file is of 2048 by 2048 it means that it most probably creates 2048 by 2048 tiles (that is 2049 by 2049 vertices) in your engine.

By multiplying 70 with 585.714 it yields almost 41000, which makes me think you have one terrain zone of 70 tiles, with a distance of 585.714 between 2 vertices. Please confirm this.

If this is the case, you should use the Global Large Data Sets exporter and use 585.714 for the heightmap resolution. It should create you a RAW of 70 by 70 tiles (71 by 71 pixels)

Import this into your engine specifying the same distance between vertices (585.714) or the total edge size (41000). The way you import is really dependent of your engine. The same with position, really depends on your engine. Let me know what engine you use and I may able to help you.

From Grome, you need to make sure you use the same export heightmap resolution as the tile size (585.714) so you get a 70 by 70 raw in the end. There are no other raw export options you can have.

About the terrain height.... The raw contains the data normalize in 0 to 65535 (maximum 16bit) range. Again, correct height must be computed when importing into your engine (transform from unsigned 0 to 65535 range to the range of the terrain height in Grome).

So one thing to be noted here is that raw is basically a "raw" format, doesn't contain any size or other descriptive information. It is just an enumeration of heights. It is the engine responsibility to reconstruct the correct terrain during import. For this the user must know what is the correct size between height as read from raw, and what scaling to apply to the heights. And this transformation must be done in your engine, not at export.

Let me know how I can help you from here. Best would be if you can post some screenshots with the terrain in Grome, the export UI options you've used and the image in your engine.

Regards,
Adrian L.
Back to top
View user's profile Send private message
ckinard
PostPosted: Tue Apr 29, 2008 5:44 pm    Post subject: Reply with quote



Joined: 25 Apr 2008
Posts: 7

Okay, I was able to get the terrain close in look and size. However, the terrain created from the raw file is higher than the original. Here is a screenshot and my settings.



Thanks,

Corey Kinard
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Apr 29, 2008 5:51 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Hi, when importing try using Range option (rather than scale). Now to get the correct range, before exporting it go to Grome menu, at Utilities and choose Scene Statistics. Then look at the Terrain height range, there is the terrain minimum and maximum for your scene. Use those values for import and for your engine. Hope this helps.
Back to top
View user's profile Send private message
ckinard
PostPosted: Tue Apr 29, 2008 5:58 pm    Post subject: Reply with quote



Joined: 25 Apr 2008
Posts: 7

Thanks for the help, but yeah, I cannot get this to match up properly in Grome. I have a deadline on this tomorrow, so I will be faster just to make it again. PLEASE implement scaling in Grome soon. A task as simple as this shouldn't be this difficult.

Thanks,

Corey Kinard
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Apr 29, 2008 6:10 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

You have vertical scaling Grome. Goto Tools tab, at Terrain, Modifiers, select heightmap from the list and then open the Elevation tool. Select Scale, use terrain lower part as origin and put the proper scaling value at scale. You also have Lower and Raise in case you want to move up or down.

If you are referring to (horizontally) resizing, yes, this is not yet implemented in Grome but can be done with the SDK. Much of the difficulty with it comes with keeping the neighboring of the zones valid (and not the actual modifier), but we plan it for a future version.

Also the import heightmap range should work using the exact values as reported by the scene statistics plugin.

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