Model Compiling w/ Double Tris

Discussion in 'Mapping Questions & Discussion' started by EArkham, Oct 9, 2010.

  1. EArkham

    aa EArkham Necromancer

    Messages:
    1,564
    Positive Ratings:
    2,168
    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.

    [​IMG]

    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
     
  2. Rexy

    aa Rexy The Kwisatz Haderach

    Messages:
    1,795
    Positive Ratings:
    2,366
    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.
     
  3. EArkham

    aa EArkham Necromancer

    Messages:
    1,564
    Positive Ratings:
    2,168
    Pretty sure, yeah:

    [​IMG]

    (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: Oct 9, 2010
  4. Mick-a-nator

    aa Mick-a-nator

    Messages:
    640
    Positive Ratings:
    314
    Are you sure they are being added during the compile process? have you checked the exported file before compiling it? that'll just narrow down the problematic area.
     
  5. EArkham

    aa EArkham Necromancer

    Messages:
    1,564
    Positive Ratings:
    2,168
    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
     
  6. A Boojum Snark

    aa A Boojum Snark Toraipoddodezain Mazahabado

    Messages:
    4,769
    Positive Ratings:
    5,527
    Does the model have backfaces when compiled?
     
  7. JoshuaC

    JoshuaC L7: Fancy Member

    Messages:
    446
    Positive Ratings:
    145
    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.
     
    • Thanks Thanks x 1
  8. EArkham

    aa EArkham Necromancer

    Messages:
    1,564
    Positive Ratings:
    2,168
    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
     
  9. JoshuaC

    JoshuaC L7: Fancy Member

    Messages:
    446
    Positive Ratings:
    145
    Happened to me as well. It's a known bug, but valve doesn't seem too interested in fixing it anytime soon.
     
    • Thanks Thanks x 1
  10. EArkham

    aa EArkham Necromancer

    Messages:
    1,564
    Positive Ratings:
    2,168
    Not worth a new thread, but I have to ask:

    [​IMG]

    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
     
  11. JoshuaC

    JoshuaC L7: Fancy Member

    Messages:
    446
    Positive Ratings:
    145
    It's not, actually. Go to file>unload weapon.
     
    • Thanks Thanks x 1
  12. EArkham

    aa EArkham Necromancer

    Messages:
    1,564
    Positive Ratings:
    2,168
    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