Jump to content

  • Log In with Google      Sign In   
  • Create Account

Interested in a FREE copy of HTML5 game maker Construct 2?

We'll be giving away three Personal Edition licences in next Tuesday's GDNet Direct email newsletter!

Sign up from the right-hand sidebar on our homepage and read Tuesday's newsletter for details!


Metric system : Meters


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
8 replies to this topic

#1 Alundra   Members   -  Reputation: 884

Like
0Likes
Like

Posted 23 January 2014 - 10:50 AM

Hi all,

I used bullet physics and got a lot of problem because I don't use meters when I export mesh so I got big value that bullet physics doesn't like.

When I switched to meters I got very little object and all params hard coded I used of course became wrong.

My question is simple : Does the meters is used naturally or it's just a need for bullet physics only ?

Thanks


Edited by Alundra, 23 January 2014 - 10:51 AM.


Sponsor:

#2 mark ds   Members   -  Reputation: 1384

Like
0Likes
Like

Posted 23 January 2014 - 11:11 AM

The scale you use obvious depends on what you are trying to achieve - using metres when modelling atoms wouldn't really be appropriate. However, for most 'real world' applications, metres generally make the most sense.

 

However, if your models/meshes use another scale, you can always rescale them in your vertex shader.

 

Out of interest - what scale are you currently using?


Edited by mark ds, 23 January 2014 - 11:12 AM.


#3 Hodgman   Moderators   -  Reputation: 30882

Like
1Likes
Like

Posted 23 January 2014 - 03:25 PM

All the games I've worked on have either used 1 = 1inch, 1=1cm or 1=1m (with 1m being the most common unit).

As long as everything in your game is using the same units, it doesn't really matter.

 

If some parts of your game are using different units, then you just need to perform the right conversions when moving data between those systems, e.g. multiply by 39.37 when going from meters to inches, etc...



#4 Alundra   Members   -  Reputation: 884

Like
0Likes
Like

Posted 23 January 2014 - 07:50 PM

Out of interest - what scale are you currently using?

 

Generic Units from 3dsmax, but using the meters and export on FBX give a lot more little object.

 

The real problem is not the units because scaling can be used of course, the problem is the physic simulation.

I don't know why, but using Generic Units, so big value (1.57m is like 50, something like that), I got crash from bullet physics.

When I use little value, the crash is killed and all works fine but switch from one to another need to change all hard coded values.

It's really weird to use meters, you got really little values, so the question needed to be asked to have a view of that with you.


Edited by Alundra, 23 January 2014 - 07:50 PM.


#5 JohnnyCode   Members   -  Reputation: 259

Like
0Likes
Like

Posted 24 January 2014 - 01:16 PM

you use vector space of 3ds max, and moving those values towards a unit means scaling them. You should feed bullet with those absolute 3ds max space values, and your own graphic transforms you use on them , that work already in graphics as you wanted. If bullet comes asking a length  unit, you should be able to absolutely ignore it, leaving all bullet space scale to 1.0 . I do not believe it forces a unit calibration. SI units are kg,s,m... but why would bullet need a length unit? if bullet can create primitives for you, but expects meter values, you will just have to calibrate those values to fit your graphic expectation (the 3ds max object space or so), or, set it with your graphic absolute values (unitless) resulting in perfect corelation with existent fed data in bullet . Bullet I believe will offer you second option primarily when creating primitives and transforming them.



#6 cozzie   Members   -  Reputation: 1652

Like
0Likes
Like

Posted 25 January 2014 - 06:21 AM

I'd stay with setting 3ds max units to meters, 1 unit being 1 meter. Even if your objects now look "small", you can scale them in your transformations. That way both bullet and your models use the same measuring units.

An extra win with this is that while modeling, you can guess better if your dimensions of objects are close to reality.

#7 Hodgman   Moderators   -  Reputation: 30882

Like
2Likes
Like

Posted 25 January 2014 - 07:21 PM

Out of interest - what scale are you currently using?

Generic Units from 3dsmax.[/size]
most things operate with genetic units but it's still up for you to choose a scale.
Eg. When you make a human, do you make them 6 generic units tall, 180 units tall, 1.8 units tall, 72 units tall, etc? That's ft/cm/m/in, depending on your choice.

#8 JohnnyCode   Members   -  Reputation: 259

Like
0Likes
Like

Posted 26 January 2014 - 04:36 AM

In case I need to check corectness of abstract proportions in my game, I measure by the character, which I translate to the absolute values that I am using, meaning character equals 90.x of 3ds max unitless numbers, being in my object space 90.x as well.



#9 ApochPiQ   Moderators   -  Reputation: 15980

Like
3Likes
Like

Posted 26 January 2014 - 04:41 AM

I would strongly suggest you understand the crash in your physics engine before just arbitrarily changing scales. Superstition and magic have no place in programming :-)




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS