Page 1 of 1

export messed up

PostPosted: Fri Sep 09, 2011 5:29 pm
by boing
i have a door model in max thats alligned to the center of the grid, i select it hit "Export selected" and after i compile it its size is messed up.

Image

i guess its a max issue, but i cant figure out whats causing it.
Hope you guys can help me

Re: export messed up

PostPosted: Sat Sep 10, 2011 1:18 am
by Gambini
Ehmm. The only thing you´re importing from 3dmax are the geometry and UV coords. You´re not providing any information about your QC file, etc. As a first glance it looks like you´ve set a big bounding box, probably by using a qc file from other model, slightly edited.

This is the way I do it from 3dmax -notice i use 3dmax7 and cannonfodders smd compiler, so there may be small differences depending of your version and file exporter-

I open the model, drag and drop the texture I want to use from explorer to max´s 3d viewport (aiming the model). Select the geometry i want to export and run the exporter tool. I name it door_ref.smd i.e.
Then I export the phys_model. This one can be basically a convex block with the door´s outer measures. But remember to give it a UV map and to apply a smoothing group per mesh (only one in the case of the door). I name this model door_phys.smd.

Then, the QC file: This is an example of mine, there are commands for setting the bouding box´s size but if you dont use them it will be autocalculated, which is of course better than what you´re getting right now.

Code: Select all
$modelname "yourpath/door.mdl"
$scale "1.00"
$body "Body" "door_ref.smd"
$cdmaterials "models/yourmodelspathfolder"
$sequence idle "door_ref.smd"
$surfaceprop "solidmetal"
$collisionmodel "door_phys.smd"


Notice that I´m not calling any vmt file here. Mdlcompiler will take the name of the file you´ve dropped in max´s 3d viewport in the previous step. If you put a file named door.tga the model will look for models/yourmodelspathfolder/door.vmt. There are a lot more of commands in that you can use in your QC sintax. I just used the basics here.

Finally, use Guimdlcompiler, which will make your life easier.

Re: export messed up

PostPosted: Sat Sep 10, 2011 9:31 am
by boing
i use max 2011, smd exporter and guistudiomdl.
this is what happenes if i move models of the grid center and compile them:
Image

and my .qc:

$modelname "Props_Nine\props\door01.mdl"
$scale "1.00"
$body mybody "door01.smd"
$surfaceprop "wood"
$cdmaterials "models\Props_Nine\props"
$sequence idle "door01.SMD" loop fps 15
$collisionmodel "door01_phy.smd" { $concave }

(i know not a propper qc for a door, its just for testing purpose)

ive deleted and re-exported and re compiled the door01.smd aswell as the door01_phy.smd but its still not working

i will try to export the door to another max file and reexport it from there

Edit: Still no luck :?

Edit2: Im sure now it is an issue within my max model. The Pivot is set up correctly to the center, before i export. but if i reset the pivot in max it jumps to another position:
Image (btw:if i move my model to the pivot and hit reset pivot it jumps again)

if you would draw a box around the pivot and the door model you probably get the big cache i see in hammer
Image

Re: export messed up

PostPosted: Sat Sep 10, 2011 1:58 pm
by Gambini
I always thought the model´s origin would be taken from the center of the grid, in fact that´s how it works here.

Be sure your mesh doesn´t have a loose triangle somewhere far the door, something you forgot to delete.

Re: export messed up

PostPosted: Sat Sep 10, 2011 5:37 pm
by boing
fixed it by exporting it to an .obj file, reimported it into max and reexported it to .smd
Thanks for the help though Gambini!