Exporting wiper animation

Discussion in 'Car Modding' started by klaasvh, Jun 9, 2013.

  1. klaasvh

    klaasvh Registered

    Joined:
    Oct 5, 2010
    Messages:
    172
    Likes Received:
    193
    I've created a simple bone based keyframe animation for my car but I can't get it working properly in game. No matter what I try the wiper mesh is in the wrong position and I haven't seen it move yet. I'm guessing it's something in the export settings for either the mesh or the anm file.

    The mesh is rigged with the skin modifier and, like all other parts, the pivot point is located (0, 0, 0). I've exported it with the 'move' and 'fix bone names' ticked in the instance rollout in the gmt exporter.

    The only info I've found about exporting anims was based around trackside objects, so I've set up my animation based on this info. I've placed a root node at (0, 0, 0) and selected it in the animation rollout of the GMT exporter. Animation type is set to Selected nodes and the start and end keyframes are defined. I've tried some different settings but with no succes. Is there something I'm missing?
     
  2. pay2021

    pay2021 Registered

    Joined:
    Jul 7, 2012
    Messages:
    792
    Likes Received:
    4
    Not try before but:
    Wich pivot is in 0,0,0? the mesh or the parent bone?
    You export the anim just then the mesh right?

    Let me explore the anims export options to see what happen.
     
  3. klaasvh

    klaasvh Registered

    Joined:
    Oct 5, 2010
    Messages:
    172
    Likes Received:
    193
    Both the parent bone and the pivot point of the mesh are at (0, 0, 0).

    Which bones should I select before I hit 'do anim'? If I select my animated bone and the root bone it exports a 1kb anim file and if I only select the animated bone I get a 7kb file. None of them seem to work though. Here's how it's set up in 3ds max.

    wiper.jpg
     
  4. pay2021

    pay2021 Registered

    Joined:
    Jul 7, 2012
    Messages:
    792
    Likes Received:
    4
    The bones look disconnect, right? i think you must have two bones matching the two parts of the wiper arms.

    To export anim always select just the root, also put the same name in the second and third field of Animation.

    Let explore some, im not at home right now.
     
  5. klaasvh

    klaasvh Registered

    Joined:
    Oct 5, 2010
    Messages:
    172
    Likes Received:
    193
    i've changed the anim names and at least it's moving ingame now. Now I just need to get it in the right position, at the moment it's floating somewhere above the car and the anim making a strange rotation around the car.
     
  6. pay2021

    pay2021 Registered

    Joined:
    Jul 7, 2012
    Messages:
    792
    Likes Received:
    4
    My bad, to export anim select the mesh, sorry.

    edit: i do the same has you and dont work, have a message "the bone WIPER_ROOT could not be found in the file WIPER.ANM"
     
    Last edited by a moderator: Jun 10, 2013
  7. klaasvh

    klaasvh Registered

    Joined:
    Oct 5, 2010
    Messages:
    172
    Likes Received:
    193
    If i select the mesh and export the same happens. I got the anim working by selecting the keyframe animated bone and exporting. The problem is that the wiper mesh is not in the right position and the anim is offset as well.
     
  8. klaasvh

    klaasvh Registered

    Joined:
    Oct 5, 2010
    Messages:
    172
    Likes Received:
    193
    I must be missing something because i still can't get it right. I tried moving the root node, wiper object pivot point and some other stuff but it still seems to rotate around the wrong pivot. I can only imagine it being something simple I've overlooked. Is anybody able to help?
     
  9. Some1

    Some1 Registered

    Joined:
    Aug 23, 2012
    Messages:
    176
    Likes Received:
    14
    I can't remember exactly how I did it, but I had issues with wrong pivot as well. When exporting, you need to select the root object. Also, I think that I exported the biped stuff (MAX Biped) and not the node... hm.
     
  10. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,782
    Likes Received:
    2,243
    Necro post, but on topic. Did you ever figure this out? I'm having the same issue. My root bone is at 0,0,0, and my bone that controls my wiper is "not found in the animation".
     
  11. Nibiru

    Nibiru Registered

    Joined:
    Dec 24, 2011
    Messages:
    1,200
    Likes Received:
    1,295
    Have you worked this out yet? Im having same problem. I have made my own animations before rotating billboard, waving banners, flags, tents etc but this wiper is not working.
     
  12. Coutie

    Coutie Moderator Staff Member

    Joined:
    Oct 5, 2010
    Messages:
    3,782
    Likes Received:
    2,243
    No, I never really tried again.
     
  13. Tnadz

    Tnadz Registered

    Joined:
    Nov 2, 2017
    Messages:
    227
    Likes Received:
    151
    This is an older thread but still seems relevant. I'm not having this exact issue but it's related to the animation export. I export my poly object and bones, all weighted and happily animating together. Then when I load up a track, I get the error "Not enough bones in the anm file to match mesh". No idea what this means and the only other place I saw this error discussed was in this thread: https://forum.studio-397.com/index.php?threads/endurance-pack-issue.60348/

    After I clear the errors, the track finishes loading and then Dev Mod crashes to desktop. If I go into the gen file and remark out the anm file in the cockpit instance, I still get the errors but the track and cars load (no crash). No animation though. Here's my stack:
    [​IMG]
    I export that with Root Node pointing to the root object. All the settings are triple checked and match the documentation exactly. The root and wiper have pivots at 0,0,0. One other thing I tried was collapsing the skin modifier which got rid of the error but then the animations didn't work (the bones move but not the wiper, assuming because the skin link is broken). I'm just baffled at why this doesn't want to work. Wipers are cursed and have a nice hot spot in hell for all the mental damage they cause modders.

    Anyone have any ideas?
     
  14. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    @Tnadz The Message, that there are not enough Bones in the ANM.... normally shows up, when you don't select the Mesh itself and also all used Bones, when you export the Animation.
    Try if that works, when you do it.
    If not, please post a Screenshot, with the Settings that you use for the ANM Export.
     
  15. Tnadz

    Tnadz Registered

    Joined:
    Nov 2, 2017
    Messages:
    227
    Likes Received:
    151
    Thanks I'll try first thing after work and report back
     
  16. Tnadz

    Tnadz Registered

    Joined:
    Nov 2, 2017
    Messages:
    227
    Likes Received:
    151
    So I've done some experimenting. Selecting the polygons of the wiper mesh didn't have an effect. But what did was setting the wiper object as the root node:
    upload_2022-4-18_21-15-17.png
    No more errors and the wiper animates. HOWEVER, when it animates, it rotates around so bizarre axis (maybe the root bone?). I've seen others with similar problems...like in this very thread. I'll see if resetting X-Form helps with anything.
     
  17. Tnadz

    Tnadz Registered

    Joined:
    Nov 2, 2017
    Messages:
    227
    Likes Received:
    151
    AND it's fixed. Somehow, somewhere, Max decided it wanted to reset the center point somewhere else. I reset the transform on the wiper properly with all position info back at 0,0,0 and now it all works nicely! What a giant pain. At least in the process I have now automated the workflow for creating wiper patterns and learned that the documentation is wrong (regarding the Root Node).
     
    Gilles Benoit likes this.
  18. Tnadz

    Tnadz Registered

    Joined:
    Nov 2, 2017
    Messages:
    227
    Likes Received:
    151
    Additional issues. Moved on to the next car and tried making a wiper. Everything works except the wiper rotates around the wiper blade bone's coordinate instead of the wiper arm's coordinate. It's as though they are linked in the reverse order but definitely aren't. Everything animates fine in Max. One thing I noticed is if I untick the "Fix bone names" for the wiper object, the wiper arm will perform it's animation properly but the blade somehow detaches and pivots around its center point (the rotation point for the wiper blade bone). I really can't figure this one out. My only other option is to dump the wiper blade bone but then I can't control the way the blade follows the window curvature.

    https://cdn.discordapp.com/attachments/838850525936091136/970863719183699998/2022-05-02_21-42-48.mp4
     
    Gilles Benoit likes this.
  19. redapg

    redapg Registered

    Joined:
    Jan 16, 2012
    Messages:
    4,008
    Likes Received:
    2,875
    Watching the Video, i suppose that you missed some important and necessary Step(s) in the Workflow.
    Recheck, that the Wiper Mesh Pivot Point is set to 0,0,0 and that you did make "Reset X-Form" with it.
    Check the Names of the Bones (always give them unique Names!) and ensure that there are no Bones with the same Name in the same Scene.
    Check the Connection between Bones.
    Ensure that at least 1 Vertex of the Wiper Mesh has 0.001 Weight on the Base Bone (the one that is set at 0,0,0).
    Use the Wiper Mesh and no Bone as the "Root Node"....
    There can be a lot of Things causing such a strange Behaviour and it's hard to find out, without to have the Max Scene on the own Machine.
    If you can not get it working, i can offer to help, if you send me the Max Scene File by a private Conversation.
     
    Tnadz and Gilles Benoit like this.
  20. Tnadz

    Tnadz Registered

    Joined:
    Nov 2, 2017
    Messages:
    227
    Likes Received:
    151
    Thanks, Red. Yes, I have thoroughly checked the connections and each of those points as I thought the same. I will send the Max scene tonight (few hours). I appreciate the feedback!
     

Share This Page