Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: Repeating Path.  (Read 5677 times)

Liminator

  • Newbie
  • *
  • Posts: 1
    • View Profile
Repeating Path.
« on: January 18, 2010, 11:54:40 pm »

Hi I'm pretty new to Anim8or and so far am having a lot of fun with it. Right now I'm making a military type video and have a lot of repetition in it. So my question is is there a way I can simply copy a path from one figure to another but offset it to one side? Thanks.
Logged

Josmic8or

  • Full Member
  • ***
  • Posts: 139
  • anim8t & celebr8t
    • View Profile
    • JOSIAHSTUDIOS
Re: Repeating Path.
« Reply #1 on: January 23, 2010, 12:59:40 am »

I don't think that is possible in this version of Anim8or.

But I have a suggestion!Why don't you set the figures to be related to each other in the scene. :)
Logged
:

Raxx

  • Administrator
  • Hero Member
  • *****
  • Posts: 1482
    • View Profile
Re: Repeating Path.
« Reply #2 on: January 23, 2010, 05:09:56 am »

You may want to look at controller scripting in Anim8or v0.97d preview. Controller scripting allows you to control many elements of a scene via scripts. Here's something that can help you learn how to do it: http://www.biederman.net/leslie/tutorials/ASL%20Scripting/ASL_scripting.htm

