Results 1 to 27 of 27

Thread: Chariot Development

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1

    Default Chariot Development

    KE and my good self have been re-pondering the question of making chariots a reality in M2TW. We have divided up the tasks equally amongst ourselves, with me doing the pestering, and KE doing the clever stuff. Seems fair (ahem )

    In between, we have done much tinkering, and there has been much quoting of the dead parrot sketch, discussions on Australian Tablewines, cheese, and the liklihood of me actually wishing to purchase a talking slug. Yes indeed ...

    And now for something completely different!

    First off, there was a need to make a chariot. Easy. KE has given us the tools to make new meshes for a mount, and also the ways to add extra bones and port that across to existing animations sets. Brilliant stuff.
    So..I considered th epossibility of simply taking a stock horse, and tacking on some extra bones at the back to make a chariot pole, platom and axles which could then be animated to fit with the stock horse moves. After a few early tests, it became clear that I also had to phsically move the horse relative to the 'root' bone ( h_saddle for a horse )or else the thing would pivot around the root and the chariot would appear to drag itself sideways in a bizarre way when it turned. n short...I came up with this:


    Now...I extracted a skeleton, and then applied that to the mesh to create a new animation set 'fs_chariot'.The new bones were indexed as '1', '2' and '3' in accordance with their position relative to the root. I manually edited the 'skeleton' file to do this, changoing them from 99. Ran it in game, and I noticed something VERY bizarre.In order to properly show it, here is a picture of the beast after animerge was run on the 'walk' animation.

    Note..there are actually 2 horses side by side, but rigged to the same central skeleton. I tried it like this AND with just one horse. Made no difference

    The vertices are all correctly assigned, and all definitely seems to be fine in the model department too. I also noticed in game that the chariot platform was messed up too. All that was visible was the front edsge of it. The rest appeared to vanish!

    Now...I have been swapping PM's with KE and pondering this deeply. Today, I have run another batch of tests. We could not figure out if the problem lay with the horse/mount mesh converter, or if it was related to the extra bones which had not really been tested with anything other than human skeletons.

    So...what I did was to re-run the whole process, moving the horse in EXACTLY the same way, but NOT adding the extra bones for the platform.

    This was the starting point. The exact same process was done, and the thing WORKS.

    Looks to me as though it was something to do with the extra bones mixed with the mesh converter that has hiccupped here. Ready to test more
    Last edited by Bwian; 10-08-2007 at 21:33.
    Careless Orc Costs Lives!

  2. #2
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Chariot Development

    This presents an excellent opportunity for me to hone my
    waffling skills. I did a quick rerun through the Python meshconverter (1.4)
    as it relates to mounts since that is the question here. I can't eliminate
    the converter as the culprit but I am inclined to think the problem is
    really in the animation utilities for the following reason:
    (1) There really is very little bone information in the mesh format, basically
    bone striings and not much else. That said, there are the node numbers that
    follow the bonestrings and that I never quite understood, it isn't really a
    hierarchy string as the numbers just run up and then repeat in the weapons
    /shields part. Maybe this is a problem but leave it aside for a moment.
    Besides, mounts don't have weapons or shields.

    Bone stuff is in the animations. Unfortunately, my only experiments were
    putting tails on armored_sergeants which would not have exposed the problems
    with turning extended skeletons around a pivot point. I don't have a series
    of experiments for this other than what happens if a small extra bone is added.
    Do the animations break down immediately? This would actually be a good
    result since it would point immediately to a problem in the utilities and that
    could be debugged. A bad result would be it only matters for large bones
    like a following appendage meaning we don't really understand how the
    animations work in the game engine. (Sorry, correction, meaning I don't
    understand how the animations work in the game engine.)

    Did not answer the question as posed but could you try one extra (small) bone
    and see if the mechanics still work ok or does the process break down.
    At least that might point to a part of the anim utilities to look at for bugs.

    (This is a side note, I've got verts and tris into gmax. Questions:
    (1) In 3dsmax is the vertical the z-axis like in gmax. So I can
    keep the x-aixs to the user's right and swap z for y and make y -> -y
    so it points into the screen? (And be right handed.)
    (2) How do Milkshape groups translate in 3dsmax. Are they separate
    meshes? That doesn't seem quite right but every try at selecting faces
    and trying to make them a group seems to fail with a syntax error. I'm
    probably just stumbling over jargon here; should I expect a 3dsmax "group"
    to mean the same thing as a Milkshape "group".)

    KE

  3. #3

    Default Re: Chariot Development

    OK....I think I can see tonights first test

    I will take a 100% standard horse mesh, and add a bone. If by adding an extra bone, I create a problem, we have an immediate guide that says the movement of the bones out of place isn't key to the problem, but adding bones is. I will start by adding a 'tail3' bone and see what that does. Ifit works OK, I will try moving the bone further away ( so it acts like a chariot pole. IF this still stays reliable, I could actually make a chariot stealing the tail from the models stock skeleton. Tail1 is the pole, tail2 is the platform, tail3 would then be the axle. I might even be able to get away with tail1 as the pole and tail 2 as the axle if we really can't get to grips with the adding bones. Would still like to be able to add extra bones to the horse skeleton...can I say 'pegasus' and not get people excited?

    Anyway....

    If I can get the stock unmoved skeleton to play ball with added bones, and it is tolerant of extended movement, then we have to point the finger at the animations not being correct.... but I am still not convinced! If you look at picture 2, the bones are in their correct location, but the SKIN has slipped! This points to some kind of problem with the way the bones movement is linked to the vertex assignments. Now...I have about as much idea how it all works as an Iron Age Shaman has about what made the sun rise ... but I do know if I sacrifice a chicken when the bright star shines over the tallest stone, the sun will rise. I do it every day, and the sun always rises... so I must be right!

    Phew...took ages to clean up the chicken entrails, but rest assured...we will have daylight today!

    Getting back on track:

    Tonights testing:
    1) Stock unmoved horse skeleton with new bone
    2) Stock unmoved skeleton with new bone moved a lot
    3) Stock unmoved skeleton with several bones

    As another interesting side issue, I made an accidental discovery that might be significant. In the stock horse skeleton, there is a scale factor. It scales them slightly oversize. First time I redid the tests last night, I left the scaling in the skeleton.txt file, when it was not in place in the MESH def in modeldb. I got some odd stretching of the extremities that were slightly like the problem I have been fretting over. It wasn't exactly...but it was near enough to make me think! When I ran the animation utilities, I was setting the animation scale values to 1,1,1 ... since I have taken the scale element out of the MESH definition, I also set the values in the animation set as 1,1,1 not 1.16 of the stock skeleton. Is it possible that I need to add this back in? I could be forcing the skeleton into a smaller size than the mesh and getting wierd results as a consequence. Possible? Well..I think I have to test it as well!

    Test 4) Replace original scale values in the mesh and descr_skeleton and re-run animations with the same scale value.

    Lastly. Your other questions.

    The co-ord system in Max is exactly the same as Max. The tool was created by cutting out a load of the higher level features of Max and the rendering engine, and tying up the file format. The plan was then to license plugins to software manufacturers to allow their game to be modded with GMax. Onlt hte very big players went for it though, and it died. Z is up.

    Group wise, I am not 100% sure. I know that a seperate object is needed to export a model as 3DS and have it import as a group in MS3D. I assume that MS3D groups translate as seperate objects in return, but I cannot be sure. Logic says yes.... but then again...I am back to the chicken scenario. Definitely sure that a single object in Max when exported as 3DS and imported to MS3D makes 1 group. 2 objects makes 2 groups.
    Careless Orc Costs Lives!

  4. #4
    Member Member KnightErrant's Avatar
    Join Date
    Jan 2007
    Location
    Huntsville, Alabama USA
    Posts
    458

    Default Re: Chariot Development

    Let me throw this in as well. Went and looked at the fs_horse
    walk animation and pulled out the data to a txt file. For regular
    human units animations the "footer" after the last of the data looks like

    Code:
    104 1  1  CaozSceneCustomAttribNode   1  0  1  0  0  +0.00000 +0.00000 +0.00000 +1.00000 +0.00000 +0.00000 +0.00000 0  0  -1 0          0  1  16 2  0  0  16 3  0  0  16 8  0  0  16 10 0  0  12 5  0  12 12 0
    The horse has extra stuff in the footer viz

    Code:
    170 1  2  CaozSceneCustomAttribNode   1  0  1  0  0  +0.00000 +0.00000 +0.00000 +1.00000 +0.00000 +0.00000 +0.00000 0  0  -1 0   Plane 1  0  1  0  0  -0.70711  +0.00000  +0.00000  +0.70711  +2.43048  -4.76820  -7.87057  0  0  0  0  2  16 2  0  0  16 3  0  0  16 8  0  0  16 10 0  0  73 5  1  0  +0.838 +0.612 +0.612 +1.000 +0.200 +0.200 +0.200 0  0  0  0  0  0  0    1 12 12 0
    Never knew what any of this stuff was for but there are extra sections of
    floats here. What I'm getting at is the question of the chariot not rendering
    further back than a certain point. I wonder if any of this data has anything
    to do with a rendering volume. Camels don't have any of this stuff so this
    is probably a bad guess.

  5. #5

    Default Re: Chariot Development

    Right...this is interesting...and frustrating in equal measures!

    Test 1 - Stock horse with an extra bone.

    This worked absolutely fine. The bone was added to the end of the tail, and named bone_tail3. The bone order was left with Tail1 as 1, but tail 2 was changed form 14 to 2, and Tail3 was made 3. The thing was created fone, and worked perfectly in game. Good

    Test 2 -Took the output form test 1, and moved the tail bones radically into the positions I would need a bone to be in relative to the horse. This also worked fine. Also good.

    Test 3 - Took the radically moved skeleton I had tested as above, and added the extra bone to the tail as in test 1. This ALSO worked fine. This was good, since it meant that the skeleton I had moved about had worked OK, and now the addition of 1 extra bone had not broken it.

    Test 4 - Flushed with the success of test 3, I figured I would try something else here. I took the 3 tail bones I had, and moved them into EXACTLY the position I wanted for my chariot parts. Tail1 became the pole...Tail2 the platform, and my new Tail 3 as a central axle. This also appears to be working OK. I have a chariot skeleton that WORKED.

    Now...I thought to myself...with all this working, WHY did my other one fail? I wondered if the bones were wrongly named, or if there was something in the steps I had missed. But no. Perhaps I added too many bones. Is there a bone limit? For a horse PLUS pole, platform and 2 bones for wheels... have I overdone it? TRied removing a bone or 2... but couldn't see a difference.

    Hmm... I got something that works, but I don;t know what the difference is between what worked and what failed!! AArrgh. A disaster in terms of a diagnostic test.

    edit... just tried to re-do the 'working' test..and it is broken. I do not seem to be able to duplicate it with ANY reliability...
    Last edited by Bwian; 10-09-2007 at 21:39.
    Careless Orc Costs Lives!

  6. #6

    Default Re: Chariot Development

    Now I am even more baffled.

    I just re-ran the process with the moved bones only skeleton......one which ran perfectly yesterday ..and had it fail in exactly the same way. Now...I knew this was not likely to be a 'random' thing, so I did a bit of head scratching, and realised that I had previousely commented out the scale entry in descr_skeleton and put it BACK in to try something else. Took it back out...and as if by magic...it worked again.

    So... one element that was screwing things up was scaling. Not completely the solution, because all the previous tests were done on a 1,1,1 scale, and not everything worked.... but I have found a way of deliberately creating the effect I have seen... and I did it by scaling the skeletons as well as the mesh... which seemed strange...but not so if the scaling factor in the skeleton was applied to something that was already scaled... if you see what I mean!


    Anyway....

    I have a horse which has gained some bones for a chariot, but lost it's tail in the process. Small price to pay! Now I just need to animate the former tail bones to make the chariot and wheels work properly!
    Careless Orc Costs Lives!

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
  •  
Single Sign On provided by vBSSO