Results 1 to 32 of 32
  1. #1

    Question Blender to UDK Skeletal Mesh Problems

    Hello everyone,

    So I've been trying to import my animated Skeletal mesh from blender to UDK but I've been having some problems. I've got the blend file here for you to fiddle around with to see if you can get it to work.
    https://dl.dropbox.com/u/36787774/re...imFix1-4.blend
    Anyway here is a step by step on what I did because nothing works no matter what I do.

    1)



    As you can see everything looks fine in blender, including the animations.

    2)



    So I try to export it as a PSK/PSA file

    3)



    And I get this error. So since I'm getting this error and can't seem to import this way, I just want to see what my model looks like in-game so I try to import as a Static mesh.

    4)



    So as you can see here, I'm about to export it as ase file which works fine.

    5)



    I click export and I'm done.

    6)



    So while in UDK, I'm about to import the ase file.

    7)



    So I click the ase file I want to import.

    8)



    and then I click ok.

    9)



    Then ok again to whatever this means.

    10)

    https://dl.dropbox.com/u/36787774/10.png

    Then hooray, it seems the model has imported.

    11)

    https://dl.dropbox.com/u/36787774/11.png

    Then it turns out some of the meshes are invisible. So even if I did export it as a PSK/PSA file the meshes would have been missing. So I have put the link to the .blend file for anyone to figure it out. I would be very grateful to anyone who can solve it as I've been trying to do this for weeks now.

    Thanks in advance
    -Mrhoix

  2. #2
    Boomshot
    Join Date
    Aug 2011
    Posts
    2,285

    Default

    I've tested your file using the FBX exporter and it imports fine, including all animations. I suggest you try that instead. There's a link in my sig to a thread discussing it's use, and you'll also find a required fix in there to correct an issue with the root bone.

    However, there are some problems with your setup that you need to work out.

    First, your mesh and rig are in standard blender metrics, which equates to one unreal unit per blender unit, so it imports as a tiny object (zoom in if you can't see it in UDK). Secondly the mesh and rig need to have a uniform scale of 1.0, so you need to apply the current object-level transforms and keep any scaling to mesh/bone edit. I did attempt to fix this in your blend, but it was corrupting the mesh and issuing warnings.

    Also you have sub-meshes for eyes and wings. This may be ok, I think the export/import merges them, but just be aware of that incase it's relevant.

  3. #3
    Marrow Fiend
    Join Date
    Jul 2006
    Location
    UT40k
    Posts
    4,184

    Default

    can't quite read the error there but as Spoof says join the mesh together will help not having problems, when using the UDK tolls to export as psk/psa make sure your mesh/armature origins are at 0,0,0 . make sure your vertex groups match the bones if you have extra or less then the export will fail

    i have some blender->udk videos on my youtube channel which might help, though i haven't tested the newer fbx export version yet
    UT40K:The Chosen - Warhammer 40,000 for UDK
    ut40kgeodav - UT3 Tutorials - Characters - Weapons - Vehicles - FaceFX
    UDK Tutorials - Basics - Vehicles - Characters - Weapons

  4. #4

    Default

    Quote Originally Posted by Spoof View Post
    I've tested your file using the FBX exporter and it imports fine, including all animations. I suggest you try that instead. There's a link in my sig to a thread discussing it's use, and you'll also find a required fix in there to correct an issue with the root bone.

    However, there are some problems with your setup that you need to work out.

    First, your mesh and rig are in standard blender metrics, which equates to one unreal unit per blender unit, so it imports as a tiny object (zoom in if you can't see it in UDK). Secondly the mesh and rig need to have a uniform scale of 1.0, so you need to apply the current object-level transforms and keep any scaling to mesh/bone edit. I did attempt to fix this in your blend, but it was corrupting the mesh and issuing warnings.

    Also you have sub-meshes for eyes and wings. This may be ok, I think the export/import merges them, but just be aware of that incase it's relevant.
    Quote Originally Posted by geodav View Post
    can't quite read the error there but as Spoof says join the mesh together will help not having problems, when using the UDK tolls to export as psk/psa make sure your mesh/armature origins are at 0,0,0 . make sure your vertex groups match the bones if you have extra or less then the export will fail

    i have some blender->udk videos on my youtube channel which might help, though i haven't tested the newer fbx export version yet
    Ok, thanks for both your help but I have ran into two more problems. It might be because I didn't do the root bone thing properly or something.

    Problem 1)



    When I drag the texture/Material onto my model it applies itself to the eyes and wings as well. I have seprate materials/textures to apply to the eyes and wings.

    Problem 2)



    The animations show the model being stretched in weird places. On top of that the animations don't even play because they only have one frame..

    Hope anyone can help me with this.

    Thanks again.

  5. #5
    Marrow Fiend
    Join Date
    Jul 2006
    Location
    UT40k
    Posts
    4,184

    Default

    you should be appling the materials in the mesh editor not by drag into the level.
    how did you export the anims, i know blender actions can be a pain but they do work with the udk tools exporter
    UT40K:The Chosen - Warhammer 40,000 for UDK
    ut40kgeodav - UT3 Tutorials - Characters - Weapons - Vehicles - FaceFX
    UDK Tutorials - Basics - Vehicles - Characters - Weapons

  6. #6
    Boomshot
    Join Date
    Aug 2011
    Posts
    2,285

    Default

    The animations seemed fine when I originally imported it using FBX. And when I tried to rescale your rig/mesh in Blender I noticed a similar problem with the limbs becoming twisted. I gave up because I was encountering odd issues.

  7. #7

    Default

    Quote Originally Posted by geodav View Post
    you should be appling the materials in the mesh editor not by drag into the level.
    how did you export the anims, i know blender actions can be a pain but they do work with the udk tools exporter
    Ah thanks, I've fixed the materials now.

    For the exportation of the animations, I followed this tutorial: http://krisredbeard.wordpress.com/tu...-player-model/ as it was linked on the forum post Spoof told me to look at. I did everything except the root bone thing as I just wanted to see if the animations actully played, which they didn't.

  8. #8
    Marrow Fiend
    Join Date
    Jul 2006
    Location
    UT40k
    Posts
    4,184

    Default

    when in the udk editor / animset viewer switch on the view bones button and play an anim, if the bones move then the skinning didn't work, if the bones don't move then the anims didn#t export correctly.
    i haven't do it much form blender to udk but i do know it works, try following my tutorials and see if you can get a simple mesh to animate
    UT40K:The Chosen - Warhammer 40,000 for UDK
    ut40kgeodav - UT3 Tutorials - Characters - Weapons - Vehicles - FaceFX
    UDK Tutorials - Basics - Vehicles - Characters - Weapons

  9. #9

    Default

    Quote Originally Posted by geodav View Post
    when in the udk editor / animset viewer switch on the view bones button and play an anim, if the bones move then the skinning didn't work, if the bones don't move then the anims didn#t export correctly.
    i haven't do it much form blender to udk but i do know it works, try following my tutorials and see if you can get a simple mesh to animate
    Well the mesh changes when I click on the diffrent animations so it's not a problem with the bones not being weight painted or whatever you call it. The problem is the animations don't play, because it seemed to only export the first keyframe of each of the animations I have on it. Also the fact that the mesh is more skrewd up than it should be. I guess it's a problem with how the aniamtion was exported..

  10. #10
    Boomshot
    Join Date
    Aug 2011
    Posts
    2,285

    Default

    Quote Originally Posted by mrhoix View Post
    Ah thanks, I've fixed the materials now.

    For the exportation of the animations, I followed this tutorial: http://krisredbeard.wordpress.com/tu...-player-model/ as it was linked on the forum post Spoof told me to look at. I did everything except the root bone thing as I just wanted to see if the animations actully played, which they didn't.
    I just re-downloaded your original blend and repeated what I did before...


    • Added a root bone to the armature and parented the three independant chains to it (I have a modified script which requires this, but you shouldn't need to since FBX exports the rig bound to an extra root by default).
    • Deleted the second rig (the one without a mesh) from the scene.
    • Exported as FBX (include animations, all actions, include default take). Got an error regarding scaling issues, but ignored it.
    • Imported FBX into UDK (bImportAnimations, bUseT0AsRefPose). Ignored the warning about version.
    • Opened the imported animset. Zoomed in on the mesh (which is only a couple of UU's in size due to the scaling issues in the blend).
    • Under the AnimSet tab at the bottom left I disabled bAnimRotationOnly. You can ignore the warning, or recompress the animations.
    • Enabled looping, click play, scroll through the list choosing anims...


    They all work.

    With bAnimRotationOnly enabled there's a lot of stretching and distortion because of how it's rigged. I would also spend some time fixing the scaling issues - I didn't try for very long, but couldn't do it without breaking something.

    Both the mesh and armature objects need to be located at the origin and have a scale of 1.0 (ALT-G, ALT-S, ALT-R), while internally (edit mode) the vertices/bones should be scaled up so that blender units match unreal units. I find the whole workflow works better that way, without any export scaling factors.

  11. #11

    Default

    Quote Originally Posted by Spoof View Post
    I just re-downloaded your original blend and repeated what I did before...


    • Added a root bone to the armature and parented the three independant chains to it (I have a modified script which requires this, but you shouldn't need to since FBX exports the rig bound to an extra root by default).
    • Deleted the second rig (the one without a mesh) from the scene.
    • Exported as FBX (include animations, all actions, include default take). Got an error regarding scaling issues, but ignored it.
    • Imported FBX into UDK (bImportAnimations, bUseT0AsRefPose). Ignored the warning about version.
    • Opened the imported animset. Zoomed in on the mesh (which is only a couple of UU's in size due to the scaling issues in the blend).
    • Under the AnimSet tab at the bottom left I disabled bAnimRotationOnly. You can ignore the warning, or recompress the animations.
    • Enabled looping, click play, scroll through the list choosing anims...


    They all work.

    With bAnimRotationOnly enabled there's a lot of stretching and distortion because of how it's rigged. I would also spend some time fixing the scaling issues - I didn't try for very long, but couldn't do it without breaking something.

    Both the mesh and armature objects need to be located at the origin and have a scale of 1.0 (ALT-G, ALT-S, ALT-R), while internally (edit mode) the vertices/bones should be scaled up so that blender units match unreal units. I find the whole workflow works better that way, without any export scaling factors.
    Thank You, I will try this out when I have the time. I'll be sure to let you know how it goes.

  12. #12

    Default

    Ok, I tried what you said but it is still the same. This time I recorded it so you can see exactly what I'm doing. Go full screen 1080p or 720p to see less blurry.



  13. #13

  14. #14

    Default

    Quote Originally Posted by Spoof View Post
    Hard to tell at the end, is that just low frame rate or are the anims not moving?
    They're not moving.

  15. #15
    Boomshot
    Join Date
    Aug 2011
    Posts
    2,285

    Default

    Hmm. They do when I import them. Did you tick the looping box next to play?

    Edit: ok, I see that it's looping.

  16. #16
    Boomshot
    Join Date
    Aug 2011
    Posts
    2,285

    Default

    I tried it once more, this time without modifying the blend at all. The animations are broken/distorted, but they do play. It swims, flaps, idles and stuff.

    I'm using January 2012 UDK, Blender 2.63.0 and a slightly modified FBX exporter. The modification is described in Kris' blog here and simply prevents the exporter from grouping all the bones under an extra root.

    Just to add: I can't record it because FRAPS isn't able to capture the mesh viewer properly.

  17. #17

    Default

    Quote Originally Posted by Spoof View Post
    I tried it once more, this time without modifying the blend at all. The animations are broken/distorted, but they do play. It swims, flaps, idles and stuff.

    I'm using January 2012 UDK, Blender 2.63.0 and a slightly modified FBX exporter. The modification is described in Kris' blog here and simply prevents the exporter from grouping all the bones under an extra root.

    Just to add: I can't record it because FRAPS isn't able to capture the mesh viewer properly.
    I'll play around with blender and stuff but I was just wondering if you could upload the FBX you exported to see if that will work in my UDK. If it still doesn't work then there must be something wrong with my UDK.

    Edit: I'm using July 2012 UDK, could that be the problem?
    Last edited by mrhoix; 08-23-2012 at 10:06 AM.

  18. #18

    Default

    Quote Originally Posted by Spoof View Post
    I tried it once more, this time without modifying the blend at all. The animations are broken/distorted, but they do play. It swims, flaps, idles and stuff.

    I'm using January 2012 UDK, Blender 2.63.0 and a slightly modified FBX exporter. The modification is described in Kris' blog here and simply prevents the exporter from grouping all the bones under an extra root.

    Just to add: I can't record it because FRAPS isn't able to capture the mesh viewer properly.
    You checked it out yet spoof?

  19. #19

    Default

    Sorry to keep bumping, but has anyone checked it yet?

  20. #20

    Default

    I feel aweful bumping again, but bump.

  21. #21
    Boomshot
    Join Date
    Aug 2011
    Posts
    2,285

    Default

    Sorry, I've been busy. I've uploaded an fbx file here: http://www19.zippyshare.com/v/3257865/file.html

    All I did was:
    • Delete the spiro rig without a mesh
    • Add a new Root bone, and parented the three existing roots to it
    • Exported using the modified fbx exporter that prevents the automatic addition of a root


    Theoretically the default exporter would produce the same results as what I did above anyway.

    Import into UDK (include anims, etc.) and untick the rotation-only flag.

  22. #22

    Default

    Spoof, how about now?

  23. #23

  24. #24

    Default

    Quote Originally Posted by Spoof View Post
    Can you elaborate on that?
    Oops sorry, I didn't see that you had written anything, I'll check it out now.

  25. #25

    Default

    Quote Originally Posted by Spoof View Post
    Sorry, I've been busy. I've uploaded an fbx file here: http://www19.zippyshare.com/v/3257865/file.html

    All I did was:
    • Delete the spiro rig without a mesh
    • Add a new Root bone, and parented the three existing roots to it
    • Exported using the modified fbx exporter that prevents the automatic addition of a root


    Theoretically the default exporter would produce the same results as what I did above anyway.

    Import into UDK (include anims, etc.) and untick the rotation-only flag.
    Ah man, it does the same thing as it did before. I think it must be a problem with the new UDK. I'll try and download the version you have.

  26. #26
    Marrow Fiend
    Join Date
    Jul 2006
    Location
    UT40k
    Posts
    4,184

    Default

    i can get the mesh into udk fine via the normal fbx export but not the udk tools, you need to join the mesh together then parent it to the rig select auto vertex groups then fix the vertex weights.

    btw if i import the anim then the mesh goes a mess, plus the mesh scale is small
    UT40K:The Chosen - Warhammer 40,000 for UDK
    ut40kgeodav - UT3 Tutorials - Characters - Weapons - Vehicles - FaceFX
    UDK Tutorials - Basics - Vehicles - Characters - Weapons

  27. #27

    Default

    Finaly I have fixed it! All I had to do was click the "Resample Animation" box when importing! Jeez that took a long time. Thanks for everyones help, now I just need to fix the skrewd up animation. Does anyone know how I can fix it?

  28. #28

    Default

    Oh, and is it possible to scale the mesh while in UDK?

  29. #29
    Marrow Fiend
    Join Date
    Jul 2006
    Location
    UT40k
    Posts
    4,184

    Default

    its posible but not advisable re-do it in blender, yes i know its a pain but it will be better
    UT40K:The Chosen - Warhammer 40,000 for UDK
    ut40kgeodav - UT3 Tutorials - Characters - Weapons - Vehicles - FaceFX
    UDK Tutorials - Basics - Vehicles - Characters - Weapons

  30. #30
    Boomshot
    Join Date
    Aug 2011
    Posts
    2,285

    Default

    Yes, fix it at the source. The setup really didn't feel like it was properly rigged for a game.

    You may have too many bone influences per vertex, or the bones may be stretching (bones should only rotate and translate, ideally they should just rotate to be optimal).

    You may also be able to reduce the bone count by moving the IK controllers to a seperate hierarchy that doesn't include deformer bones - this way they will still drive the animation but will be excluded from export.

  31. #31

    Default

    Quote Originally Posted by Spoof View Post
    Yes, fix it at the source. The setup really didn't feel like it was properly rigged for a game.

    You may have too many bone influences per vertex, or the bones may be stretching (bones should only rotate and translate, ideally they should just rotate to be optimal).

    You may also be able to reduce the bone count by moving the IK controllers to a seperate hierarchy that doesn't include deformer bones - this way they will still drive the animation but will be excluded from export.
    Thank you, I have fixed the animation and it plays just as it does in Blender now as long as I have unticked the rotation-only flag. Will that cause any problems, the fact that I have to untick the rotation-only flag?

  32. #32
    Marrow Fiend
    Join Date
    Jun 2009
    Posts
    4,481

    Default

    Pretty sure it is just to strip translation for performance.
    Please don't send me private messages asking how to use UDK unless it has to do with my work, everything I can teach is already out there.

    I am not support, I am here to learn myself.


 

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Copyright ©2009-2011 Epic Games, Inc. All Rights Reserved.
Digital Point modules: Sphinx-based search vBulletin skin by CompletevB.com.