If you don't feel like touching scripting, here's another option. This actually gets a little bit complicated but should give you the results you want:

  • After you set up all the movements for your origin figure that you want to copy over, export your scene without the elements so that you have a smaller file size to work with (Scene->Export, then save as .an8).
  • Open the new .an8 file in notepad
  • Here's an example of what a file would look like. Yours probably looks different and larger, but the structure will be the same:
  • Code: [Select]
    header {
      version { "0.97d beta" }
      build { "2008.09.21" }
    }
    scene { "scene01"
      frames { 900 }
      groundgrid { 1 }
      shadowbias { 0.00100 }
      background { 153 153 153 }
      camera { "camera01"
        loc { (150 100 200) }
        orientation { (-0.04877 0.93733 -0.14632 -0.31244) }
        fov { 60 }
        number { 1 }
      }
      figureelement { "efigure01" "figure01"
        loc { (-131.32 0 102.05) }
        namedsequence { "sequence03" 172 }
        namedsequence { "sequence02" 118 }
        namedsequence { "sequence01" 0 }
        namedsequence { "sequence03" 59 }
        namedsequence { "sequence02" 59 }
        namedsequence { "sequence01" 59 }
        castshadow { }
        receiveshadows { }
        controller { "position"
          track {
            pointkey { 0 (-131.32 0 102.05) (1.7223 0 -28.274) (-1.7223 0 28.274)
              "S" }
            pointkey { 76 (-126.16 0 17.223) (7.0551 0 -18.716) (-10.311 0 27.355)
              "S" }
            pointkey { 128 (-79.225 0 -36.168) (29.912 0 -10.016) (-33.094 0 11.082)
              "S" }
            pointkey { 175 (62.863 0 -46.071) (47.363 0 -3.301) (-47.363 0 3.301)
              "S" }
          }
        }
      }
    }
  • the figureelement {"efigure01" "figure01" } block is the important one. You're going to basically copy this portion (look at how I'm copying the block all the way to the } that's on the same horizontal position as where "figureelement" starts)
  • Code: [Select]
     figureelement { "efigure01" "figure01"
        loc { (-131.32 0 102.05) }
        namedsequence { "sequence03" 172 }
        namedsequence { "sequence02" 118 }
        namedsequence { "sequence01" 0 }
        namedsequence { "sequence03" 59 }
        namedsequence { "sequence02" 59 }
        namedsequence { "sequence01" 59 }
        castshadow { }
        receiveshadows { }
        controller { "position"
          track {
            pointkey { 0 (-131.32 0 102.05) (1.7223 0 -28.274) (-1.7223 0 28.274)
              "S" }
            pointkey { 76 (-126.16 0 17.223) (7.0551 0 -18.716) (-10.311 0 27.355)
              "S" }
            pointkey { 128 (-79.225 0 -36.168) (29.912 0 -10.016) (-33.094 0 11.082)
              "S" }
            pointkey { 175 (62.863 0 -46.071) (47.363 0 -3.301) (-47.363 0 3.301)
              "S" }
          }
        }
      }
  • And then paste it inside the block you copied, right before that last } I mentioned. It'll look like this:
  • Code: [Select]
    header {
      version { "0.97d beta" }
      build { "2008.09.21" }
    }
    scene { "scene01"
      frames { 900 }
      groundgrid { 1 }
      shadowbias { 0.00100 }
      background { 153 153 153 }
      camera { "camera01"
        loc { (150 100 200) }
        orientation { (-0.04877 0.93733 -0.14632 -0.31244) }
        fov { 60 }
        number { 1 }
      }
      figureelement { "efigure01" "figure01"
        loc { (-131.32 0 102.05) }
        namedsequence { "sequence03" 172 }
        namedsequence { "sequence02" 118 }
        namedsequence { "sequence01" 0 }
        namedsequence { "sequence03" 59 }
        namedsequence { "sequence02" 59 }
        namedsequence { "sequence01" 59 }
        castshadow { }
        receiveshadows { }
        controller { "position"
          track {
            pointkey { 0 (-131.32 0 102.05) (1.7223 0 -28.274) (-1.7223 0 28.274)
              "S" }
            pointkey { 76 (-126.16 0 17.223) (7.0551 0 -18.716) (-10.311 0 27.355)
              "S" }
            pointkey { 128 (-79.225 0 -36.168) (29.912 0 -10.016) (-33.094 0 11.082)
              "S" }
            pointkey { 175 (62.863 0 -46.071) (47.363 0 -3.301) (-47.363 0 3.301)
              "S" }
          }
        }
      figureelement { "efigure01" "figure01"
        loc { (-131.32 0 102.05) }
        namedsequence { "sequence03" 172 }
        namedsequence { "sequence02" 118 }
        namedsequence { "sequence01" 0 }
        namedsequence { "sequence03" 59 }
        namedsequence { "sequence02" 59 }
        namedsequence { "sequence01" 59 }
        castshadow { }
        receiveshadows { }
        controller { "position"
          track {
            pointkey { 0 (-131.32 0 102.05) (1.7223 0 -28.274) (-1.7223 0 28.274)
              "S" }
            pointkey { 76 (-126.16 0 17.223) (7.0551 0 -18.716) (-10.311 0 27.355)
              "S" }
            pointkey { 128 (-79.225 0 -36.168) (29.912 0 -10.016) (-33.094 0 11.082)
              "S" }
            pointkey { 175 (62.863 0 -46.071) (47.363 0 -3.301) (-47.363 0 3.301)
              "S" }
          }
        }
      }
      }
    }
  • Rename the figure you pasted from "efigure01" to something like "efigure02". What we basically did was by placing one figure inside the block of the other, we made the original figure the parent of the copied figure. This way the copied figure will move on the same path as the original
  • Next, change the "loc { (-131.32 0 102.05) }" line to "loc { (0 0 0) }", except change one or more of the coordinates to how much in that direction you want it to be offset. For example, "loc { (-50 0 0) }" will offset it -50 to the left of the original on the X-axis. Remember it goes X Y Z
  • Next, you need to delete the controller block inside your new figure. So inside "efigure02"'s figure element block, you're going to delete everything from "controller { "position"" to the } that's in the same horizontal position below it. Your figure will already be moving with its parent, so you don't need to have these controller/key positions.
  • Your code should look something like this:
  • Code: [Select]
    header {
      version { "0.97d beta" }
      build { "2008.09.21" }
    }
    scene { "scene01"
      frames { 900 }
      groundgrid { 1 }
      shadowbias { 0.00100 }
      background { 153 153 153 }
      camera { "camera01"
        loc { (150 100 200) }
        orientation { (-0.04877 0.93733 -0.14632 -0.31244) }
        fov { 60 }
        number { 1 }
      }
      figureelement { "efigure02" "figure01"
        loc { (-131.32 0 102.05) }
        namedsequence { "sequence03" 172 }
        namedsequence { "sequence02" 118 }
        namedsequence { "sequence01" 0 }
        namedsequence { "sequence03" 59 }
        namedsequence { "sequence02" 59 }
        namedsequence { "sequence01" 59 }
        castshadow { }
        receiveshadows { }
        controller { "position"
          track {
            pointkey { 0 (-131.32 0 102.05) (1.7223 0 -28.274) (-1.7223 0 28.274)
              "S" }
            pointkey { 76 (-126.16 0 17.223) (7.0551 0 -18.716) (-10.311 0 27.355)
              "S" }
            pointkey { 128 (-79.225 0 -36.168) (29.912 0 -10.016) (-33.094 0 11.082)
              "S" }
            pointkey { 175 (62.863 0 -46.071) (47.363 0 -3.301) (-47.363 0 3.301)
              "S" }
          }
        }
      figureelement { "efigure01" "figure01"
        loc { (-50 0 0) }
        namedsequence { "sequence03" 172 }
        namedsequence { "sequence02" 118 }
        namedsequence { "sequence01" 0 }
        namedsequence { "sequence03" 59 }
        namedsequence { "sequence02" 59 }
        namedsequence { "sequence01" 59 }
        castshadow { }
        receiveshadows { }
      }
      }
    }
  • Now copy and past several of your modified figureelement blocks one after the other and rename and offset them as you need. It should look like this:
  • Code: [Select]
    header {
      version { "0.97d beta" }
      build { "2008.09.21" }
    }
    scene { "scene01"
      frames { 900 }
      groundgrid { 1 }
      shadowbias { 0.00100 }
      background { 153 153 153 }
      camera { "camera01"
        loc { (150 100 200) }
        orientation { (-0.04877 0.93733 -0.14632 -0.31244) }
        fov { 60 }
        number { 1 }
      }
      figureelement { "efigure01" "figure01"
        loc { (-131.32 0 102.05) }
        namedsequence { "sequence03" 172 }
        namedsequence { "sequence02" 118 }
        namedsequence { "sequence01" 0 }
        namedsequence { "sequence03" 59 }
        namedsequence { "sequence02" 59 }
        namedsequence { "sequence01" 59 }
        castshadow { }
        receiveshadows { }
        controller { "position"
          track {
            pointkey { 0 (-131.32 0 102.05) (1.7223 0 -28.274) (-1.7223 0 28.274)
              "S" }
            pointkey { 76 (-126.16 0 17.223) (7.0551 0 -18.716) (-10.311 0 27.355)
              "S" }
            pointkey { 128 (-79.225 0 -36.168) (29.912 0 -10.016) (-33.094 0 11.082)
              "S" }
            pointkey { 175 (62.863 0 -46.071) (47.363 0 -3.301) (-47.363 0 3.301)
              "S" }
          }
        }
      figureelement { "efigure02" "figure01"
        loc { (-50 0 0) }
        namedsequence { "sequence03" 172 }
        namedsequence { "sequence02" 118 }
        namedsequence { "sequence01" 0 }
        namedsequence { "sequence03" 59 }
        namedsequence { "sequence02" 59 }
        namedsequence { "sequence01" 59 }
        castshadow { }
        receiveshadows { }
      }
      figureelement { "efigure04" "figure01"
        loc { (-50 0 50) }
        namedsequence { "sequence03" 172 }
        namedsequence { "sequence02" 118 }
        namedsequence { "sequence01" 0 }
        namedsequence { "sequence03" 59 }
        namedsequence { "sequence02" 59 }
        namedsequence { "sequence01" 59 }
        castshadow { }
        receiveshadows { }
      }
      figureelement { "efigure07" "figure01"
        loc { (0 0 50) }
        namedsequence { "sequence03" 172 }
        namedsequence { "sequence02" 118 }
        namedsequence { "sequence01" 0 }
        namedsequence { "sequence03" 59 }
        namedsequence { "sequence02" 59 }
        namedsequence { "sequence01" 59 }
        castshadow { }
        receiveshadows { }
      }
      }
    }
    • What I did there was I made a block of 4 figures moving around.
    • Now save the file and import the scene into your original anim8or project

    Worked perfectly for me, should work perfectly for you. Remember that before all this you want to finish everything with that one original figure. Shadows, movement, sequences, everything. Otherwise it'll be a pain coming back and editing it. If it doesn't work then you've got to look at your brackets and structure. If you have a { there must be a closing } in the right spot.

    There may be a tool or something that can help you do this without all the work, though I can't remember if there was one released by someone. There may be a crowd simulation script or tool somewhere.

    It's a shame that all this work could be avoided if there was just a copy and paste tool for elements in scene mode :P
    « Last Edit: January 23, 2010, 05:13:23 am by Raxx »
    Logged