1. Melee Mapping contest #3 - Poll is up! Vote for the best 4v4 melee maps!
    Dismiss Notice
  2. The 30th edition of the Modeling Contest is finally up! The Portable Buildings need your attention, so come along and have a blast!
    Dismiss Notice
  3. We have a new contest going on right now! Join the 11th Music Contest! You are to make a Cinematic modern sound-track for this contest, so come and compete with other people for fun.
    Dismiss Notice

Exporting models from Blender using the MDL exporter plugin

Discussion in '3D Modeling Tutorials' started by Fingolfin, Aug 20, 2018.

  1. sonphamthe11H

    sonphamthe11H

    Joined:
    Mar 6, 2017
    Messages:
    23
    Resources:
    0
    Resources:
    0
  2. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,140
    Resources:
    152
    Models:
    142
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    152
    The current version has limited support for animations and cannot export euler rotations, only quaternions. There are plug-ins for converting animations between euler and quaternion.

    The next version will support all animation types, I plan to release it as soon as i solve an issue I've been having.
     
  3. sonphamthe11H

    sonphamthe11H

    Joined:
    Mar 6, 2017
    Messages:
    23
    Resources:
    0
    Resources:
    0
    Updated but still messy
    U can use my .blend file to test
     
  4. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,140
    Resources:
    152
    Models:
    142
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    152
    Just tested it, and yeah, it does look messed up. I will look into this. I managed to get Hayates model to work though, so the issues might be due to the way the animations are imported from your source model. I noticed there are a lot of tracks, and a lot of frames for these tracks. There might also be issues with the conversion between euler and quaternion rotations - either way, i will see what i can do.
     
  5. sonphamthe11H

    sonphamthe11H

    Joined:
    Mar 6, 2017
    Messages:
    23
    Resources:
    0
    Resources:
    0
    could u edit the neodex 0.78b to export all the bones and their animations? IDK how to make it work
    the problem is: trolboy's script put the animations into the rotations,not the scalings and translations
    may this fix my problem: make it able to choose export the scalings or rotations or translations
     
    Last edited: Jan 3, 2019
  6. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,140
    Resources:
    152
    Models:
    142
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    152
    I have no idea what you are talking about, also, please don't double post, use the edit button.

    I am not responsible for the NeoDex plugin and i wouldn't know how to edit it even if i wanted to.
     
  7. sonphamthe11H

    sonphamthe11H

    Joined:
    Mar 6, 2017
    Messages:
    23
    Resources:
    0
    Resources:
    0
    I mean,make the option to choose what animation type they want to keep “rotation” or “translation” or “scaling”
    If u can make it animate only in the rotation,the model’ll lighter
     
  8. Ljusdahl

    Ljusdahl

    Joined:
    Apr 28, 2005
    Messages:
    149
    Resources:
    0
    Resources:
    0
    Thanks for your awesome tool!
    I'm trying to make a simple glow effect. The full billboarding box is ticked as instructed. The plane is offset from its bone, so that it doesn't clip through the model it's attached to. But it seems like it doesn't look straight at the camera, but rather has a parallel sight line(visible on the peasant to the right). Is that how it's supposed to be?
     

    Attached Files:

  9. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,140
    Resources:
    152
    Models:
    142
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    152
    I'm not really sure what you've done here, though i noticed that your pivot point is not centered... is the bone also offset from the center? If you want to get the effect you want, the bone has to be positioned at the point you want it to pivot around (i'm guessing the center), and the plane offset from it strictly in the forwards direction. Another option is to make two bones - one at the center of the attachment, and one at the center of the glow - parent the glow to this bone, then parent the glow bone to the root bone, and set them both to billboard.

    By the way, your name is very reminiscent of that of my hometown... coincidence??
     
  10. Ljusdahl

    Ljusdahl

    Joined:
    Apr 28, 2005
    Messages:
    149
    Resources:
    0
    Resources:
    0
    It's only off-center on the Z-axis, but I just tried centering it completely and the same problem is still there.
    The plane is offset in the forward direction.

    My nickname was picked at random many years ago, I' have no connection to the town. Cue X-Files theme song?
     
  11. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,140
    Resources:
    152
    Models:
    142
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    152
    Hmm, strange... can you send me the .blend file? Also, i noticed from the file that you have used a cube and just flattened it. You might want to use a plane primitive instead.

    I made my own attempt at this, does it behave the same in-game?
     

    Attached Files:

  12. Ljusdahl

    Ljusdahl

    Joined:
    Apr 28, 2005
    Messages:
    149
    Resources:
    0
    Resources:
    0
    I've messed around too much with the blender file since then, but I looked at yours and yes, that's what I did. I tested your .mdl and it has the same issue in-game.
    So I guess it's just the way Wc3 does billboarding. It would've been less noticeable back when it didn't support widescreen.
     
  13. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,140
    Resources:
    152
    Models:
    142
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    152
    One thing you can try is to place the glow at the origin, but check the box called "no depth test" in the material layer. This will make it draw as overlay... Then again, it will also draw over everything else too.
     
  14. Ljusdahl

    Ljusdahl

    Joined:
    Apr 28, 2005
    Messages:
    149
    Resources:
    0
    Resources:
    0
    Yep, that compromise worked!
    Are you happy to help with more little issues via PM's, or is it time to stop bugging you? :grin:
     
  15. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,140
    Resources:
    152
    Models:
    142
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    152
    PM away! I'm glad to help.
     
  16. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,140
    Resources:
    152
    Models:
    142
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    152
    Hey @sonphamthe11H, i found the issue that was screwing up your export and i have fixed it. The problem was that i was converting Euler rotations to radians, even though they were already stored as radians internally (Blender just views them as degrees). The animation looks almost right now, but there is a bug with his weapon. You can get the latest version off github if you want to try and see if you can fix it. The file still becomes pretty large though due to the large amount of keyframes (2mb).
     
  17. sonphamthe11H

    sonphamthe11H

    Joined:
    Mar 6, 2017
    Messages:
    23
    Resources:
    0
    Resources:
    0
    idk how,i'm just waiting for the update :smile:
     
  18. GriMw0lf

    GriMw0lf

    Joined:
    Thursday
    Messages:
    6
    Resources:
    0
    Resources:
    0
    Hey @Fingolfin , I've been using your blender add-on (Awesome job, by the way!) and it seems the animations aren't working properly once exported. I'm using Quaternion rotation, so as far as I know it should work. I don't have a whole lot of animation experience with Blender, so I was hoping to get some advice.

    Essentially the issue seems to be that the animations overshoot massively, both for rotations and translations. Any advice as to how to fix this issue?
     
  19. Fingolfin

    Fingolfin

    Joined:
    Jan 11, 2009
    Messages:
    3,140
    Resources:
    152
    Models:
    142
    Icons:
    1
    Packs:
    4
    Skins:
    2
    Maps:
    1
    Spells:
    1
    Tutorials:
    1
    Resources:
    152
    @GriMw0lf Are you using the most recent version? I animated stuff yesterday and it worked like a charm. Can you send me the blend file?
     
  20. GriMw0lf

    GriMw0lf

    Joined:
    Thursday
    Messages:
    6
    Resources:
    0
    Resources:
    0
    @Fingolfin I pulled it from Github on the 17th, so I believe it's the newest version.

    That being said, here is the blender file, mdl file, and blp file. I was testing out the animations.
    Thank you for the help, by the way!
     

    Attached Files: