LOD issue

Discussion in 'Mapping Questions & Discussion' started by UGLYdumpling, Aug 10, 2010.

  1. UGLYdumpling

    UGLYdumpling L3: Member

    Messages:
    127
    Positive Ratings:
    56
    ok, i've done this before - but somehow it's not working for me now.
    Maybe I've been staring at it for too long.

    When i do a regular compile using the 'low' mesh as a LOD @50 ... I test in the model viewer and at 50 it displays nothing and the info panel says there is no geometry displayed. It's not flipped normals, it is replacing my highrez mesh with 'nothing'. hmph!

    So the meshes load independently - if I create a temporary .QC for the lowrez LOD.
    *IGNORE THE TEXTURES plz, they are temporary* :cool:
    [​IMG]

    Here's the .QC for the highrez mesh

    Code:
    /*
    ----------------
    UGLYivy QC
    Model by : UGLYdumpling (sammy@hallam.ca)
    Texture by : BoyLee (mattboyle84@googlemail.com)
    ----------------
    */
    
    $modelname "custom_models\uglyivy\uglyivy01.mdl"
    
    $origin 0 0 0 90
    $scale 1.0
    $body "Body" "uglyivy01.smd"
    $staticprop
    $surfaceprop wood
    $upaxis Z
    
    $cdmaterials "custom_models\uglyivy"
    
    $sequence "idle" "uglyivy01.smd" fps 30
    
    // LOD 1
    $lod 50
    {
           replacemodel "uglyivy01" "uglyivy01low"
    }
    
    and the buffer for my compile ...

     
    Last edited: Aug 10, 2010
  2. Acumen

    aa Acumen Annoyer

    Messages:
    704
    Positive Ratings:
    594
    maybe add the ".smd" at the end of your lod replacement ?

    mine looks like this:

     
    • Thanks Thanks x 1
  3. UGLYdumpling

    UGLYdumpling L3: Member

    Messages:
    127
    Positive Ratings:
    56
    good eye acumen, but sadly, no dice - problem persists.
     
    Last edited: Aug 10, 2010
  4. Acumen

    aa Acumen Annoyer

    Messages:
    704
    Positive Ratings:
    594
    maybe post the model's qc where it 100% worked ?
    make sure you recompiled and doublechecked that "old" model where you had no problems with LOD.
     
  5. UGLYdumpling

    UGLYdumpling L3: Member

    Messages:
    127
    Positive Ratings:
    56
    hmmm ... the 'low' is nothing fancy at all.
    two polygon planes with simple textures I hardware rendered.

    wierd, eh?

    Code:
    /*
    ----------------
    UGLYivy QC
    Model by : UGLYdumpling (sammy@hallam.ca)
    Texture by : BoyLee (mattboyle84@googlemail.com)
    ----------------
    */
    
    $modelname "custom_models\uglyivy\uglyivy01low.mdl"
    
    $origin 0 0 0 90
    $scale 1.0
    $body "Body" "uglyivy01low.smd"
    $staticprop
    $surfaceprop wood
    $upaxis Z
    
    $cdmaterials "custom_models\uglyivy"
    
    $sequence "idle" "uglyivy01low.smd" fps 30
    
     
    Last edited: Aug 10, 2010
  6. Acumen

    aa Acumen Annoyer

    Messages:
    704
    Positive Ratings:
    594
    i meant with the LOD working. sounded like you the lod stuff working once before on a different model...

    exporting issue couldn't be the problem since it worked as an individual compile, i guess...
    end could be uploading and let others do a testcompile to check it all out :/
     
    • Thanks Thanks x 1
  7. UGLYdumpling

    UGLYdumpling L3: Member

    Messages:
    127
    Positive Ratings:
    56
    oh! well the working LOD that i've done before is my steamroller.

    Code:
    /*
    ----------------
    Steamroller QC
    Model by : UGLYdumpling (sammy@hallam.ca)
    Texture by : BoyLee (mattboyle84@googlemail.com)
    ----------------
    */
    
    $modelname "custom_models\steamroller\steamroller.mdl"
    
    $origin 0 0 0 90
    $scale 1.0
    $body "Body" "steamroller.smd"
    $texturegroup skinfamilies
    {
    	{ "steamroller"  }
    	{ "steamroller_red" }
            { "steamroller_blu" }
            }
    
    $staticprop
    $surfaceprop metal
    $upaxis Z
    
    $cdmaterials "custom_models\steamroller"
    
    $sequence "idle" "steamroller.smd" fps 30
    $collisionmodel "steamroller_c.smd"
    { $mass 100.00
      $concave
      }
    
    // LOD 1
    $lod 50
    {
          replacemodel "steamroller" "steamroller_lo"
          }
    
     
  8. UGLYdumpling

    UGLYdumpling L3: Member

    Messages:
    127
    Positive Ratings:
    56
    gave my files to acumen. We spent nearly an hour trying all sorts of things like re-exporting the geometry - swapping the highrez for lowrez in the replacemodel section ... no results.

    i think we both came about -> <- this close to losing our minds completely.
    I will give you a Golden Wrench if you can solve the mystery!
    http://dl.dropbox.com/u/9497546/uglyivy01.rar
     
    Last edited: Aug 10, 2010
  9. Rexy

    aa Rexy The Kwisatz Haderach

    Messages:
    1,795
    Positive Ratings:
    2,366
    The problem is because you're asking the model to use two separate texture sets through LODs as though they were different skins. This is incorrect. This is where your problem lies. Your smds for each LOD can use completely different UV meshes if you desire...the problem is that the model is still reading the first texture set for the LOD version...which is nonexistant, since you've told the LOD smd to change texture sets.

    However, if you tell the LOD smd to use the same texture set as the full polygon ulgyvines01 version, you no longer have the problem. See below:

    [​IMG]

    Naturally, this is not a good solution because the UV coordinates are completely wrong as they were not intended to be used by this texture set. You can't have a model with LOD versions that use different texture sets. You can have a model with different skins and LODs, just not with different skins per LOD version...the LODs will always look for the parent textures of the full poly version.

    But a MUCH better solution lies ahead of you, because there's already some problems with the texture and UV setup here, whether you intended it to be this way or not...

    [​IMG]

    So much wasted space, and on 1024 maps? That much will cause you performance issues faster than the 3000 polycount, which btw isn't really that bad.

    I'd suggest getting it all onto 1 1024 map, even a 512 would be ok. You can still have multiple shaders on one texture map ("$alphatest" "1", this case, and as many others as you want), if you have questions as to how this is done, PM me, I'll explain the process in a per-software basis. As far as your LOD version, just use a program or plugin that will let you reduce the polycount and keep the UV intact. At a distance, and distortion in the LOD won't be noticable--that's the point of the LOD anyway. Make 2 or three of them, that way the change is gradual. Going from 3000 polys to 4...not a good idea.

    Also, I'd leave all this fancy-pants stuff out of your QC...there's no one to impress! Being able to write a QC and compile a model is credit enough. Anyone smart enough to recompile your work is just going to delete it anyway, it doesn't serve as copy protection.

     
    • Thanks Thanks x 2
    Last edited: Aug 10, 2010
  10. Rexy

    aa Rexy The Kwisatz Haderach

    Messages:
    1,795
    Positive Ratings:
    2,366
    Pst--I can haz golden wrench?
     
    • Thanks Thanks x 1
  11. Acumen

    aa Acumen Annoyer

    Messages:
    704
    Positive Ratings:
    594
    thank god you still check the forums from time to time :)
     
  12. UGLYdumpling

    UGLYdumpling L3: Member

    Messages:
    127
    Positive Ratings:
    56
    Eureka!

    Seems obvious now, but I guess I just assumed that the swapping of models in the LOD process is just that - swapping A for B. I didn't realize there's a relationship between A and B at a UV level. I don't know enough to understand if that makes any sense, but I have to live with it.