Game Development Community

Scale in CShop vs in game

by Todd D. Degani · in Artist Corner · 03/09/2005 (9:51 am) · 15 replies

I am trying to determine how the scale in CS works vs what is shown in game. I have a huge discrepancy between a test box I made and the default Torque orc.

From what I have read in the CS forums, CS uses a generic 1 unit scale. The smallest you can set the grid size to is 2 units. 1 unit in Torque = 1 meter. So a box that is exactly 1 grid size big in CS should be 2 meters in Torque, or around 6 feet high.

Opening up the default orc model in Max it was determined that the orc is about 2.4 meters high.

Here is a picture of my box in CS. Note that the scale for the grids in all of the windows is 1 grid = 2 units.
img46.exs.cx/img46/6476/cshopbox9iq.th.jpg

Here is a picture of the box exported as a dif and placed next to the orc inside of Torque.
img46.exs.cx/img46/9315/orcvsbox7xt.th.jpg


The box should be fairly close to the size of the orc. Can anyone explain why this is not the case.

#1
03/09/2005 (7:11 pm)
I'm guessing it has to do with the "geometry_scale" property in the worldspawn entity defaulting to "32". I think this translates to "how many map units in one meter". If this is correct.... then the Orc is 2.4x32 = 76.8 units tall if in CartShop. Try exporting a box at about that size... i bet it will match up.

If you want to change the "32" value go into CShop and insert a worldspawn entity from the Torque object menu. If you view it's properties you'll see where you can change the scale. Currently we're setting this to "1" to export much bigger stuff into Torque without needing to build them huge in CartShop.
#2
03/09/2005 (8:28 pm)
I think you're right... 1m = 32 units.

img.photobucket.com/albums/v454/gxbiohazard/heights.jpg
#3
03/10/2005 (7:23 am)
Woot, usefull informations. I didn't knew about the worldspawn. Thanks !
#4
03/10/2005 (10:26 am)
This all seemed to make sense before I went to go and try it myself.

I took Tom's advice and decided to make a box about 76 units tall in CS. I did not add a worldspawn entity. This was the result:
img201.exs.cx/img201/6473/orcvs76unitboxws322ql.th.jpg

So I decided to try a different experiment. I used the same box from my first post. Except this time I added a worldspawn to CS and set the geometry_scale to 1.

So my box is 1 grid size big or 2 units in size. Because of the worldspawn 1 unit should = 1 meter. Thus my box should now be approximately 2m big and close to the actual size of the orc.

After placing the dif in the game this is what I get:
img173.exs.cx/img173/3563/orcvs2unitboxws12ey.th.jpg

I am not quite sure what I am doing wrong here. Any ideas? I cannot seem to be able to replicate what Will had accomplished in his picture.
#5
03/10/2005 (10:35 am)
This is what it says in the status bar at the bottom of my CS:

"1 grid space=32.0 units"

This is the default for me... didnt change any worldspawn properties or anything like that.

Just make a box that is the size of one grid square... that should be exactly 1 meter in Torque size, assuming everything else is correct.
#6
03/10/2005 (10:47 am)
@Will
Hmm, I just went and tried that after you posted. I started from scratch and did file, new. All the windows said 1 grid space = 32 units. I made a cube that was 2 grid spaces in each direction, so it should be roughly the size of the orc. Exported it and it was still huge.

The only other thing I noticed was that there is a dimensions field next to the grid size in the status bar. Mine says 512x512x512. What does yours say?
#7
03/10/2005 (10:48 am)
Todd

If you click on the brush to select it, the size will display in the status bar. Divide that by 32 and it should give you meters in Torque (depending on your worldspawn scale being set at 32 obviously). This is the method I use when making something to a specific size. If you make your world spawn scale 1 or 10 then the maths becomes simple (10 probably being better since you cannot size in ones)

If your worldspawn scale is 32 then 512 gives you 16 meters in torque.

Dont forget that the grid spacing you see is dependent on zoom level (grid gets courser as you zoom out and finer as you zoom in) and you can also change the grid size with the [ and ] keys.
#8
03/10/2005 (11:40 am)
Thanks David that helped. When I used the dimensions to figure out the size I was able to get a proper size box.

That then leads me to the question as to why I have to have my grid size set to 1 grid space = 4 units to get a 32x32x32 dimension box when it appears that Will can create a 32x32x32 dimension box with his settings set to 1 grid space = 32 units.
#9
03/10/2005 (11:51 am)
Todd

I have noticed that its quite easy to draw something the wrong size by just relying on the grid you see because of the way the grid displays when you zoom in and out.

To see this, zoom all the way in (press + until you are zoomed in) and change your grid snap size to 2 (press [ a few times)

Then, while watching the grid, press - a few times to zoom out and you will see the grid size change so what you see as the grid is no longer the grid snap size of 2.

The grid size is really the sizing that the corners of a brush will snap to but is not necessarily the size you see. Hopefully that makes sense?

The easiest way is to keep an eye on the size of the brush you are making in the status line and make sure that it is the size you want. Or zoom in to make sure that the grid you see is the same size as the 'snap' grid.
#10
03/10/2005 (4:46 pm)
img.photobucket.com/albums/v454/gxbiohazard/gridSizes.jpg
David is right about the zooming, but there is also the possibility that you may be drawing the box on the lighter shaded grid than the darker shaded one (see above).

The lighter shaded grid square is 8 times the size of the darker shaded one! So if you make a 2 grid unit cube (2 meters tall) using the lighter shaded grid it will be 16 squares high x 32 units = 512 units high, instead of the 64 units (2 meters) that you want.

I recommend zooming in first to make small shapes so you know it's definitely on the smallest grid square (darker one).
#11
03/11/2005 (8:07 am)
@Will
That was exactly my problem. The problem was this POS monitor I currently have. The brightness on it is really screwed up and I have it maxed out. I saw your post and decided to go into my video card properties and jack the gamma all the way up. Low and behold there was a whole other set of grid lines that I couldn't even see.

Thanks a bunch for your additional post on the matter because that was really bugging me.
#12
03/14/2005 (1:19 am)
Ok, I might be a little daft, but if I want 1 gridspace i cs to match one meter in Torque what should the geometry-scaling be set to?
#13
03/14/2005 (8:16 am)
@Rasmus
The simple answer is that the geometry-scaling need to equal your grid spacing. By default this is how CS is setup. In CS the default grid spacing is set to 1 grid space = 32 units. Also by default the geometry-scaling is set to be 32 units. So by default 1 grid unit in CS = 1 Torque meter.
#14
03/14/2005 (6:32 pm)
You know, my little 256x256 moldy brick texture is probably one of the most common textures seen on the internet.
#15
03/15/2005 (9:14 am)
:D -!!!

Did you make that texture?