Help on how to change the way a model is spawned

I have been using $upaxis “y” to change the position of the model for some time. While it does work for the most part, I just found out that it doesn’t apply to the physmodels. As a result, the model always end spawning the sideways not upwards as it suppose to.

http://image.prntscr.com/image/16f6187ac41a4579bd814d797fe16721.png[/t]
[t]http://image.prntscr.com/image/3db74c1cf4764fa889fe9d882bf4def9.png

So, does anyone know how to fix this?

So, anybody want to lend a hand here?

Bumping because I still need help on dealing this problem.

you still haven’t made this work? if you wanna… gimme the source files, preferably smd, qc, and textures. i could fix it in blender if i see the errors. i don’t wanna guess what max or the wall worm is fucking up there.

—Snip. Changed my mind. I will send you the files.—

Except, you know, he can send you back the fixed files, and you can look at what is different between his version and yours, and then you can experiment and see why his solution fixes the problem.

Plus it’ll help people see what exactly the problem is.

Right now since we don’t know how your files are set up all we can say is “just rotate it to the correct direction”, which isn’t particularly helpful as maybe it is facing the correct direction but you forgot to apply a modifier or something.

I guess you guys convinced me. Fair enough then. I will send you the files, episoder.

i wanna have a look at the data not pictures. if you don’t want the files back i guess i have to decribe it then?!? i can try.

edit: i tried. compiled outta the box. the collision model is way too complex and not modelled correct with closed shapes but the compiler (from sfm) did it’s job. no problem at all.

things you could check resort are:

the $cd path. if it’s all in one folder you don’t need it or you gotta check that you don’t point to outdated files and folders.
the position of the $upaxis command in the qc. i can’t check if the sdk13 compiler handles it differently then sfm’s. but it gotta be before any model or skeletal animation reference.

I know it works fine with SFM. That’s why I never stated anything about it.

And I have already checked those two items. The $cd path points to the right folder and the $upaxis command is before any model or skeletal animation references.

Hell, if you want you can check my .qc file again.


$scale 0.425
$cd "C:\Users\Dev\Desktop\Milotic SFM & GMOD"
$cdmaterials "models\yunpolmodels\pokemon\Gen 3\Milotic"
$model studio "FMilotic.smd"
$modelname "yunpolmodels\pokemon\gen 3\MiloticF.mdl"
$bodygroup LEye
{
	studio FLEye1.smd
	studio FLEye2.smd
	studio FLEye3.smd
	studio FLEye4.smd
	studio FLEye5.smd
	studio FLEye6.smd
	studio FLEye7.smd
}

$bodygroup REye
{
	studio FREye1.smd
	studio FREye2.smd
	studio FREye3.smd
	studio FREye4.smd
	studio FREye5.smd
	studio FREye6.smd
	studio FREye7.smd
}

$bodygroup Mouth
{
	studio FMouth1.smd
	studio FMouth2.smd
	studio FMouth3.smd
	studio FMouth4.smd
	studio FMouth5.smd
	studio FMouth6.smd
}

$texturegroup "skinfamilies"
{
	{
		"pm0350_00_BodyA1.vmt" "pm0350_00_BodyB1.vmt"
		"pm0350_00_Eye1.vmt"     "pm0350_00_Mouth1.vmt"
	}
        {
		"pm0350_00_BodyA1_shiny.vmt" "pm0350_00_BodyB1_shiny.vmt"
		"pm0350_00_Eye1_shiny.vmt"     "pm0350_00_Mouth1.vmt"
	}
}

