World Scale?

Blitz3D Forums/Blitz3D Programming/World Scale?

rsbrowndog(Posted 2004) [#1]
All,

I was wondering what scale people use for their games?

In Par FORE! I am using 1 "unit" = 1 metre, for instance.

Cheers,

Ryan


Mustang(Posted 2004) [#2]
1 "unit" = 1 meter here...


Rob Farley(Posted 2004) [#3]
I use 1 unit to errmm... if it looks about right... I know I should be using scales!

I certainly will be for carrier command anyway!


AbbaRue(Posted 2004) [#4]
I use 1 Unit = 1 Meter. Meters divide by 10 nicely, so the decimal points make sense.
.01 units = 1 cm.


Rob(Posted 2004) [#5]
1 unit to 1 metre here also.


WolRon(Posted 2004) [#6]
1 unit = 1 unit.

(If you get my drift)


Andy(Posted 2004) [#7]
1 B3D unit roughly equals 20 centimetres in the real world...

Andy


CyberHeater(Posted 2004) [#8]
" 1 B3D unit roughly equals 20 centimetres in the real world... ". How do you work that out or is that your own scale measurement.


rsbrowndog(Posted 2004) [#9]
I started a little side project last night and implemented the 1 unit = 1 metre scale and I was getting some visual anomolies. Bits of a model showing through other bits, etc., is this "z-fighting"?

Anyway, scaled things up so 1 metre = 10 units and it's all good now. Out of curiousity though, is there anything else I could have done to fix the "z-fighting"?

Cheers,

Ryan


rsbrowndog(Posted 2004) [#10]
Actually, I think I know the answer now...

It's CameraRange, isn't it? I should have bought in the far camera range a bit, the default is near=1, far=1000 which, on the scale of 1 unit = 1 metre would be 1 kilometre...

I'll know next time!

Cheers,

Ryan


Mustang(Posted 2004) [#11]
CameraRange settings are *critical*, if you f*up those you get loads of z-fighting. Thing to remember here is that the range is not linear, meaning that is has more accuracy in the near than in the far, so object with decals (plane offset slightly from the surface etc) that work fine in the near may flicker in the far end of the CameraRange. So better keep the far range as close as you can and the near range as far as you can... very close to zero values are bad usually.

http://encyclopedia.thefreedictionary.com/Z-buffer

And remember that you can use W-buffer instead of Z-buffer in Blitz:

http://www.blitzbasic.co.nz/b3ddocs/command.php?name=WBuffer&ref=3d_cat


rsbrowndog(Posted 2004) [#12]
Thanks Mustang!

Out of interest then, when you use 1 unit = 1 metre, what sort of CameraRange do you set?

Cheers,

Ryan


Rob(Posted 2004) [#13]
Ryan, just set near range as large as possible and far range as small as possible.

For example 1,1000 or 0.5,100

Mustang's data won't help you here - you need to be specific to your project. You lower the near range to stop the peeking through walls clipping phenomenon, and adjust far range until you're happy it's as far as it needs to be in order for the player to be happy.


rsbrowndog(Posted 2004) [#14]
Rob,

Thanks for that, I did understand it all... I was just curious. I realise it will all be different for different projects due to camera positioning, etc.

Cheers,

Ryan


Mustang(Posted 2004) [#15]
What Rob said... since my FP(S) game is indoors, I can use "low" far range, like 500 (meters) and "high" near range like 0.2 - "high" near range because I have weapons etc that are "handheld" and I don't want them to be clipped visually. But values are changed depending on the level and gameplay situation.


_PJ_(Posted 2004) [#16]
Scale is completely arbitrary.

I could make a game about ants and millipedes, where 1 Blitz 'unit' = 1 mm

or, a solar-system scaled orrery where 1 uit= millions of miles...

It is completely specific to your own requirement.



Also, to avoid Z-Buffer issues, I find Camera Range is best on a 1:1000 scale ratio, determined by the scale of objects and movement.

i.e. in a large-scale play area, where thigs move by increments of 100 units or so, a scale of 10:10000 is fine. For a smaller, more detailed area, a scale of 0.1:100 may be better.