Game Development Community

Question: scaling a player (step-by-step)

by Michael Johnston · in Artist Corner · 07/14/2002 (10:52 am) · 12 replies

I should first mention that I've already read the following articles and forum posts on this subject (in addition to any required readings that I could find):

Scaling resource
www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=2069

Exporting characters
www.garagegames.com/docs/torque/tools/max2dts/section2.html#general

Moving pivot points
www.garagegames.com/index.php?sec=mg&mod=forums&page=result.thread&qt=3451

Problem changing player model
www.garagegames.com/index.php?sec=mg&mod=forums&page=result.thread&qt=4188


We're simply trying to increase the size of the player models that were provided in the T2SDK-Models pack. Here's a link to the original scene:
www.kineticpoet.com/light_male.zip

Here's a link to our scaled scene:
www.kineticpoet.com/light_male_scaled.zip

Here's a link to our dtsScene.cfg:
www.kineticpoet.com/dtsScene.cfg


The scaling itself works fine. But even though we delete and re-create the bounding box before exporting, the resulting player is somewhat submerged in the terrain. We haven't touched the bounding box code, so it's definitely a problem with the export.

Could some kind soul provide step-by-step instructions for properly scaling a player and bip, or perhaps take a look at our scaled scene to see what might be wrong? It seems like scaling should be a relatively easy thing to do, yet we're obviously missing some subtleties.
Mike

About the author

Recent Threads


#1
07/14/2002 (6:06 pm)
When you say it's submerged, does it look like the character is contacting the ground at the center point of the bounding box?

I belive torque uses the pivot point of the bounding box to place the character, so when you're recreating it, make sure to move the point from the center of the bounding box.
#2
07/14/2002 (6:12 pm)
dito: try moveing the pivot down below the bounds box and see if it moves the player.
allso try moveing the character up out of hte ground with the map editor to see if its posable the COL's that are outa sync

have you tried reseting all hte XYZ scales in hte sceane?
#3
07/14/2002 (8:40 pm)
Yes, it looks like the player is contacting the ground at about his kneecaps. I'm not the one who's actually doing the modelling, but I'll tell illy (the modeler). He said he tried resetting the pivot so it's at the character's feet, and he said he tried resetting the scale transform, but I'm not 100% sure he's doing the reset correctly.

I took a glance and there are a few ways to reset a transform, it seems, including a "special" way suggested in one of the above links.

I'll ask him to read this thread and respond. Just for my own sanity, what exactly does resetting the transform do anyway?

Thanks guys,
Mike
#4
07/14/2002 (8:54 pm)
Reseting the tranform makes new cordinates for everything. It also compacts(for lack of a better word) all the modifier in the stack. It reduces whatever your object is back down to an editable mesh.
The best way to do it is the box method from the Max2Dts docs.
Also If you want to make everything a little easier on yourself Just make your mesh set it to face backward in the "front" view. Then reset your pivot in the heirechy menu. (green=forward, Red=right, blue=up). Then merge the player Biped sytem, Bound,and all the dummy boxes. Then hide the dummies and go to the motion panel and click on the little stickman button(Figure mode) and scale the biped into your mesh. This will also give an Idea of how big your mesh should be. Then add your skin modifier and do the export. And make sure to run UnmessDTS. Alot of little flacky thing get resolved when you run it
Hope that helps
#5
07/14/2002 (8:59 pm)
Aaah, I'm beginning to understand. Great Matt, thanks...I'll ask illy to read what you wrote and make sure he's followed all those steps. Would you mind checking this thread again in the next day or two? After illy tries this, I might have a couple more specific questions.

Many thanks for your help,
Mike
#6
07/15/2002 (5:42 am)
Sure. I am no expert though, if he gets to specific its probably going to need to be answered by someone else. LOL
Matt
#7
07/15/2002 (11:36 am)
ok, firstly take this as granted on all this, all axis are correctly lined up etc.
the figure is segmented so its directly linked to each bip body part, i have basically unlinked it, scaled the biped in the structure rollout, scaled the actual model to the same scale and relinked it back on to the biped, the result is, is it looks exactly the same but bigger, in addition to this i have created a new bounds box and deleted the old one, its axis are in the right place/facing right way.
the last 2 datys i have tried this has produsced different results, the feet sinking into the floor is no longer a problem, it rests on flat surface properly, the problem is now there is no animation(collapse transforms is not checked in the exporter rollout), and will not link to any animations it would before it was scaled.
Any suggestions?
Oh for some strange reason when i checked in the dump its turning the collapse transforms button on, even tho in max its unchecked
#8
07/15/2002 (12:54 pm)
Check your .cfg file to see if the

-Param::CollapseTransforms

switch is set to "-" and not "+"

If the switch is set to + it will overide the checkbox in MAX.

As for the animations not loading, it is probably a missing node in the DTS shape. You can check the console when it trys to load the aniamtions through the player.cs and it will usually tell you the name of the node that is missing.

Export an old version that worked wiht the animations and compare the dump files to see what the differences are. Check the bottom of the dump file where the shape heirarchy is to see what is actually getting exported.
#9
07/16/2002 (10:50 am)
Thanks Joe, I'll ask illy to check the nodes.

As for the CollapseTransform option...is it sufficient to turn that off within 3dsmax (assuming that we don't specify the option in the .cfg file)? Or does it have to be in the scene's .cfg file as well?

We tried disabling it in Max, and even adding a dtsGlobal.cfg file to the plugin directory with that option disabled, but for some reason when we check the dump file, it still shows that option being enabled. illy has double-checked to make sure that the scene's .cfg file is in the same directory as his .max file, so I'm not sure what's up.

We'll try disabling the parameter in the scene's .cfg file and see if that works.

Thanks,
Mike
#10
07/16/2002 (11:09 am)
The gloabl.cfg will determine which options are checked and unchecked by default. If there is no scene .cfg, then it will use what is set up in MAX. If there is a scene .cfg, and the switches are in the .cfg, they will over-ride whatever options you check in max. The safe way is to just comment out the lines in the scene.cfg.

Note that the default behavior of the exporter is to collapse out 'un-needed' nodes. This is different than collapsing the transforms.

It will usually tell you it is collapsing the 'un-needed' nodes in the third pass (in your dump file) even if you are using .cfg file.

Un-needed nodes are nodes that are either not animating or do not have a mesh hanging off them. Dummies hanging off the end of the shape tree may get discarded. It is a good idea to make sure these are in the always export list in the scene.cfg file.
#11
07/16/2002 (11:32 am)
thx for the help sure has been useful, i think the animation problem was due to a missing root animation which seems to be working now
#12
07/16/2002 (11:54 am)
I have seen this happen before. When the .dsq files are being loaded into the DTS shape, sometimes it will choke on one of the .dsqs and it will prevent the other .dsq from loading. You can usually see this by checking the console while in the showtool.

I am glad the information I provided was useful.