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: motion tracking request  (Read 26854 times)

cornestone digital

  • Newbie
  • *
  • Posts: 23
    • View Profile
motion tracking request
« on: January 11, 2008, 12:10:58 pm »

Is there a program that tracks motion from video and turns it into CG camera movement? I know there is voodoo for blender, but is there any thing for anim8or?
Logged

sciwizeh

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: motion tracking request
« Reply #1 on: January 12, 2008, 08:36:43 am »

if you want something like they do for real movies anim8or is not capable yet, and i cannot find anything like voodoo for anim8or
Logged
<a href="http://www.freewebs.com/sciwizehgames">My site</a>
<a href="http://matrixpeckham.googlepages.com">My other site</a>

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2124
    • View Profile
Re: motion tracking request
« Reply #2 on: January 14, 2008, 11:34:28 am »

There isn't anything for that that I know of.  However if voodoo or blender can output a motion file I might be able to read it into Anim8or.  Are there any specs on what voodoo does?
Logged

bluescreenboy

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: motion tracking request
« Reply #3 on: January 31, 2008, 11:35:10 am »

Here's some stuff.  I have no idea whatsoever if it will help, but I got it off a voodoo website, in a section labled: Camera Model:

Parameters of the CAHV camera model:
(Cx, Cy, Cz)    : CameraPosition [mm]
(Ax, Ay, Az)    : RotationAxis2  [unit vector]
(Hx, Hy, Hz)    : RotationAxis0 [pel] (including FocalLength, PixelSizeX, and Principal Point offset)
(Vx, Vy, Vz)    : RotationAxis1 [pel] (including FocalLength, PixelSizeY, and Principal Point offset)
(K3, K5)        : Radialdistortion  K3 [1/(mm)^2]  K5 [1/(mm)^4]
(sx, sy)        : PixelSize   [mm/pel]
(Width, Height) : ImageSize   [pel]

