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
 Units/Tiles/Dimensions help « View previous topic :: View next topic » 
Author Message
makit3d
PostPosted: Mon Apr 02, 2007 12:18 am    Post subject: Units/Tiles/Dimensions help Reply with quote



Joined: 10 Feb 2007
Posts: 123

It's been a long weekend and I am trying to work on Grome with a nasty headache. It may be these reasons I can't seem to get these terrain dimensions figured out.

Each tile of my map is approx. 3.96km in the x & y directions (each map tile is an 8-bit 128px image). I've been trying to create a terrain that would provide me the right scale (using the included trees for reference) while keeping the memory usage low.

It would seem that each time I either run out of memory, run short and eveyrthing slows down because it's running from swap space or it won't create at all. Also, I can't seem to get the scale to work out either. It never seems large enough. I know I am tired and am attributing my lack of success to this problem and I am hoping the Grome team can shed some light on the answer (I do realize this is not your concern, but it would really save me another headache).
Back to top
View user's profile Send private message
ALicu
PostPosted: Mon Apr 02, 2007 6:30 am    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1328

Hi,

Can you give me more details?

- What is the total terrain size?
- How many tiles you want in it? I assume that you are referring as tile to the editor "zone" concept, right?
- Also what is the approximate resolution you want from your terrain?
- From what format do you import your data (if you are importing some of it)?
- What measurement units do you use in your engine? (cm or km for each unit?). Don't use the demo trees as references because they may be in other units than yours.

Most probably you run out of memory because you are creating one big zone for your entire terrain and the video card/system cannot allocate that continuous data. You need to break it up in multiple zones. If you give me more details I can help you create a optimum sized terrain scene.

Regards,
Adrian Licu
Back to top
View user's profile Send private message
makit3d
PostPosted: Mon Apr 02, 2007 12:25 pm    Post subject: Reply with quote



Joined: 10 Feb 2007
Posts: 123

I've been trying for a terrain that is 512 @ 1 with 2x2 zones. I've also tried various dimensions such as 1.5,12.5, etc. as well as more zones (3x3, 4x4 zones).

I have 512 maps tiles (individual map images that make up one map) @ 128px (x,y) each. This was exported from Global Mapper as a .JPG, imported into PS, sliced, turned into an 8-bit image and then exported for use in Grome as 512 seperate images.

The desired map size would ideally be 512 @ 1 w/2x2 zones (or 1 zone if I had the memory for it).

Does that help?
Back to top
View user's profile Send private message
ALicu
PostPosted: Mon Apr 02, 2007 12:42 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1328

So (just to be sure I get this right) you need to construct a map of 3.96 by 3.96 Km by multiple zones of 512 by 512 tiles (every one from a 128 by 128 pixels 8 bit greyscales). Right?

Ok. You can create 2 by 2 zones of 512 tiles. Now, you need to calculate the tile size so the map is 3.96 by 3.96 Km in total. So basically 2 zones (because you have 2x2 in total, so 2 per edge) must have 3.96 Km, which means that 1 zone must have an edge of 1.98 km (=3.96/2).

So you have 512 tiles which must cover a distance of 1.98 Km, which means that you must have 1 tile = 1.98/512 =~ 0.00387 Km = 3.87 meters per tile (you can actually choose 4 meters if size precision is not an issue).

To verify if we made the calculus right: 3.87 x 512 x 2 = 3962m = ~3.96km.

It may seem complicated by in reality it is not Smile

You can go the other way around. Determine what resolution you want for your terrain. For example let's say we want 10 meters between 2 vertices. So we choose 10 units per tile. So a 3.96km zone is made of 3960m/10 = 396 tiles. So you can create a zone of 396 tiles. Because this is not a power of two number (and your engine may need that) you can make multiple zones of 256 and 128 tiles to cover that.

Hope this helps.
Back to top
View user's profile Send private message
makit3d
PostPosted: Mon Apr 02, 2007 3:28 pm    Post subject: Reply with quote



Joined: 10 Feb 2007
Posts: 123

Thank you. The explanation makes more sense than me trying to do it while all drugged up.

But, to clarify my post. I have 512 tiles of 128px each. Each tile is 3.96x3.96 km. Each of the 512 tiles combines covers an area over 32,000 sq/km. Basically I am creating Normandy, France and a portion of the area beyond it's borders.

My main focus was to test the scale using one 128px image and create a single 512 map. The precision has to be pretty close, but I think I can get by with 4.0km instead of 3.96km for the distance across each map.

Your logic and caculations make sense. I can use them to figure this out. If not I hope I can still find a shoulder to cry on...

To clarify the overall situation I have a link to an image I believe will help.
http://www.rizenet.com/1944/march/grid1c.php

Update: Just did a measure of the overall map I am working with. It is 256km x 214km (54,784 sq/km).

Would it be more efficient to create a single map from the one image and generate many tiles with Grome? This would appear more efficient than having 512 overall small images to use as maps and stitching them together in Grome.
Back to top
View user's profile Send private message
makit3d
PostPosted: Tue Apr 03, 2007 2:21 pm    Post subject: Reply with quote



Joined: 10 Feb 2007
Posts: 123

I believe I have this figured out. I created a cube that is 4km x 4km x 4km in 3ds max (most of our work is done in max) and exported it. Importing into Grome provided me an excellent method of reference. Now I have to increase the detail for the terrain as it seems to be a lower res than it should be.

However, this brought about a new problem. When I created the cube in max I use the keyboard entry method and immediately exported and exited the program without saving. When placed the cube within the Grome scene it was rotated a few degrees.




Notice the cube below the terrain and the trees which I placed in the scene to get a sense of scale. This is a great deal of fun now. Smile
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Apr 03, 2007 2:31 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1328

Hi, yes you can place all sorts of gizmos in the scene to get the feeling of the scale. You can for example export a biped from your game assets to see exactly how a character looks inside your scene.

About exporting. What do you mean by rotated? Is it rotated in Grome scene even though you didn't give any rotation to the instance while in Max it is centered on origin? Also, what format did you used? COLLADA?
Back to top
View user's profile Send private message
makit3d
PostPosted: Tue Apr 03, 2007 2:45 pm    Post subject: Reply with quote



Joined: 10 Feb 2007
Posts: 123

Yes, rotated in Grome even thought it wasn't rotated in Max. I used the COLLADA export.

Does COLLADA provide for a group export of an object? I went to place a location in Grome after exporting from Max, but it had been exported as individual objects rather than a complete scene. Is this normal? I realize this isn't a COLLADA forum, but since I'm here.... and you're here... and....
Back to top
View user's profile Send private message
ALicu
PostPosted: Tue Apr 03, 2007 5:16 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1328

Don't know if it exports the MAX groups as a single object. What I know that it works is to have a single max object with submaterials. The exporter doesn't break it in multiple objects but rather in a single object with multiple surfaces (each with a different material). The collada.org guys should know more (or the developers from Feeling Software).
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