SCALING ISSUES!!!

Blitz3D Forums/Blitz3D Programming/SCALING ISSUES!!!

Ash_UK(Posted 2003) [#1]
Hi guys, i was wondering if anyone could help me with this little problem i have. I need to know how i can make each model in 3ds max stay the same size or is there any way of knowing how to scale them properly, so that the models look the correct size when standing by each other.
Many thanks for any replies.
Here is a screen of the game so far:

[img



Once again thanks guys for your help :-)

IcE


Todd(Posted 2003) [#2]
I don't know how to do in Max, but it's really easy in Blitz. Just use the FitMesh() command, and give it the size you want, and it will scale the model to right size, no matter size it started out as. Here's an example so you know how to use it. Just make sure you replace the filenames with names of models that are on your hard drive somewhere.

Graphics3d 640,480
SetBuffer BackBuffer()

Camera=CreateCamera()
PositionEntity Camera,0,0,-7

;Load in your meshes here
;------------------------
Obj1=LoadMesh("obj1.b3d")
Obj2=CreateSphere("obj2.b3d")

;Now Use FitMesh to Scale them
;-----------------------------
FitMesh Obj1,-1,-1,-1,2,2,2,1
FitMesh Obj2,-1,-1,-1,2,2,2,1

PositionEntity Obj1,-3,0,0
PositionEntity Obj2,3,0,0

While Not Keydown(1)
Cls

UpdateWorld
RenderWorld

Flip
Wend



Ash_UK(Posted 2003) [#3]
Thankyou ever so much Todd. You have really helped me out A LOT!!! That Fitmesh command is a lifesaver :-).
Thankyou again for your kind generous help now i can get back to the game. :-)

Thaks again

IcE


Second Chance(Posted 2003) [#4]
When modeling in Max just decide on a generic scale for you world and then model in generic units (under: customize menu-->unit setup-->generic units). Then every 1 Max unit = 1 game world unit. But you might want to check out: customize menu-->preferences-->general tab-->system unit scale-->automatic unit conversion; and make sure this is unchecked. Otherwise I think the next time you load your model it will automatically be converted to the scale specified, instead of generic units.
Unless you WANT to ABSOLUTELY SET IN STONE a game scale like: 1 blitz unit = 1 meter, then you realy should only model in generic units (not meters, or feet, etc.), it will save you a lot of grief later on; especially if you find you need to change the scale of the game world at some point. Hope that was helpful.


Ash_UK(Posted 2003) [#5]
Thanks ever so much Second Chance. I really appriciate your kind advice, and yes, it IS very helpful :-)
I'll start using generic units scaling from now on.
Once again, thanks for your kind help.


Second Chance(Posted 2003) [#6]
Glad I could help. It's nice for me to be able to help someone for a change, instead of the other way round :)