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
 Grid Decimal Precision « View previous topic :: View next topic » 
Author Message
makit3d
PostPosted: Fri Apr 06, 2007 12:09 pm    Post subject: Grid Decimal Precision Reply with quote



Joined: 10 Feb 2007
Posts: 123

This may not be a necessary feature for most other projects, but for me it would help tremendously.

In the Options for Grid Spacing. In my case I have my Tile Dimensions figured out to the third decimal place. This is necessary because of the accuracy with which I need to build the map. When I set the grid spacing I am unable to get that accurate to facilitate creating Zones easily by snapping to the corner of a previously created Zone.

Presently this is critical because I have discovered I can have that amount of inaccuracy in the design. However, if I was a civil engineer looking to create an accurate rendering of a project that would probably be a critical need.

Thanks!
Back to top
View user's profile Send private message
ALicu
PostPosted: Fri Apr 06, 2007 3:35 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Hi, making more than 2 decimals available in the grid preferences is an easy task (I will make sure it is present in the next update).

Also, note that you can snap a zone to another (at creation) using snap to existing zones. You don't need to have the zones aligned to grid and thus aligned inbetween. I recommend creating first zone by numeric input (on X, Y and Z controls at creations) for precision and then using snap to this zone for the next neighbor zones.

Also, if precision is very important to you, please be careful what units do you choose for your scenes. For example. If you create a flight simulation game, choose Km because the areas are so vast and you usually don't go into miniaturistic detail. If you create a FPS, go for cm as you need to give much closer detail while your maps are not that big.

All the current engines, applications, drivers etc. are using single floating precision for numbers. This numerical representation (on 32 bits) is not always precise enough if you choose the wrong units. With the positions becoming farther and farther from the 0,0,0 origin you encounter loss of precision. You can end up by using 0.008 for a value and actually get 0.01. This creates cracks in the geometry, jaggy animations and all sorts of nasty effects. Program such 3DS Max, has at System units setup an approximation of the precision error you get when you get far away from the origin. See the slider and the value how it changes to get an idea about how the distance from the origin affects precision.

I hope all this information helps,
Adrian Licu
Back to top
View user's profile Send private message
makit3d
PostPosted: Fri Apr 06, 2007 5:12 pm    Post subject: Reply with quote



Joined: 10 Feb 2007
Posts: 123

I have to admit to being somewhat confused. In all honesty the units are still somewhat of a mystery to me. I believe I have my setup for terrain creation correct (and have used reference objects to confirm it), but still don't quite understand the complete concept behind it.

Is there a resource where someone can gain some insight into how this all works? For me I have to know the whole story from beginning to end and not just the current why and how, if that makes any sense.
Back to top
View user's profile Send private message
ALicu
PostPosted: Fri Apr 06, 2007 5:23 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

Things are not very complicated and I can help you here. I just need to know more info:

What kind of game are you building?

How big is a standard map?

What detail do you need for the terrain geometry? (one, two, tens of meters between 2 terrain vertices etc)

What engine do you use? This is very important since the engine may have its own units restrictions.

Also, do you have other assets done? (houses, trees etc). And if so at what units?

That being said, units are pretty simple. Based on your type of game and the detail you want, you choose the units (cm, meters, inches etc).

Usually it is very important to have a very clear specification document based on the technical document from the programming leader (with the engine restrictions: the budget allocated for environment: no of poly visible, no in total, density, texture sizes, texture layers no etc) and on the game design specifications regarding scene playability (where the spawn points are, where the AI units walk etc).

Based on these two the lead level designer makes its own specification document for its team to work with. Units setup and world sizes are part of this document.

So I can give you some generic advices but it is also important to check with the lead programmer and the lead game designer to see if there are any restrictions imposed by the engine/gameplay. The lead programmer can also inform you about the units precision he requires for the engine.
Back to top
View user's profile Send private message
makit3d
PostPosted: Fri Apr 06, 2007 5:52 pm    Post subject: Reply with quote



Joined: 10 Feb 2007
Posts: 123

For now I can provide some of that information.

The game is a FPS. There is one overall map where the player never sees the transition of the individual maps which comprises it. To date, with the 8-bit files, I have 512 128px images that will be used to make up the game level.

I've measured the landscape of the images/maps with and have discovered that each individual map is 3.96km from edge to edge. I can probably get away with 4km since the extra 40m would only add up to 1.28km East to West (x) and 640m North to South (y). Acceptable considering the size of the overall map which is 126.72km (x) by 63.36km (y).

So, overall size would be 128km, 66km @ 4km per map (each indiv. 128px hf image). From what I remember the design docs say we are using a system of cm for our units.

From my calculations and testing I have been using 790 edges, 512 resolution, 1.543 tiles dimensions with 2x2 zones.

I have a cube I created in Max that I import for reference created with 4km, 4km, 4km dimensions. It sits perfectly on the terrain. For the cube I believe I used meters as my units. In that respect I appear to have drifted away from the design docs.

The engine in use is the Trinigy Engine.


Last edited by makit3d on Fri Apr 06, 2007 6:29 pm; edited 1 time in total
Back to top
View user's profile Send private message
ALicu
PostPosted: Fri Apr 06, 2007 6:14 pm    Post subject: Reply with quote



Joined: 12 Feb 2007
Posts: 1326

So basically you have the map of Normandy broken in multiple tiles (zones in Grome) of 128 by 128 pixels. Each of this zone is 4km by 4km in real world units. The game is FPS and you are using cm.

Ok. First, I suggest using meters. For such a big map it would be pretty hard to talk about thousands of thousands of cm. Now, you also may check with the lead programmer because at such a big map there are problems at floating precision. In one of our previous projects (a MMO game) we also had a huge map (50km by 50km). We've used cm but we've also used a special coordinate system in which every unit position was computed as (zone x, zone y) (x, y, z inside that zone). Basically we didn't have the necessary precision to go from one world end to another with simple x, y, z coordinates so we've introduced zone's x and y positions inside the entire world zones matrix, and we had relative coordinates inside each zone. Each zone has its own coordinate system basically. Just mention this to your programmer and he will know what I'm talking about.

The same problems you will have in Grome. After you get farther and farther from the origin you will have problems. You will need to break your world in several pieces and work on them separately. The zones can be pretty huge due to Grome swap system. You may need to break your map in 50km by 50km zones.

Also, importing from 128pixels to 512x512 tiles will make your terrain to look somewhat with poor resolution because you are not using the entire zone resolution (you are using the same values for 4 pixels = 512/128). First step is to smooth the zones. Next use Grome procedural generation and brushes to add detail. In 512 x 512 you should have a pretty good resolution (we've used 256 for most of the screenshots from the site).
Back to top
View user's profile Send private message
makit3d
PostPosted: Fri Apr 06, 2007 6:42 pm    Post subject: Reply with quote



Joined: 10 Feb 2007
Posts: 123

I really do appreciate your help on this. I've created maps in the past, but nothing on this scale. It's been problematic at best and until Grome there wasn't a program I could find which could adequately handle the files.

In regards to setting the zones to 512 resolution on a 128px hf map should I increase the tiles dimensions/edges and increase the number of zones? Currently with a zone set at 512 res., 1.543 tiles, 790 edges, 2x2 zones I get a map that is approximatly 4kmx4km in size.

A zone created at 128 res., 6.172 tiles, 790 edges, 2x2 zone would equal the same size as the previous 512 map. This is what I've come up with so far.

I'm headed home for the weekend. Thanks again for the help.
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