Dismiss Notice
60,000 passwords have been reset on July 8, 2019. If you cannot login, read this.

Importing models: symptoms, and cures

Discussion in 'Modeling & Animation' started by GhostWolf, Aug 16, 2016.

  1. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,952
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    The idea of this thread is to gather known causes and fixes for problems when importing models, to act as a quick index for people making their own models.
    I'll start with the few I remember, and hopefully people will pitch in with more.

    Problem: "Could not load file: *.mdl"
    Possible reasons:
    1. The model is valid, but you used it right after importing. Save and re-open your map. In the future, import the model, save the map, and only then use it.
    2. The model references invalid textures. This usually happens when you forget to remove the war3mapImported\ in imported texture paths.
    3. An Event Object is used (a sound emitter, a footprint emitter, etc.) but has no keys. Either remove the event object, or add keys.
    4. One of the textures referenced by the model could not load.

    Problem: The model shows, but is unselectable, or it seems to disappear oddly when it should be visible in-game.
    Possible reasons:
    1. The model extents are not correct. Recalculate them (e.g. in Magos).

    Problem: The model shows, but some vertices seem to be attached to the center of the map.
    Possible reasons:
    1. Some vertices are not attached to a bone. Attach them.

    Problem: The model shows, but some of the faces are lit properly, and some are black.
    Possible reasons:
    1. Your normals are messed up, with some facing outwards, and some inwards. Recalculate them (almost any 3D software can do this automatically, is there a WC3 tool for this?).
     
    Last edited: Sep 6, 2016
  2. Hermit

    Hermit

    Joined:
    May 29, 2013
    Messages:
    1,441
    Resources:
    3
    Models:
    2
    Icons:
    1
    Resources:
    3
    Oinkerwinkle's Vertex Modifier can recalculate normals, but it often makes them even worse.

    MdlVis always automatically recalculates normals upon opening a model and overrides any previous normal values on the mesh. This can also make them worse and it can't be prevented. However, normals can be restored. I explained it here.

    Another FAQ is:
    What causes Warcraft 3 to crash when using a model?

    This can be one of numerous reasons. One example is if you remove Geosets but doesn't remove Geoset Animations that refer to these Geosets. Always check through all Geoset Animations and remove those who have the Geoset ID "None". If you have added/removed Sequences then you may need to recalculate extents. If these are not the cases then it may be an unknown bug.
     
  3. Kyrbi0

    Kyrbi0

    Joined:
    Jul 29, 2008
    Messages:
    8,419
    Resources:
    2
    Models:
    1
    Maps:
    1
    Resources:
    2
    Interesting & useful thread. Posting to Subscroob.
     
  4. Emm-A-

    Emm-A-

    Joined:
    Jul 1, 2008
    Messages:
    1,312
    Resources:
    0
    Resources:
    0
    I think this is very useful! Good idea :)

    Can you include some special cases like
    -most of the model is visible ingame, but some textures are not?
    -the model displays but flickers in the editor?
    -when selecting something, instead the model is selected all over the map in the editor?
     
  5. LOLFROG

    LOLFROG

    Joined:
    Sep 1, 2016
    Messages:
    4
    Resources:
    0
    Resources:
    0
    I'm really thankful of you because I couldn't import any thing before I read you hint
     
  6. Zwiebelchen

    Zwiebelchen

    Joined:
    Sep 17, 2009
    Messages:
    7,014
    Resources:
    12
    Models:
    5
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    JASS:
    4
    Resources:
    12
    Here are some things I'd like to add:

    Problem: The model is visible, but seems to "pierce" through the global lighting and/or fog without getting shaded/fogged, which makes it appear like it is glowing.
    Possible Reason: Common issue with downloaded models! The material settings of the model are flagged as "unshaded" or "unfogged". Open the model in Magos and deselect these options under the materials tab.

    Problem: The model is visible, but there is some weird pixel flickering going on.
    Possible Reason: Polygons are z-fighting. There are two polygons parallel and too close to each other (or at exactly the same place), which causes the rendering engine to not be able to decide what is rendered first. You can solve this by removing polygon duplicates.

    Problem: The model is visible, but as soon as it is viewed in the game, all omnilights in the map seem to disappear.
    Possible Reason: The WC3 light-engine only supports omnilights with the same attenuation values applied; the default for these are MinAttenuation = 80 and MaxAttenuation = 200 (this is what all blizzard models use as a default). Using different values in your custom created omnilights can mess up the lighting in your game. You can edit the attenuation values of your custom models with Magos Model Editor.

    Problem: A sfx or attachment model that I applied via a special effect does not disappear instantly when destroyed.
    Possible Reason: The model does not have a death animation. Either add a death animation or attach the model via an ability.

    Problem: When applying a texture animation to a material in Magos, the animation will play properly in Magos, but will get lost after saving.
    Possible Reason: This is one of the bugs in Magos. You can fix it by saving your model as an .mdl file, then edit the file via a text editor, scroll down to "Materials", go to the layer you want to add the TextureAnimation to and add "TVertexAnimId 0," at the bottom of the layer properties. Then you can convert the file back to .mdx. For more information, consult a texture animation tutorial.

    Problem: Attached SFX and attachment models to my unit are too big/small.
    Possible Reason: The scaling of the attachment point of the unit model might be wrong. You can rescale the attachment point in the node editor in Magos. This can be used to use the same attachment models for both giant and small units.
     
  7. Hermit

    Hermit

    Joined:
    May 29, 2013
    Messages:
    1,441
    Resources:
    3
    Models:
    2
    Icons:
    1
    Resources:
    3
    I also noticed Magos can't save:
    -Ribbon Emitters with animated color
    -Ribbon Emitters with animated alpha
    -Ribbon Emitters with animated texture slots
    -Particle Emitters 1 aka Super Spray (those that emit models)

    E.g. you want to edit the Orc Wind Rider model, so you just open it and go to File->Save and you'll see that the particle emitters 1 (guts and bones that fall out of the Wyvern during the death animation) have disappeared from the Node Manager. I don't know if there's a way to avoid this, but I have noticed that if you find the model in the mpq, right click it and select Export, the emitters don't disappear. I usually convert the model to .mdl and add (restore) the emitters with Notepad when I'm done with all editing.
     
    Last edited: Oct 19, 2016
  8. Alok

    Alok

    Joined:
    Sep 6, 2015
    Messages:
    576
    Resources:
    17
    Models:
    6
    Icons:
    4
    Maps:
    3
    Tutorials:
    4
    Resources:
    17
  9. dtnmang

    dtnmang

    Joined:
    Apr 20, 2010
    Messages:
    561
    Resources:
    12
    Models:
    5
    Maps:
    2
    Ported Models:
    1
    Tutorials:
    4
    Resources:
    12
    I can document some ways to cause various symptoms:

    Setting the rarity of an animation sequence to 1
    Model crashes when loaded into the game.

    Having over 9000 vertices in a single geoset
    Causes massive flickering. Split it up into smaller geosets.
     
  10. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,952
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    I set the Footman's Walk animation's rarity to 1 and nothing happened. Can you confirm this is an actual issue? it's not the first time I hear of it, but I didn't see any problem yet. Perhaps on older patches?

    As to vertices, well, I don't have any model with 9000 vertices in one geoset. Do any exist? And are you sure about the number 9000?
     
  11. Kyrbi0

    Kyrbi0

    Joined:
    Jul 29, 2008
    Messages:
    8,419
    Resources:
    2
    Models:
    1
    Maps:
    1
    Resources:
    2
    Well we all know what happens if it goes over 9000...
     
  12. dtnmang

    dtnmang

    Joined:
    Apr 20, 2010
    Messages:
    561
    Resources:
    12
    Models:
    5
    Maps:
    2
    Ported Models:
    1
    Tutorials:
    4
    Resources:
    12
    Maybe it's a patch issue. The crash happened for me when my War3 was in version 1.27 but didn't happen in 1.26.
    About the 9000 vertices limit, I did port a high-poly model a while ago and this specific geoset kept causing problems. Its vertex count was above 9000, and when I split that geoset into 2 that one geoset's vertex count fell barely below 9000, the model began to work properly. So the limit is definitely somewhere around 9000.
     
  13. GhostWolf

    GhostWolf

    Joined:
    Jul 29, 2007
    Messages:
    4,952
    Resources:
    2
    Tools:
    1
    Tutorials:
    1
    Resources:
    2
    I have to wonder if that number has to do with the graphics driver rather than the game, doesn't really sound related to the game itself.
     
  14. Archaos

    Archaos

    Joined:
    Sep 26, 2020
    Messages:
    71
    Resources:
    0
    Resources:
    0
    alright i got a problem, i did not see it listed and being trying to figure it out, maybe someone here knows, it is reforged model im editing, a version of a demon hunter that didnt have the morph and demon form with it already, i have added it to it, now it works as it should in the studio, but upon putting into the world editor i only have its hero glow and demon hunter particle, the rest of it is invisible, so anyone happen to know what could be causing this and how to fix it?
     
  15. Razorclaw_X

    Razorclaw_X

    Joined:
    Apr 12, 2018
    Messages:
    362
    Resources:
    3
    Ported Models:
    3
    Resources:
    3
    More often than not it's the number of Vertex Groups in the Geoset (Geosets can only have up to 255 of them before you start seeing problems).
     
  16. dtnmang

    dtnmang

    Joined:
    Apr 20, 2010
    Messages:
    561
    Resources:
    12
    Models:
    5
    Maps:
    2
    Ported Models:
    1
    Tutorials:
    4
    Resources:
    12
    Hmm, interesting, might be worth doing some testing later.