Notifications
Clear all

[Closed] Import 2D Tacking Data

hi guys
is there a solution for import 2D Tracking Data to 3dsmax , i`m working with Pftrack and Syntheyes but i cant use their formats for importing 2d track in 3dsmax.

i think its need a maxscript converter for import data .

can anyone help me please ?

(sorry for my english)

5 Replies

Can you post a file with the data that’s exported from Syntheyes? I remember that you could export data for After Effects and Combustion which were 2d only and were simple text in a tab delimited format. Those files can be parsed in maxscript really easy.

hi antonv
every data and every tracks is in this .txt format .
just X,Y and Z is empty .

Here is a quick code that uses your file to create animated points:

trackerDataFile = "c:/tracksdata.txt" -- put the proper path to the file you are using 
  f = openFile trackerDataFile -- opens the file for reading
  seek f 0 -- positions the file at the first character
  
  while (not eof f) do -- loops through all the lines in the text file and stops when reaches the end of file
  (
  	theLine = readline f -- reads the current line
  	
  	-- if/then checks to see if the current line is a tracker or a position value and if it is a tracker then creates a point named
  	-- the same with the label given within the text file and makes it the current selection; it also gives them a green color 
  	-- if your trackers are named differently than "Tracker*" then you'll have to change the string 
  	if matchPattern theLine pattern:"Tracker*" ignoreCase:true then point name:theLine isSelected:on wirecolor:green
  	else
  	(
  		-- in case the current line is a value it will turn the animate button on and will add keys for each position specified in the file
  		with animate on
  		(
  			s = filterstring theLine " " -- split the string based on spaces to get 3 values: frame number, x position, y position
  			-- sets the position of the selected object at each frame based on the values obtained by splitting the s string
  			at time (s[1] as integer) selection[1].pos = [s[2] as float, s[3] as float, 0] 
  		)
  	)
  	
  )
  
  max select none -- deselects the last point created
  close f -- closes the text file

thanx a lot antonv
its work perfect :applause:

Glad I could help