$upaxis "y"
$surfaceprop "flesh"
$sequence ragdoll 	"Fragdoll.smd" FPS 30 		activity ACT_DIERAGDOLL 1
$collisionjoints "FPhys.smd"
{
	$mass 162
	$inertia 10
	$damping 0
	$rotdamping 4
	$rootbone "Waist"

	$jointconstrain "tail01" x limit -60.00 60.00 0.00
	$jointconstrain "tail01" y limit -45.00 45.00 0.00
	$jointconstrain "tail01" z limit -60.00 60.00 0.00

	$jointconstrain "tail02" x limit -60.00 60.00 0.00
	$jointconstrain "tail02" y limit -45.00 45.00 0.00
	$jointconstrain "tail02" z limit -60.00 60.00 0.00

	$jointconstrain "tail03" x limit -60.00 60.00 0.00
	$jointconstrain "tail03" y limit -45.00 45.00 0.00
	$jointconstrain "tail03" z limit -60.00 60.00 0.00

	$jointconstrain "tail05" x limit -60.00 60.00 0.00
	$jointconstrain "tail05" y limit -45.00 45.00 0.00
	$jointconstrain "tail05" z limit -60.00 60.00 0.00

	$jointconstrain "tail07" x limit -60.00 60.00 0.00
	$jointconstrain "tail07" y limit -45.00 45.00 0.00
	$jointconstrain "tail07" z limit -60.00 60.00 0.00

	$jointconstrain "tail10" x limit -60.00 60.00 0.00
	$jointconstrain "tail10" y limit -45.00 45.00 0.00
	$jointconstrain "tail10" z limit -60.00 60.00 0.00

	$jointconstrain "tail12" x limit -60.00 60.00 0.00
	$jointconstrain "tail12" y limit -30.00 30.00 0.00
	$jointconstrain "tail12" z limit -30.00 30.00 0.00

	$jointconstrain "spine" x limit -60.00 60.00 0.00
	$jointconstrain "spine" y limit -30.00 30.00 0.00
	$jointconstrain "spine" z limit -60.00 60.00 0.00

	$jointconstrain "neck1" x limit -60.00 60.00 0.00
	$jointconstrain "neck1" y limit -30.00 30.00 0.00
	$jointconstrain "neck1" z limit -60.00 60.00 0.00

	$jointconstrain "neck2" x limit -60.00 60.00 0.00
	$jointconstrain "neck2" y limit -30.00 30.00 0.00
	$jointconstrain "neck2" z limit -60.00 60.00 0.00

	$jointconstrain "neck3" x limit -60.00 60.00 0.00
	$jointconstrain "neck3" y limit -30.00 30.00 0.00
	$jointconstrain "neck3" z limit -60.00 60.00 0.00

	$jointconstrain "neck4" x limit -60.00 60.00 0.00
	$jointconstrain "neck4" y limit -30.00 30.00 0.00
	$jointconstrain "neck4" z limit -60.00 60.00 0.00

	$jointconstrain "head" x limit -45.00 45.00 0.00
	$jointconstrain "head" y limit -30.00 30.00 0.00
	$jointconstrain "head" z limit -45.00 45.00 0.00

	$jointconstrain "lhairc1" x limit -30.00 30.00 0.00
	$jointconstrain "lhairc1" y limit -45.00 45.00 0.00
	$jointconstrain "lhairc1" z limit -45.00 45.00 0.00

	$jointconstrain "lhairc3" x limit -30.00 30.00 0.00
	$jointconstrain "lhairc3" y limit -30.00 30.00 0.00
	$jointconstrain "lhairc3" z limit -30.00 30.00 0.00

	$jointconstrain "rhairb1" x limit -30.00 30.00 0.00
	$jointconstrain "rhairb1" y limit -45.00 45.00 0.00
	$jointconstrain "rhairb1" z limit -45.00 45.00 0.00

	$jointconstrain "rhairb3" x limit -30.00 30.00 0.00
	$jointconstrain "rhairb3" y limit -30.00 30.00 0.00
	$jointconstrain "rhairb3" z limit -30.00 30.00 0.00

	$jointconstrain "rhairb5" x limit -30.00 30.00 0.00
	$jointconstrain "rhairb5" y limit -30.00 30.00 0.00
	$jointconstrain "rhairb5" z limit -30.00 30.00 0.00

	$jointconstrain "rhairb7" x limit -30.00 30.00 0.00
	$jointconstrain "rhairb7" y limit -30.00 30.00 0.00
	$jointconstrain "rhairb7" z limit -30.00 30.00 0.00

	$jointconstrain "rhairc1" x limit -30.00 30.00 0.00
	$jointconstrain "rhairc1" y limit -45.00 45.00 0.00
	$jointconstrain "rhairc1" z limit -45.00 45.00 0.00

	$jointconstrain "rhairc3" x limit -30.00 30.00 0.00
	$jointconstrain "rhairc3" y limit -30.00 30.00 0.00
	$jointconstrain "rhairc3" z limit -30.00 30.00 0.00

	$jointconstrain "rhairc5" x limit -30.00 30.00 0.00
	$jointconstrain "rhairc5" y limit -30.00 30.00 0.00
	$jointconstrain "rhairc5" z limit -30.00 30.00 0.00

	$jointconstrain "rhairc7" x limit -30.00 30.00 0.00
	$jointconstrain "rhairc7" y limit -30.00 30.00 0.00
	$jointconstrain "rhairc7" z limit -30.00 30.00 0.00

	$jointconstrain "lhairc5" x limit -30.00 30.00 0.00
	$jointconstrain "lhairc5" y limit -30.00 30.00 0.00
	$jointconstrain "lhairc5" z limit -30.00 30.00 0.00

	$jointconstrain "lhairb1" x limit -30.00 30.00 0.00
	$jointconstrain "lhairb1" y limit -45.00 45.00 0.00
	$jointconstrain "lhairb1" z limit -45.00 45.00 0.00

	$jointconstrain "lhairc7" x limit -30.00 30.00 0.00
	$jointconstrain "lhairc7" y limit -30.00 30.00 0.00
	$jointconstrain "lhairc7" z limit -30.00 30.00 0.00

	$jointconstrain "lhairb3" x limit -30.00 30.00 0.00
	$jointconstrain "lhairb3" y limit -30.00 30.00 0.00
	$jointconstrain "lhairb3" z limit -30.00 30.00 0.00

	$jointconstrain "lhairb5" x limit -30.00 30.00 0.00
	$jointconstrain "lhairb5" y limit -30.00 30.00 0.00
	$jointconstrain "lhairb5" z limit -30.00 30.00 0.00

	$jointconstrain "lhairb7" x limit -30.00 30.00 0.00
	$jointconstrain "lhairb7" y limit -30.00 30.00 0.00
	$jointconstrain "lhairb7" z limit -30.00 30.00 0.00

	$jointconstrain "tail15" x limit -60.00 60.00 0.00
	$jointconstrain "tail15" y limit -30.00 30.00 0.00
	$jointconstrain "tail15" z limit -45.00 45.00 0.00
}


