Model Compiling w/ Double Tris

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
Not really a specific model section, so hopefully the mapping section will do.

I started working on this for the polycount contest, but never entered. Just recently got the urge to finish it up. Pyro fireplace poker with fireworks strapped on. Textures obviously are not final.

pyro_poker_wip02.jpg


The problem has to do with the triangles. It's at 6404 tris, which is fine for a viewmodel/world model at the highest LOD... however after I compile it, it doubles the tris to 12808 for reasons I simply do not understand.

None of my other models have done this.

I've confirmed that I don't have a duplicate mesh in there, heh.

Using XSI Mod Tool. Exporting as SMD doesn't seem to be the problem; I export, reimport it, it's at the same number of tris. Something to do with GUIStudio or my QC:

Code:
$cd "C:\Program Files\Steam\steamapps\[USER]\sourcesdk_content\tf\modelsrc\earkham\WIP\pyro_poker\"

$modelname "weapons\c_models\c_pyropoker\c_pyropoker.mdl"
$model studio "./w_firepoker_ref.smd"
$cdmaterials "models\weapons\v_pyropoker\"

$scale 1

$staticprop

$surfaceprop "metal"

$texturegroup skinfamilies
{
	{ "v_firepoker_base.vmt" "v_firepoker.vmt" }
	{ "v_firepoker_base.vmt" "v_firepoker_blue.vmt" }
}

$sequence idle "idle" fps 0.01

// Physics data
$collisionmodel "generic_collision_phys.smd" {
$Mass 1000
$concave }

The QC is setup for a basic staticprop so I could work on the texture (I'll compile as an actual weapon later after fixing problems and fully texturing).

Any idea what's doubling the tri count?

Kep
 

Rexy

The Kwisatz Haderach
aa
Dec 22, 2008
1,798
2,533
You sure you're reading triangles and not quads? Seem logical to me that you would end up with double the amount of polygons if you accidentally read quads instead of triangles.
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
Pretty sure, yeah:

pyro_issue01.jpg


(polys increased slightly since last post 'cause I fixed a couple of n-gons)

Thing is, other models I've done have the correct number of tris in XSI and in HLMV. Something is causing the compile process to add yet more triangles. Thought it was n-gons, but I fixed those and still no dice.

Gonna compile it one part at a time and see if any of the compiles do so without doubling.

[Edit] Yeah, this is maddening. I can create a new mesh, subdivide, deform, extrude, etc and it'll keep the same tris after compiling... but so far not a single component of the weapon mesh will compile without doubling. :\

Kep
 
Last edited:

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
If I export it as an smd, then reimport that smd, the reimported copy has the correct number of tris. That's why I'm thinking it's happening in the compile process. Not sure, but that's what it looks like.

Get this though: If I copy and detach six tris from the existing mesh, delete everything else, then export THAT as the smd... it'll double it to 12. If I make brand new meshwork and export THAT, it's the correct number of tris.

Something is going on with the mesh that GUIStudio doesn't like. No freaking clue what that is... and I don't want to rebuild the whole thing from scratch since I could end up with the exact same problem again.

Blarga blarga blarga.

Kep
 

JoshuaC

L420: High Member
Sep 2, 2008
444
164
It's most likely your vmt.

If you have "$cloakPassEnabled" "1" in your vmt, it'll double the number of polygons shown in hlmv. It's just a bug, and doesn't actually double the tri count.
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
It's most likely your vmt.

If you have "$cloakPassEnabled" "1" in your vmt, it'll double the number of polygons shown in hlmv. It's just a bug, and doesn't actually double the tri count.

o_O

...yup, I did have that in the vmt. Removed it and the tris went to normal. Thanks, I would have spent the rest of the night trying to figure out what's going on without that EVER occuring to me. Wow, LOL. If I could thank you twice, I would.

So relieved now. :)

Kep
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
Not worth a new thread, but I have to ask:

pyro_issue02.jpg


This is the exact same compile of the model in both shots, but HLMV has decided to add the fireaxe. There is no fireaxe reference at all in the qc or in the model when viewed in anything else. It only appeared after I looked at the original fireaxe viewmodel, and hasn't gone away (despite restarting steam).

Is this another HLMV quirk I can safely ignore?

Kep
 

EArkham

Necromancer
aa
Aug 14, 2009
1,625
2,773
Yup, that fixed it. Thankya.

Another question while it's in my head. Okay, actually, more of a mini-novel:

This poker is obviously narrower than the fireaxe, so I was planning to tweak the animations (tighten up the grip, scoot the left hand down the shaft a bit more, etc) and submit those as well to the contribute site. Unfortunately, what should be a simple job in XSI has been completely thwarted by the fact that XSI screws up weightmapping and origins when importing dmx.smd files. :\

Milkshape seems able to import/export correctly (which is how I got as far as I did), but the interface is frankly a total POS. In the time it'd take me to learn to use Milkshape efficiently enough to tweak, I would have been able to make the animation from scratch in XSI.

Further, I noticed that the latest releases use a set of character arms with animations appropriate for all the new content. I don't think they use a seperate viewmodel + weapon anymore, but a set of arms + a world model for the viewmodel. There any documentation on this?

So is it even necessary to mess with animations or viewmodels at all when submitting to the contribution site? Thinking that if they choose this item, they probably won't bother with fixing the animations if I don't do it as part of the submission, given their past release history. Heh.

TLDR: Is there a way to get the default valve animations into XSI correctly?

Thanks,

Kep