What are the benefits of 1 unit per meter?
Rephrasing a poorly-asked and subsequently dead question because the problem effectively froze any development on my end until I find relevant information that Google still isn't telling. And I am NOT letting another project die on me, much less this one.
I'm shooting for as close to deterministic as I can manage with built-in PhysX and I've read somewhere in here that scales that aren't 1:1 produced less consistent behaviour on PhysX's end, to say nothing of floating-point issues with very large scenes. Unity's own documentation also recommends that scale for everything that's not toys or kaiju.
Has it been done? How does that work out for, say, a corridor TPS, or a versus fighting game, or anything with extensive facial animation? Are precision or collision detection going to be an issue? Would a 1:1 scale be desirable for something like, say, Gone Home or Mirror's Edge?
The actual task of scaling down won't be much of a problem; as of now I only have a few prefabs and a handful of props.
tl;dr: Ideally, I'd like an outline of everything -- as in literally everything -- I could possibly gain by switching to 1:1 and continuing from there.
Forgive me, I really suck at asking things. I specifically mentioned first-person games for precision reasons, but I'm on a 3D platformer ala Tony Hawk.
I'm using relatively realistic proportions alongside facial animation, which is why I'm specifically worried about very small scales. A human head at 1:1 would make for less than half a unit.
For the game you are doing, you simply have to use normal 1 meter units. Enjoy!
Answer by Fattie · Jan 09, 2016 at 03:06 PM
Use "real" units and that's that.
You're part of an industry, to begin with every single model which you have built for you will be made actual size. (Just click to any site that sells models, and observe the furious comments when some beginner is selling models that are not of the correct scale - there's nothing more annoying than buying a Dog and dropping it in to your scene and finding it's not the right size, it's 31% too big, 28% too small or whatever.
Secondly you're a game programmer - constantly, every waking moment, you will be estimating torques, forces, speeds, and measures. So, you should instantly know from the top of your head roughly how long a 747, porsche, or donut is, how fast your dog trots, how many newtons are applied when someone kicks a soccer ball, how much torque you have to apply to a one tonne car versus a boat in water to spin it, how long a ball stays in the air if you throw it 20 meters along the ground, how much acceleration m/ss you feel taking off in a jumbo jet .. and so on.
https://en.wikipedia.org/wiki/Shigeru_Miyamoto
"He also stated that he has a hobby of guessing the measurements of objects, then checking to see if he was correct, and apparently carries a tape measure with him everywhere."
You (pretty much) have to of course use "actual seconds" for "unity seconds" and "actual kilograms" in rigidbody masses, so it's difficult to see why you wouldn't carry on with ordinary SI units so that all calculations of moments, torques, power, velocity and size work out.
"scales that aren't 1:1 produced less consistent behaviour on PhysX's end" that seems wrong; if (for some reason) you wanted to kick off production on "mirror's edge" and you (for some reason) decided everything should be "0.378 scale" or "2.787 scale", everything would work out fine in terms of the physics engine working. (Calculations (torque, horsepower in vehicles etc) would be a nightmare since time is still "ordinary seconds" and mass is still in "ordinary kg".) Sure, if you went WAY off scale (for some bizarre reason you wanted to work at thousands:1 for some reason (why?)) floating point issues may get you.
"floating-point issues with very large scenes", yes, PhysX basically does not work for things like "simulating planetary orbits", it only works on domains from say a few millimeters/grams to the size of a racetrack or "town" / tonnes. In the incredible circumstance you're making such a game, perhaps colliding asteroids or something, you just don't use a physics engine.
Your final paragraph implies you've accidentally started a game, not using natural scale.
So, you'll have to start over.
You particularly mention ordinary FPS 3d games, certainly those have to be done in ordinary units. You ask for the "list of advantages", 1 every model you buy make or use will of course use normal units, 2 seconds and kg are "built-in" so it is torturous either calculating or feeling torques, accelerations, etc, 3 overwhelmingly why would you want to not work the way your mind works? the instant you start thinking of a character or wall or whatever, in your head you'll be saying "well it's 70 cm wide, running at 15 km/h won't catch it, it's like picking up a 50kg sack .." etc. Remember you make games in your head, the actual programming is child's play; and a minor issue 4, as you mention if you go WAY off scale (orders of magnitude) PhysX can work poorly.
Regarding your follow-on question "how small I can get on 1:1",
there are a couple issues,
(1) I get the impression you're just starting out with making physical games; you know, I'm not even sure you're sort of "asking questions that matter or are even meaningful". I'd encourage you to press on see what happens when you work up some basic typical systems.
{Something that comes to mind: in even the most sophisticated say car games (you mention that sub-field), the overall collider of the vehicle is modeled by ........... a cube. Heh! That's it. In the most ridiculously complex console games you might use "two or three or four cubes" - !} To talk quickly, some of what you're asking is "more or less meaningless", for example as I ask below, what do you mean by "can I model screws"?? You may be thinking of actual, say, finite element analysis, which is used by engineering teams that are doing research in to new wing shapes and the like: this just has no connection in any way to making video games.
(2) The answer to your question is I think about "a millimeter or less - it will never become a problem". For example, we were doing recently a puzzle-type game featuring, imagine wood blocks like kids have letters on (so, 3 or 4 cm across).
This was done (of course - why wouldn't you?) with natural units. So as you can imagine as with any client there was massive ongoing discussion about whether the cubes should be 3.751 cm or 3.777 cm, and so on, whether the wine glass should be a 9 3/4 inch wine glass or a 9 1/2 inch wine glass; etc etc:
So; in this set up the wood cubes; etc; were actually 3 cm, etc, from the PhysX point of view. This works perfectly well, no problems.
(If - for some bizarre reason - why? - we had used a different scale in the setup, it would have just introduced insane and highly ridiculous sort of Monty Pyhthon-esque complications for no observable reason!)
Note too that when you're doing something like "tumbling wood blocks around on a table" of course you have to have a perfect sense of how many grams such things weigh, how much force you have to apply to move them and so on; again it would be ridiculous to (for what reason?) convert this to other scales.
So, as I already said in the answer above, you're perfectly OK from "millimeters" to things the size of a racetrack of "small town". If you're doing like "orbiting asteroids" or "molecules" or whatever - it's a custom job, PhysX is irrrelevant. (And who ever does that?)
I appreciate any comprehensive answer.
Zoo$$anonymous$$g in on the car analogy -- would a 1:1 scale allow for enough precision to reliably simulate an average-sized car? How small exactly could it go -- individual engine parts, individual gears, individual screws?
This is purely an analogy, but I'm hoping it'll give me an exact enough idea of how small I can get on 1:1.
For car games, you simply have to use natural 1 meter units.
Regarding your question about "individual screws" - I simply have no idea what you mean. Are you saying the textures will be detailed enough that you can see individual screws? Please explain.
As in physically simulating individual screws, nuts and bolts holding a car together. Thankfully, I don't literally mean that.
Put another way, if at 1:1 I were to simulate:
A wrecking ball (1.25 units)
A basketball (0.25 units)
A baseball (0.075)
A golf ball (0.042)
A penny (0.019)
A 9mm bullet (not fired) (0.009)
Would the bullet still be accurately simulated? Would the penny? And so on. I'm asking to get a rough idea of how small a difference the engine can take, for physics and for animation. If a character's eyelid moves 0.0005 units, will it display correctly?
I'm already not too convinced; at 1:1, the camera's near clip plane can't go below 1cm.
Just BTW if you're working in the car simulator field. (A huge business.) Of course, absolutely everything has to be correctly true scaled. If you're asked to model like a 1973 weber twin barrel xyz carburetor ....... you have to do that. (I mean, if you asked "so do you want it modeled at the correct size?" what would that even mean? for what possible reason would you not want it modeled at the correct size?? in practice these days in the car-game biz, everything starts with actual engineering drawings, from the licensed vehicles - so it's not even a question, of course.) But what I was gonna mention was, a real "gotcha" with Things that are symmetrical: as you know "everything must be Z forward". (Or as you'd more likely write it "every.fucking.thing.must.be-z.forward!!!" heh) So a classic woe is you have a new young texture guy or whatever, and let's say you have to make "car wheels" or maybe tires. Well, you have to carefully produce both the left and right one (the "z forward" concept is opposite in each case), the "young 3D artist"'s first experience of when they get screamed at and fired is often because they said "oh look can't you just turn it around?!" .. heh!!)
It's just a business, you know? For what 15? 20? years now the vid game business is bigger than the movie business. You have to hurry along.
I answered your question "how small I can get on 1:1" in an edit to my long answer.
O$$anonymous$$, I'm keeping this up because it's as comprehensive as it gets for an answer, but you're going to laugh: I eventually ended up scaling UP, to 4 u/m. I'd poorly scaled my test level, but by pure chance, my character model was exactly the right size to work unscaled at 4 u/m.
Like I said, I'm still keeping this up because this'll be incredibly handy to keep in $$anonymous$$d.
Answer by Owen-Reynolds · Jan 09, 2016 at 04:00 PM
I'm going to say there are no advantages to using 1 unit = 1 meter (except for the obvious one of not having to worry whether you're using the wrong scale.)
What Fattie wrote, in support of the opposite conclusion, seems fine. But in my experience, everything needs to be scaled and adjusted in one way or another, no matter what scale you use. Some of my messiest rewrites have been when I knew something was the correct size, built a complex gameObject/code with no way to tweak, then had to add that back in.
Models I've seen tend to be of just whatever size, like a 1 unit tall cat with a 1 unit tall horse. Exactly how large is a cat, anyway? And a gun is as big as it needs to be to look good. Throwing and falling are at whatever speed makes them feel right.
But, one glaringly obvious advantage to using an exact 1 unit = 1 meter scale is you never have to worry about whether you're using the wrong scale. For example, you've agonized about it a lot and know it will continue to bother you, slowing everything else down. Then, a rescaling, even a useless one, will save time in the long run :-)
Your answer
Follow this Question
Related Questions
What units are the physics material in? 1 Answer
Is it worth scaling down a project to 1 unit per meter? 0 Answers
Setting UI element position in physical units during runtime. 0 Answers
How to scale a float value to another scale ?¿ 0 Answers
How do I use the growth (increasing scale) of an object to apply force? 0 Answers