okay. you compiled with sdk13mp compiler? or gmod has one that works? i’m downloading sdk13mp then (even tho i don’t need it, again). will check tho, when it’s here. sips coffee :v:

Yea, it’s works the SDK13MP compiler. Otherwise, I wouldn’t have posted those two pictures in the original post in the first place.

well. i’m still not sure what the exact problem is. it still compiles just like that pic i posted. the collision meshes are properly aligned. and its standing using $upaxis. that does however only relatively rotate the ragdoll animation, not the raw collision mesh. that is the unanimated ragdoll state. and that means you probably should rotate the whole setup by those 90 degrees.

tho, i guess you gon’ run into that lighting issue again? wasn’t that the inital problem with that worm in max? the heck.

Uh, that QC has a $model and $bodygroups first at the top, then $upaxis in the middle.

Also, get rid of the $cd completely and use FMilotic.smd instead of Fragdoll.smd. Removes those extra unneeded variables to the problem.

that doesn’t fix it. i had to figure (i never used that) upaxis only rotates the skeletal poses, not the reference models. i rotated the collision mesh with a lil smd edit. that rotates it’s reference pose. when using a sequence the collision falls on it’s face tho, cause the seuence pose is added.

also the ragdoll and FMilotic are exactly the same pose. it doesn’t matter.

the whole thing gotta be rotated properly. i won’t do it. it’s unwanted. :smile:

Yea, that’s true. All of the smds are in the same exact pose. It wouldn’t matter if I just swap out Fragdoll with FMilotic.

FPhys.smd was also in the same pose when I exported with the rest of the smds. The problem is that the collision model doesn’t rotate alongside with the rest of the smds properly as evident in the original two pictures.

You shouldn’t need $upaxis at all really, it’s pretty much only when you’re exporting from Maya.

Maybe it doesn’t in this case, but there are times where the ragdoll sequence can differ from the mesh skeleton and break.
Plus it removes the need to keep track of that extra file. I personally prefer to do it, takes less than five seconds and saves a lot of hassle.

So like I said, it seems the only advice we can give in this case is “just rotate it to the correct direction”. Sorry.

EDIT: Wait a sec, is the problem the collision is not moving with the model, or it’s rotated relative to the whole thing? The first two images don’t show the phymodel.

If this is for Gmod, try spawning it and typing ‘vcollide_wireframe 1’ into the console.

The simple steps and answers are here posted on the WW thread discussing this.

Ah, so I assume it was something Max-specific then? I admit I’m not very familiar with it.

Anyway, good to hear it’s been solved.

The normals are this: Traditional WW (free version) uses MAXScript for most things. Because the MAXScript access to explicit normals is slow, the exporter defaults to assuming you are using face normals to speed up access unless there is an Edit Normals modifier on the object. Since there was no modifier, it didn’t export the explicit normals. It’s up to the individual artist to learn this or turn on a global setting to always use explicit normals. WW Pro users should always turn that option on because there is no slowdown for it in WW Pro. (A failure to understand this is one reason many people’s models imported into Max from SMD/FBX,OBJ will re-export into Source with all hard edges.)

As for the rotation… I don’t know how the files were initially exported and put together in the QC. But the QC generated by WW with the steps I took were all aligned as expected. When it comes to using $upaxis, it’s generally not something you do with models you created inside 3ds Max. The only time I’ve needed it is when another artist sent me files created in Maya.