scale

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
rarebit
Posts: 39
Joined: Wed Feb 13, 2008 8:09 am
Location: Sheffield, UK

scale

Post by rarebit »

Is there a general scale to game modeling, in interior design it's usually 1 unit = 1mm, architecture can be either that or 1 unit = 1m. I've just had a quick measure of the sydney md2 model and she's about 55 units, now if shes 1.8m tall say, thats 1 unit = 33mm.

What do you use?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

all is relative.... ;)
this depends on how you setup all together...
for example 1 unit can be 1mm or 10m, depending on how/where you create the camera...
if your camera is near the ground all is very large, if the camera is high above the ground all seems to be very small... ;)
or for examle with sidney, if you create the camera at Y=27 than sidney seems to be more than 3m tall, if you create the camera at Y=110 than sidney seems to be only 90cm tall... :lol:

also if you use mesures of 1:1 to the real world, saying building your home, you'll usually find that all seems to be too small/low, like doors and sailing...

if you use smaller meshes than you have a wider view/sight, but you can get z-fightings very quickly...
if you use large meshes than you have a shorter view/sight...
also I think that scenes with large meshes are rendered slower than scenes with small meshes...

so best in my opinion is to test some scales and use the one that fits the needs best... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
rarebit
Posts: 39
Joined: Wed Feb 13, 2008 8:09 am
Location: Sheffield, UK

Post by rarebit »

That sounds more like proportion? For instance (because I haven't looked at the source yet), if set small does it affect the collision detection, are most characters the same size as sydney?

However won't dealing with physics be easier if things are to scale?
Vsk
Posts: 343
Joined: Thu Sep 27, 2007 4:43 pm

Post by Vsk »

I don't why but besides float point prección, using small scales make problems.
Even more, I don't know why a 1::1 relation doen't look realistica but smaller, it is the second time I red it.
I am using 5 unitis 1meter to irrlicht. And even I am having problems with z-figtht.
Besides a don't go to smaller units thatn 0.01.
Acki why do you men with smaller view sight?
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

@rarebit: no, it shouldn't affect the physics, as far as the scale is not too small or too large... ;)
but with the Newton physics engine I found out that Newton calculates collisions faster with smaller meshes than with larger meshes (collision shapes), so often I see that someone uses relative large meshes and scales the measures down for Newton to work faster...
for the objects sizes, if you for example use 3dsmax you usually have a mesh 1/10 in size than if you use MilkShape for example...


@Vsk: well, you can create the meshes 1:1, but then I often find that all looks to be too low, ok, the easiest way then is to create the camera a little bit smaller (lower), what means to scale down the player character a little bit...
ok, this pobably is subjective, but my experience, maybe you don't think so... ;)
Acki why do you men with smaller view sight?
I think you mean "what do you mean"... :lol:
well, you can change the FarValue of the camera...
now, assuming you leave it the same value, than if you use smaller meshes you can see objects that are farer away than with larger meshes...
or with smaller meshes you can use a smaller FarValue to get the same distance view...
I hope you understand what I mean... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
hybrid
Admin
Posts: 14144
Joined: Wed Apr 19, 2006 9:20 pm
Location: Oldenburg(Oldb), Germany
Contact:

Post by hybrid »

You should define some scale for your game, because to get the same proportions of the meshes (in order to avoid in-game scaling) you have to know which size the meshes should be designed for. It can be, though, that due to the nature of your app you need several scales, e.g. when designing a space game which also features indoor scenarios.
This has nothing(!) to do with the placement of the camera. You can fake scaling by moving meshes forth and back, but that will definitely make problems with real 3d games.
Vsk
Posts: 343
Joined: Thu Sep 27, 2007 4:43 pm

Post by Vsk »

Acki wrote:
Acki why do you men with smaller view sight?
I think you mean "what do you mean"... :lol:
:oops: Sorry, I was in a hurry.
But I disagree with the newton part, cause with smaller meshes (collsion geometry) you could have collsion problems, even more if you make something like shoots. Bullets if fly realy fast and are small could not make collision.
But I will ask in the newton forum with is the best. Due maybe you could have a better performance.
I will check.
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

I hope that you aren't planning to use the actual geometry of bullets for collision, there's so many of them and they travel so fast that they're almost invisible, it would be a big waste to use anything other than a geometric primitive like a point, sphere or a line.
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
Vsk
Posts: 343
Joined: Thu Sep 27, 2007 4:43 pm

Post by Vsk »

bitplane wrote:I hope that you aren't planning to use the actual geometry of bullets for collision, there's so many of them and they travel so fast that they're almost invisible, it would be a big waste to use anything other than a geometric primitive like a point, sphere or a line.
No, no, actully I use spheres and newton sphere for primitive. Cause they are very cheap to calculate.
But this not change that the bullet geometry (collision geometry) is gonna be small. Cause it should behaves like a bullet and not like a socker ball :D.

So if we use small scale and besides this is intrinsc a small collision that moves at high velocitis we will have collsion missings.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

Vsk wrote:But I disagree with the newton part, cause with smaller meshes (collsion geometry) you could have collsion problems, even more if you make something like shoots. Bullets if fly realy fast and are small could not make collision.
you're right, of course they must not be too small, but I mentioned this before, too... ;)
also for realy fast bullets I would prefere to cast a ray instead of using a collision shape (just my opinion)... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
Vsk
Posts: 343
Joined: Thu Sep 27, 2007 4:43 pm

Post by Vsk »

Acki wrote:
Vsk wrote:But I disagree with the newton part, cause with smaller meshes (collsion geometry) you could have collsion problems, even more if you make something like shoots. Bullets if fly realy fast and are small could not make collision.
you're right, of course they must not be too small, but I mentioned this before, too... ;)
also for realy fast bullets I would prefere to cast a ray instead of using a collision shape (just my opinion)... ;)
Yes your are right too ;). I use raycast sometimes, but or example for a cannon proyectil I cannot, this must be very preccise and should behave "exactly" like reality in my aplication so I don't use ray cast.
In case of bullets, yes, this is a good a easy way to do it. But I am kinda fanatic of realistic behaviors (the ones that I can implement with my knoledge :( ) and would like that if one shoot from a far distance and with gravity and wind this will move your shoot. So you can not make thing like shoot from one kilometer with a sniper without taking in count this factors.
But that is me, that I am kinda freak with this stuff :D.
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Post by Halifax »

Vsk wrote:
bitplane wrote:I hope that you aren't planning to use the actual geometry of bullets for collision, there's so many of them and they travel so fast that they're almost invisible, it would be a big waste to use anything other than a geometric primitive like a point, sphere or a line.
No, no, actully I use spheres and newton sphere for primitive. Cause they are very cheap to calculate.
But this not change that the bullet geometry (collision geometry) is gonna be small. Cause it should behaves like a bullet and not like a socker ball :D.

So if we use small scale and besides this is intrinsc a small collision that moves at high velocitis we will have collsion missings.
Anything that moves faster than its own radius is going to cause the tunneling problem. I would either recommend increasing the timestep like most games. (Project Gotham 4 updated its physics at 2.78ms since the cars move so fast, much faster than there radius.)

And if you don't want to do that, then another desirable thing to do in your program before checking collisions with the physics engine you could extrude the object along its direction vector. I would try the first solution over that though.

Raycasting to the new position for collisions is another possibility. Their are many ways to solve the tunneling problem, so you shouldn't have a problem finding one.
TheQuestion = 2B || !2B
Post Reply