Jump to content

Unit and scale guide


saindd

Recommended Posts

In truth, a single unit is a single unit, just as it is with all game engines, because they use arbitrary numerical values.


In practice, this means that if you decide that going from 0,0,0 to 0,0,1 would be about a meter(think minecraft), then that means that one unit is a meter, as Duion said.


If you decide that 1 unit distance is a foot, and scale all your assets along that line of thought, then that's what the value means.


However, most people just use the simple method of measurement that Duion suggested. 1 unit of distance is 1 meter, and scaling all assets to accordance with that. It keeps things pretty straightforward and easy to scale new assets to match.

Link to comment
Share on other sites

@saindd


Torque doesn't really have a proper 'default' in the main assets, partially because the assets have gone through several passes over time. The default soldier model, for example is actually really tall compared to a normal person.


No doubt this should be corrected, but it's hard to state what Torque's default content is scaled to because it's a bit varied.


Also, the reason why a meter is picked rather than a centimeter is because of floating point limitations.


In Minecraft, where each cube is a meter(approximately) that means that you can walk thousands of in-game kilometers before you start running into floating point precision issues.


If you cut the comparitive scale down from a meter to a centimeter, you'd be able to walk a much shorter distance before floating point limits would start coming up.


That said, if you're making a smaller, more intimately scaled game, like say one of the recent walking simulator-style games or the like, where you may only need to model a single house, then doing a smaller scale could make a lot of sense if you feel that it works better for your process.

Link to comment
Share on other sites

"Default?" The "default" is one unit is one meter - as has been said. I say it's "default" because that has been the guide since Tribes - but equating in-game units to physical units is entirely up to the developer. They are literally virtual units of distance so you'll have to decide for yourself what they mean for your title.

Link to comment
Share on other sites

They are not entirely virtual. Sure you can use whatever scale you want, but there are limitations which suggest to use 1 unit = 1 meter, for example the coordinate system which has a limited digits behind the comma and limited max size for level until floating point imprecision begins to appear.

Link to comment
Share on other sites

Well, sure - you're limited to 32 bit floating point precision. The one meter rule is a good medium ground. If you wanted to make a game about an ant farm (to use an example someone brought up on IRC) you would just build your models as if ants were human sized - build everything in the same scale, everything matches, player doesn't know any better.

Link to comment
Share on other sites

1 unit in T3D should be 1 meter, but I can confirm that the models are always out of proportion. You can rescale the model without redoing it in max on import in T3D by changing the Collada unit scale:




How it works can be read here:


http://docs.garagegames.com/torque-3d/official/content/documentation/Artist%20Guide/Formats/ColladaLoader.html


Though it does not work properly with players, vehicles and physicshapes; it may cause issues with the collision for those.

Link to comment
Share on other sites

  • 2 weeks later...

got to throw me on this with a question:

If I make the whole game (character, veichles etc.)

Would it do impact on how good the game would run?


Reason why I ask is that before starting on this project, I have been modding a lot on the old game Wolfenstein Enemy-Territory

And I like the scale there.


But I guess the maps will be smaller then too and maybe this will drop performance of the game?

Link to comment
Share on other sites

As @Duion said 1 unit = 1 meter


Also for terrains.

Under 1080p resolution, 512 texture pixels per meter.

Over 1080p resolution, 1024 texture pixels per meter.

 

Well, this is the stuff where I am damn dumb...

I dont get the math here.. But I will go create as I feel and we'll see how it goes :)

as long as things are scaled onto each other I guess I should be fine :)


btw our project have just started from scratch

you may all follow it here:

http://www.enemytrenches.com/


and source on github, still under mit lisence:


https://github.com/thunderpwn/enemy-trenches

Link to comment
Share on other sites

"Run better?" Maybe - but the real problem is precision. When things get too far from the optimal scale you get weird jitter and other problems. Floating point numbers are 32 bit and that's what all of the graphics api's use - that means precision is important, instead of something we can stretch in 64 bit land.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...