Internally used parameters:
(ppx, ppy)      : Principal Point offset [pel]
f               : Focal Length [mm]
fov             : Horizontal Field of View [degree] = (2*atan(0.5*Width*sx/f)*180/PI;
(H0x, H0y, H0z) : RotationAxis0 [unit vector]
(V0x, V0y, V0z) : RotationAxis1 [unit vector]

Image coordinates and 3D coordinates:
(x, y)          : image coordinates [pel]
(X, Y, Z)       : 3D coordinates [mm]

The projection of 3D coordinates in the camera image can be done by
 [ x' ] =  [ Hx Hy Hz ] [ 1 0 0 -Cx] [ X ]
 [ y' ] =  [ Vx Vy Vz ] [ 0 1 0 -Cy] [ Y ]
 [ z' ] =  [ Ax Ay Az ] [ 0 0 1 -Cz] [ Z ]
                                     [ 1 ]

or
 [ x' ] =  [f/sx 0    ppx] [ H0x H0y H0z ] [ 1 0 0 -Cx] [ X ]
 [ y' ] =  [0    f/sy ppy] [ V0x V0y V0z ] [ 0 1 0 -Cy] [ Y ]
 [ z' ] =  [0    0    1  ] [ Ax  Ay  Az  ] [ 0 0 1 -Cz] [ Z ]
                                                        [ 1 ]

then x = x'/z' and y = y'/z' , if the origin of the image coordinates is in the center of the image,
or x = x'/z' + 0.5*(Width-1) and y = y'/z' + 0.5*(Height-1) , if the origin of the image coordinates is in the upper left corner.
Logged

bluescreenboy

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: motion tracking request
« Reply #4 on: January 31, 2008, 11:36:05 am »

Now that I look at it closer, I doubt it will help.  Oh well.
Logged

CaptSparrow

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: motion tracking request
« Reply #5 on: February 22, 2008, 07:04:01 pm »

You can get motion-tracking data into Icarus, in a not-too hard fashion.

First, download Icarus v2.09 from here http://www.fan-files.com/dl_pages/wh/other.html

If you want, here are some good video tutorials on how to use it, the last two tutorials cover exporting data to Blender and After Effects.
http://www.peerlessproductions.com/tuts/pages/Icarus.html

Then, download the Ic2An8 program here, this converts camera track data into Anim8or camera data, which you can then paste into the scene in Notepad.
http://hanes.250free.com/Ic2An8.zip

A small tutorial on how to add the data into Anim8or is included.
Logged

xalener

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
Re: motion tracking request
« Reply #6 on: February 28, 2008, 06:04:55 pm »

..........:0
Thank you....
Really.....
Logged

AlDi

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: motion tracking request
« Reply #7 on: March 16, 2008, 09:52:51 pm »

I'm newbie so bear with me.......

I downloaded Icarus and rendered a Camera Tracking File.

Save to a *.Txt file

I then Converted the file with Ic2AN8.exe

Got this:

qkey { 0(-3.87569e-034 -2.22827e-017 -1.73933e-017 1) "?" }
qkey { 1(0.000433346 3.57527e-005 0.000920348 0.999999) "?" }
qkey { 2(0.00102766 -0.000281753 0.00122345 0.999999) "?" }
qkey { 3(0.00130961 -5.26674e-005 0.00121457 0.999998) "?" }
qkey { 4(0.00154947 -0.000459426 0.0015964 0.999997) "?" }
qkey { 5(0.00172568 -0.00028053 0.00195443 0.999997) "?" }

I then Copied and Pasted the above Conversion to a8s file.

When I started the Anim8or Program I get the error in the (MS DOS Black BOX):

Error on line 1:  undefined indentifier 'qkey'
Error on line 1 ';' expected


Anybody Can help? 

This would be AWESOME to get this to work.  Blending Reality with the Virtual World with Anim8or.
Logged

hihosilver

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1294
    • View Profile
Re: motion tracking request
« Reply #8 on: March 16, 2008, 11:41:05 pm »

I don't actually know anything about it, but it looks like you simply need to delete the "qkey" text.
Logged

Claude

  • Sr. Member
  • ****
  • Posts: 285
    • View Profile
Re: motion tracking request
« Reply #9 on: March 18, 2008, 12:36:33 am »

AlDi

If you read what CaptSparrow wrote,he doesn't use a script.
He edits the Anim8or file using Notepad.(the scene part)
He also mentions a tutorial showing how to do it.

Then, download the Ic2An8 program here, this converts camera track data into Anim8or camera data, which you can then paste into the scene in Notepad.
http://hanes.250free.com/Ic2An8.zip

A small tutorial on how to add the data into Anim8or is included.

Hope this helps.
Claude
Logged

AlDi

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: motion tracking request
« Reply #10 on: March 24, 2008, 02:01:54 pm »

Dear HiHosilver and Claude,

Thanks for the Input.

One of those DOH moments for me I guess :)

I have another question.  Does anyone know how to the decipher or formulate the VOODOO coordinates to make them useful for Anim8or?  I would prefer to use Voodoo. 

Icarus is straight forward as the Rot_Quaterion is the Field used in Anim8or below:.....

# Camera track exported by ICARUS v2.09

Frame 120
   projection_matrix:
      0.000196255 7.85964e-011 0.000110603 -5.39229e-011
      1.65442e-024 0.000196256 8.29519e-005 2.68306e-008
      3.30884e-024 -5.29414e-023 0.00019552 2.31318e-009
   translation:
      6.94229e-006 -0.000131712 -1.18309e-005
   rot_matrix:
      1 1.2769e-021 1.69233e-020
      -1.2769e-021 1 -2.70773e-019
      -1.69233e-020 2.70773e-019 1
   rot_quaternion:
      1.35387e-019 8.46166e-021 -6.38448e-022 1

   focal_length: 3.78544
   field_of_view: 58.8081 45.8249
   pixel_aspect_ratio: 1
   skew: 0.000113699
   principal_point: 160 120


The Voodoo for the same Frame is below......

# fov             : Horizontal Field of View [degree] = (2*atan(0.5*Width*sx/f)*180/PI;
# (H0x, H0y, H0z) : RotationAxis0 [unit vector]
# (V0x, V0y, V0z) : RotationAxis1 [unit vector]
# -------------
# (x, y)          : image coordinates [pel]
# (X, Y, Z)       : 3D coordinates [mm]
# -------------
# Projection of 3D coordinates in the camera image:
#  [ x' ] =  [ Hx Hy Hz ] [ 1 0 0 -Cx] [ X ]
#  [ y' ] =  [ Vx Vy Vz ] [ 0 1 0 -Cy] [ Y ]
#  [ z' ] =  [ Ax Ay Az ] [ 0 0 1 -Cz] [ Z ]
#                                      [ 1 ]
# or
#  [ x' ] =  [f/sx 0    ppx] [ H0x H0y H0z ] [ 1 0 0 -Cx] [ X ]
#  [ y' ] =  [0    f/sy ppy] [ V0x V0y V0z ] [ 0 1 0 -Cy] [ Y ]
#  [ z' ] =  [0    0    1  ] [ Ax  Ay  Az  ] [ 0 0 1 -Cz] [ Z ]
#                                                         [ 1 ]
# then x = x'/z' and y = y'/z' , if the origin of the image coordinates is in the center of the image
# or x = x'/z' + 0.5*(Width-1) and y = y'/z' + 0.5*(Height-1) , if the origin of the image coordinates is in the upper left corner
# -------------
# Cx Cy Cz Ax Ay Az Hx Hy Hz Vx Vy Vz K3 K5 sx sy Width Height ppx ppy f fov H0x H0y H0z V0x V0y V0z
#
#timeindex 0
               0.0000000000   0.0000000000   0.0000000000   0.0000000000   0.0000000000   1.0000000000   937.4999999971   0.0000000000   0.0000000000   0.0000000000   1000.0000000000   0.0000000000   0.0000000000   0.0000000000   0.0106666667   0.0100000000  320  240   0.0000000000   0.0000000000   10.0000000000   19.3703310328   1.0000000000   0.0000000000   0.0000000000   0.0000000000   1.0000000000   0.0000000000

Thanks,

AlDi
Logged

chaz

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: motion tracking request
« Reply #11 on: April 10, 2008, 04:26:33 pm »

AIdi
I'm like you.  I want to use voodoo, not Icarus (which is supposed to leave a watermark on final video).  There are a few tutorials on how to use voodoo with 3ds max, but none with blender or anim8or.  A blender user told me how to import the python script into blender, but it was way out of my skill set as a beginning blender user.

Unfortunately, I don't know any programmers that could study the Ic2anim8 program and write one for anim8or.  Maybe Steve could contact the folks at voodoo and see if they would include a script for us.  I think voodoo is a university project in the Netherlands(?) and maybe it could be a student project?
Since voodoo will save the tracking as a text file, maybe we could find out a format to import the script.

Blender takes the data from the completed voodoo camera tracking and makes what is called a "point cloud" (from all the 'feature points') and also imports the camera data (rotation, movement, etc.).  The targa frames are used as a background image.  You are supposed to be able to determine your plane, etc, from the point cloud.  At least, that is my understanding of it.

I found anim8or because of a tutorial at http://www.debugmode.com/tuts/wax/travelling_mattes/travelling_mattes.htm, on how to make traveling mattes with Wax 2.0.  I want to become proficient with anim8or before completing the tut at that site.
Logged

CaptSparrow

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: motion tracking request
« Reply #12 on: July 03, 2008, 03:39:42 pm »

Could someone please upload the zip file containing everything, because my version has been corrupted, and the site no longer has it.

Thanks!
Logged