Try   HackMD

FBX 格式閱讀

Animation

根據 Automation of the Avatar Animation Process in FBX File Format 的內容,FBX SDK 使用了以下幾種 Animation Data Structures:

  1. animation stack
    • is the highest level container for animation data.
  2. animation layer
  3. animation curve
  4. animation curve node
  5. animation curve key

Image Not Showing Possible Reasons
  • The image file may be corrupted
  • The server hosting the image is unavailable
  • The image path is incorrect
  • The image format is not supported
Learn More →

取自 FBX SDK
以下開始介紹 fbx 內實際儲存方式 (範例 code 取自於 Mocap Neuron 3 錄製的動畫,格式為 Maya)

FBXHeaderExtension

Header 定義了關於 fbx 的基本資訊,像是使用版本、創建時間、作者等等

FBXHeaderExtension:  {
	FBXHeaderVersion: 1003
	FBXVersion: 7500
	CreationTimeStamp:  {
		Version: 1000
		Year: 2022
		Month: 3
		Day: 22
		Hour: 16
		Minute: 53
		Second: 9
		Millisecond: 92
	}
    ...
    ...
}

Definitions

Definitions 會定義此 fbx 所包含的所有 Object
,包括數量、使用的模板(對應到 fbxsdk 是其中的資料結構)、屬性的種類及初始值

Definitions:  {
	Version: 100
	Count: 339 // 總共有多少個 Object 在此 fbx 內
	ObjectType: "GlobalSettings" {
		Count: 1
	}
	ObjectType: "NodeAttribute" {
		Count: 62 // ObjectType 為 "NodeAttribute" 的有 62 個
		PropertyTemplate: "FbxSkeleton" {
			Properties70:  {
				P: "Color", "ColorRGB", "Color", "",0.8,0.8,0.8
				P: "Size", "double", "Number", "",100
				P: "LimbLength", "double", "Number", "H",1
			}
		}
	}
    ...
    ...
}

Objects

Objects 存放了在 Definitions 中定義的 object,每個 object 皆會有其 Unique ID,能將 objects 做 connection。接著依序介紹 object 內的資訊:

NodeAttribute

NodeAttribute 主要用途為描述連結對象的性質

看到下方第一個 NodeAttribute,其擁有一個 unique ID 1387046196480 連結的對象為 Hips 而且此 node 為 root

NodeAttribute: 1387046196480, "NodeAttribute::Hips", "Root" {
		TypeFlags: "Null", "Skeleton", "Root"
	}
NodeAttribute: 1387046196672, "NodeAttribute::RightUpLeg", "LimbNode" {
		TypeFlags: "Skeleton"
	}

Model

Model 存放各個 model 之間的關係,能利用與父節點的 Lcl Translation 找到子節點的位置

Model: 1387212442512, "Model::Hips", "Root" {
		Version: 232
		Properties70:  {
			P: "RotationOrder", "enum", "", "",4
			P: "RotationActive", "bool", "", "",1
			P: "ScalingMax", "Vector3D", "Vector", "",0,0,0
			P: "DefaultAttributeIndex", "int", "Integer", "",0
			P: "Lcl Translation", "Lcl Translation", "", "A+",0,101.656066894531,0
		}
		Shading: Y
		Culling: "CullingOff"
	}
    ...
    ...

AnimationCurve

AnimationCurve 存放了 keyTime 及 keyValue,而 keyValue 的實際意義需要藉由後續的 connection 得知

AnimationCurve: 1385163939200, "AnimCurve::", "" {
		Default: 0
		KeyVer: 4009
		KeyTime: *505 { // 505 代表有 505 個 frames
			a: 769769300,1539538600,2309307900,3079077200,3848846500,4618615800,5388385100,6158154400,6927923700,7697693000,8467462300,9237231600,10007000900,10776770200,11546539500,12316308800,13086078100,13855847400,14625616700,15395386000,16165155300,16934924600,17704693900,18474463200,19244232500,20014001800,20783771100,21553540400,22323309700,23093079000,23862848300,24632617600,25402386900,26172156200,26941925500,27711694800,28481464100,29251233400,30021002700,30790772000,31560541300,32330310600,33100079900,33869849200,34639618500,35409387800,36179157100,36948926400,37718695700,38488465000,39258234300,40028003600,40797772900,41567542200,42337311500,43107080800,43876850100,44646619400,45416388700,46186158000,46955927300,47725696600,48495465900,49265235200,50035004500,50804773800,51574543100,52344312400,53114081700,53883851000,54653620300,55423389600,56193158900,56962928200,57732697500,58502466800,59272236100,60042005400,60811774700,61581544000,62351313300,63121082600,63890851900,64660621200,65430390500,66200159800,66969929100,67739698400,68509467700,69279237000,70049006300,70818775600,71588544900,72358314200,73128083500,73897852800,74667622100,75437391400,76207160700,76976930000,77746699300,78516468600,79286237900,80056007200,80825776500,81595545800,82365315100,83135084400,83904853700,84674623000,85444392300,86214161600,86983930900,87753700200,88523469500,89293238800,90063008100,90832777400,91602546700,92372316000,93142085300,93911854600,94681623900,95451393200,96221162500,96990931800,97760701100,98530470400,99300239700,100070009000,100839778300,101609547600,102379316900,103149086200,103918855500,104688624800,105458394100,106228163400,106997932700,107767702000,108537471300,109307240600,110077009900,110846779200,111616548500,112386317800,113156087100,113925856400,114695625700,115465395000,116235164300,117004933600,117774702900,118544472200,119314241500,120084010800,120853780100,121623549400,122393318700,123163088000,123932857300,124702626600,125472395900,126242165200,127011934500,127781703800,128551473100,129321242400,
130091011700,130860781000,131630550300,132400319600,133170088900,133939858200,134709627500,135479396800,136249166100,137018935400,137788704700,138558474000,139328243300,140098012600,140867781900,141637551200,142407320500,143177089800,143946859100,144716628400,145486397700,146256167000,147025936300,147795705600,148565474900,149335244200,150105013500,150874782800,151644552100,152414321400,153184090700,153953860000,154723629300,155493398600,156263167900,157032937200,157802706500,158572475800,159342245100,160112014400,160881783700,161651553000,162421322300,163191091600,163960860900,164730630200,165500399500,166270168800,167039938100,167809707400,168579476700,169349246000,170119015300,170888784600,171658553900,172428323200,173198092500,173967861800,174737631100,175507400400,176277169700,177046939000,177816708300,178586477600,179356246900,180126016200,180895785500,181665554800,182435324100,183205093400,183974862700,184744632000,185514401300,186284170600,187053939900,187823709200,188593478500,189363247800,190133017100,190902786400,191672555700,192442325000,193212094300,193981863600,194751632900,195521402200,196291171500,197060940800,197830710100,198600479400,199370248700,200140018000,200909787300,201679556600,202449325900,203219095200,203988864500,204758633800,205528403100,206298172400,207067941700,207837711000,208607480300,209377249600,210147018900,210916788200,211686557500,212456326800,213226096100,213995865400,214765634700,215535404000,216305173300,217074942600,217844711900,218614481200,219384250500,220154019800,220923789100,221693558400,222463327700,223233097000,224002866300,224772635600,225542404900,226312174200,227081943500,227851712800,228621482100,229391251400,230161020700,230930790000,231700559300,232470328600,233240097900,234009867200,234779636500,235549405800,236319175100,237088944400,237858713700,238628483000,239398252300,240168021600,240937790900,241707560200,242477329500,243247098800,244016868100,244786637400,245556406700,246326176000,247095945300,247865714600,248635483900,249405253200,250175022500,250944791800,
251714561100,252484330400,253254099700,254023869000,254793638300,255563407600,256333176900,257102946200,257872715500,258642484800,259412254100,260182023400,260951792700,261721562000,262491331300,263261100600,264030869900,264800639200,265570408500,266340177800,267109947100,267879716400,268649485700,269419255000,270189024300,270958793600,271728562900,272498332200,273268101500,274037870800,274807640100,275577409400,276347178700,277116948000,277886717300,278656486600,279426255900,280196025200,280965794500,281735563800,282505333100,283275102400,284044871700,284814641000,285584410300,286354179600,287123948900,287893718200,288663487500,289433256800,290203026100,290972795400,291742564700,292512334000,293282103300,294051872600,294821641900,295591411200,296361180500,297130949800,297900719100,298670488400,299440257700,300210027000,300979796300,301749565600,302519334900,303289104200,304058873500,304828642800,305598412100,306368181400,307137950700,307907720000,308677489300,309447258600,310217027900,310986797200,311756566500,312526335800,313296105100,314065874400,314835643700,315605413000,316375182300,317144951600,317914720900,318684490200,319454259500,320224028800,320993798100,321763567400,322533336700,323303106000,324072875300,324842644600,325612413900,326382183200,327151952500,327921721800,328691491100,329461260400,330231029700,331000799000,331770568300,332540337600,333310106900,334079876200,334849645500,335619414800,336389184100,337158953400,337928722700,338698492000,339468261300,340238030600,341007799900,341777569200,342547338500,343317107800,344086877100,344856646400,345626415700,346396185000,347165954300,347935723600,348705492900,349475262200,350245031500,351014800800,351784570100,352554339400,353324108700,354093878000,354863647300,355633416600,356403185900,357172955200,357942724500,358712493800,359482263100,360252032400,361021801700,361791571000,362561340300,363331109600,364100878900,364870648200,365640417500,366410186800,367179956100,367949725400,368719494700,369489264000,370259033300,371028802600,371798571900,372568341200,
373338110500,374107879800,374877649100,375647418400,376417187700,377186957000,377956726300,378726495600,379496264900,380266034200,381035803500,381805572800,382575342100,383345111400,384114880700,384884650000,385654419300,386424188600,387193957900,387963727200,388733496500
		} 
		KeyValueFloat: *505 {
			a: 0,-61.72099,-61.73206,-61.74323,-61.75414,-61.76479,-61.77602,-61.78831,-61.80188,-61.81698,-61.83318,-61.84958,-61.86572,-61.88259,-61.90015,-61.91802,-61.9367,-61.95595,-61.97378,-61.99056,-62.00713,-62.02384,-62.04148,-62.0607,-62.08147,-62.10392,-62.12756,-62.15131,-62.17505,-62.19788,-62.21911,-62.23891,-62.25795,-62.27656,-62.29542,-62.31445,-62.33355,-62.35202,-62.36962,-62.38659,-62.40381,-62.41976,-62.43461,-62.44811,-62.45869,-62.46563,-62.47094,-62.47517,-62.47882,-62.48266,-62.48714,-62.49181,-62.49603,-62.49968,-62.50307,-62.5059,-62.50821,-62.51069,-62.51336,-62.51667,-62.52018,-62.52345,-62.52602,-62.52864,-62.53075,-62.53271,-62.53619,-62.53999,-62.54269,-62.54381,-62.54233,-62.53643,-62.52823,-62.51936,-62.51053,-62.50304,-62.49789,-62.4946,-62.49203,-62.49021,-62.48885,-62.48754,-62.48627,-62.48555,-62.48539,-62.48611,-62.48783,-62.49084,-62.49532,-62.50121,-62.50896,-62.5182,-62.52847,-62.53944,-62.54913,-62.55623,-62.56168,-62.5647,-62.56426,-62.56291,-62.56195,-62.56088,-62.56023,-62.56122,-62.56335,-62.5657,-62.56808,-62.57137,-62.57648,-62.58335,-62.59194,-62.60246,-62.61478,-62.62759,-62.64014,-62.65144,-62.66085,-62.66739,-62.67123,-62.67306,-62.67456,-62.6758,-62.67676,-62.67689,-62.67468,-62.66928,-62.66175,-62.65327,-62.64333,-62.633,-62.62255,-62.61163,-62.59953,-62.58701,-62.57385,-62.55947,-62.54333,-62.52583,-62.50799,-62.49095,-62.47511,-62.45992,-62.44418,-62.4261,-62.40347,-62.37667,-62.3469,-62.31629,-62.28546,-62.25597,-62.22844,-62.2021,-62.1754,-62.14778,-62.11972,-62.09142,-62.06411,-62.0392,-62.01903,-62.0046,-61.99506,-61.98808,-61.98206,-61.97522,-61.96674,-61.9575,-61.9492,-61.94209,-61.93553,-61.92943,-61.92331,-61.91769,-61.91372,-61.91226,-61.9131,-61.91472,-61.91565,-61.91504,-61.91298,-61.90854,-61.90221,-61.89491,-61.88776,-61.88205,-61.8785,-61.8777,-61.87889,-61.88045,-61.88147,-61.8831,-61.88536,-61.88882,-61.8946,-61.90237,-61.91121,-61.92072,-61.93096,-61.94138,-61.9517,-61.96194,-61.97209,-61.98149,-61.99058,-62.00134,-62.01317,-62.02609,-62.04199,
-62.06042,-62.07937,-62.09912,-62.12078,-62.14344,-62.16841,-62.197,-62.2295,-62.26561,-62.30547,-62.34822,-62.39291,-62.43963,-62.48711,-62.5339,-62.57892,-62.6216,-62.66142,-62.6993,-62.73516,-62.76887,-62.80096,-62.83065,-62.85674,-62.87962,-62.89919,-62.91505,-62.92793,-62.93826,-62.94609,-62.95362,-62.96159,-62.9693,-62.97704,-62.98598,-62.99548,-63.00461,-63.01346,-63.02174,-63.02845,-63.03177,-63.03327,-63.03366,-63.0339,-63.03548,-63.0391,-63.04461,-63.05238,-63.0612,-63.06893,-63.07635,-63.08167,-63.08349,-63.08235,-63.07827,-63.06993,-63.05812,-63.04513,-63.03253,-63.0218,-63.01508,-63.01263,-63.0128,-63.01418,-63.01495,-63.01268,-63.00631,-62.99661,-62.98341,-62.96769,-62.95053,-62.93313,-62.91609,-62.89998,-62.8853,-62.87227,-62.86095,-62.85099,-62.84243,-62.83408,-62.82562,-62.81623,-62.80584,-62.79449,-62.78377,-62.77281,-62.76211,-62.75121,-62.73896,-62.72407,-62.70833,-62.69358,-62.67997,-62.66784,-62.65717,-62.64671,-62.63531,-62.62268,-62.60924,-62.59649,-62.58611,-62.57788,-62.5721,-62.56825,-62.56486,-62.56086,-62.55566,-62.54879,-62.54192,-62.53616,-62.53269,-62.53179,-62.53416,-62.53927,-62.54681,-62.55558,-62.56522,-62.57517,-62.58464,-62.59295,-62.59989,-62.60493,-62.60809,-62.60988,-62.61212,-62.616,-62.62287,-62.63428,-62.64972,-62.66696,-62.68497,-62.70305,-62.72021,-62.73644,-62.75164,-62.76546,-62.77781,-62.789,-62.79895,-62.80844,-62.81782,-62.82722,-62.83535,-62.84188,-62.84695,-62.85018,-62.85151,-62.851,-62.84872,-62.84417,-62.83833,-62.83096,-62.82319,-62.81573,-62.80935,-62.80372,-62.8003,-62.79913,-62.79913,-62.79873,-62.79712,-62.79248,-62.78328,-62.76945,-62.75269,-62.73476,-62.71684,-62.70057,-62.6877,-62.67769,-62.66845,-62.65944,-62.65098,-62.64322,-62.63671,-62.63303,-62.63203,-62.63308,-62.6345,-62.63564,-62.63607,-62.63592,-62.63511,-62.63434,-62.63514,-62.63768,-62.64219,-62.64795,-62.65465,-62.66056,-62.66591,-62.6711,-62.67581,-62.67975,-62.68369,-62.68641,-62.68605,-62.68363,-62.67924,-62.67303,-62.66543,-62.65724,-62.64798,-62.63787,-62.62555,-62.61079,-62.59424,-62.57616,
-62.55608,-62.53487,-62.51321,-62.49138,-62.46954,-62.4488,-62.42966,-62.41222,-62.39623,-62.38151,-62.36795,-62.35512,-62.34341,-62.3327,-62.32339,-62.31498,-62.30696,-62.29835,-62.28936,-62.27943,-62.26841,-62.25693,-62.24615,-62.23623,-62.22768,-62.22108,-62.21691,-62.21511,-62.21487,-62.21577,-62.21783,-62.22063,-62.22353,-62.2272,-62.23277,-62.24006,-62.24876,-62.25857,-62.26916,-62.2796,-62.29011,-62.30079,-62.31124,-62.32242,-62.33514,-62.35002,-62.36642,-62.38619,-62.40826,-62.43146,-62.45443,-62.4782,-62.50166,-62.52572,-62.55009,-62.57509,-62.60122,-62.62843,-62.65539,-62.68254,-62.70975,-62.73581,-62.76,-62.78273,-62.80386,-62.82382,-62.84316,-62.8621,-62.87979,-62.89819,-62.91875,-62.94104,-62.9661,-62.99358,-63.0204,-63.04509,-63.06782,-63.08821,-63.10832,-63.12891,-63.15019,-63.17255,-63.19552,-63.21689,-63.23751,-63.25812,-63.27945,-63.30124,-63.3247,-63.34921
		} 
		;KeyAttrFlags: Cubic|TangeantAuto|GenericTimeIndependent
		KeyAttrFlags: *1 {
			a: 8456
		} 
		;KeyAttrDataFloat: RightAuto:0, NextLeftAuto:0
		KeyAttrDataFloat: *4 {
			a: 0,0,218434821,0
		} 
		KeyAttrRefCount: *1 {
			a: 505
		} 
	}

AnimationCurveNode

AnimationCurveNode 會對應到若干個 AnimationCurve,以下方資料為例,則此 AnimationCurveNode 會對應到三個 AnimationCurve,分別為 d|X, d|Yd|Z,由於找不到 d|something 的實際定義,我猜測 d 代表 destination,也就是目標為 X, Y 或 Z

AnimationCurveNode: 1387214200912, "AnimCurveNode::T", "" {
		Properties70:  {
			P: "d|X", "Number", "", "A",0
			P: "d|Y", "Number", "", "A",101.656066894531
			P: "d|Z", "Number", "", "A",0
		}
	}

Connection

Connection 用來定義 objects 之間連接的關係
格式為: C: "連接關係",子節點ID, 父節點ID

連接關係分為四種:

OO: Object (source) to Object (destination).
OP: Object (source) to Property (destination).
PO: Property (source) to Object (destination).
PP: Property (source) to Property (destination).

Connections:  {
	
	;Model::Hips, Model::RootNode
	C: "OO",1387212442512,0
	
	;AnimLayer::mocap, AnimStack::chr00
	C: "OO",1387220967840,1387214201120
	
	;AnimCurveNode::T, AnimLayer::mocap
	C: "OO",1387214200912,1387220967840
	
	;AnimCurveNode::R, AnimLayer::mocap
	C: "OO",1387214201744,1387220967840
	
	;AnimCurveNode::R, AnimLayer::mocap
	C: "OO",1387214200704,1387220967840
        ...
        ...
}

推演 Objects 關係

KFbxAnimCurve 中會和對應的 KfbxProperty binding 並存放其數值,舉下面資料做範例:

AnimationStack: 1387214201120, "AnimStack::chr00", "" {
	}
	AnimationCurve: 1385163939200, "AnimCurve::", "" {
		Default: 0
		KeyVer: 4009
		KeyTime: *505 {
			a: 769769300,1539538600,2309307900,3079077200,3848846500,4618615800,5388385100,6158154400,6927923700,7697693000,8467462300,9237231600,10007000900,10776770200,11546539500,12316308800,13086078100,13855847400,14625616700,15395386000,16165155300,16934924600,17704693900,18474463200,19244232500,20014001800,20783771100,21553540400,22323309700,23093079000,23862848300,24632617600,25402386900,26172156200,26941925500,27711694800,28481464100,29251233400,30021002700,30790772000,31560541300,32330310600,33100079900,33869849200,34639618500,35409387800,36179157100,36948926400,37718695700,38488465000,39258234300,40028003600,40797772900,41567542200,42337311500,43107080800,43876850100,44646619400,45416388700,46186158000,46955927300,47725696600,48495465900,49265235200,50035004500,50804773800,51574543100,52344312400,53114081700,53883851000,54653620300,55423389600,56193158900,56962928200,57732697500,58502466800,59272236100,60042005400,60811774700,61581544000,62351313300,63121082600,63890851900,64660621200,65430390500,66200159800,66969929100,67739698400,68509467700,69279237000,70049006300,70818775600,71588544900,72358314200,73128083500,73897852800,74667622100,75437391400,76207160700,76976930000,77746699300,78516468600,79286237900,80056007200,80825776500,81595545800,82365315100,83135084400,83904853700,84674623000,85444392300,86214161600,86983930900,87753700200,88523469500,89293238800,90063008100,90832777400,91602546700,92372316000,93142085300,93911854600,94681623900,95451393200,96221162500,96990931800,97760701100,98530470400,99300239700,100070009000,100839778300,101609547600,102379316900,103149086200,103918855500,104688624800,105458394100,106228163400,106997932700,107767702000,108537471300,109307240600,110077009900,110846779200,111616548500,112386317800,113156087100,113925856400,114695625700,115465395000,116235164300,117004933600,117774702900,118544472200,119314241500,120084010800,120853780100,121623549400,122393318700,123163088000,123932857300,124702626600,125472395900,126242165200,127011934500,127781703800,128551473100,129321242400,
130091011700,130860781000,131630550300,132400319600,133170088900,133939858200,134709627500,135479396800,136249166100,137018935400,137788704700,138558474000,139328243300,140098012600,140867781900,141637551200,142407320500,143177089800,143946859100,144716628400,145486397700,146256167000,147025936300,147795705600,148565474900,149335244200,150105013500,150874782800,151644552100,152414321400,153184090700,153953860000,154723629300,155493398600,156263167900,157032937200,157802706500,158572475800,159342245100,160112014400,160881783700,161651553000,162421322300,163191091600,163960860900,164730630200,165500399500,166270168800,167039938100,167809707400,168579476700,169349246000,170119015300,170888784600,171658553900,172428323200,173198092500,173967861800,174737631100,175507400400,176277169700,177046939000,177816708300,178586477600,179356246900,180126016200,180895785500,181665554800,182435324100,183205093400,183974862700,184744632000,185514401300,186284170600,187053939900,187823709200,188593478500,189363247800,190133017100,190902786400,191672555700,192442325000,193212094300,193981863600,194751632900,195521402200,196291171500,197060940800,197830710100,198600479400,199370248700,200140018000,200909787300,201679556600,202449325900,203219095200,203988864500,204758633800,205528403100,206298172400,207067941700,207837711000,208607480300,209377249600,210147018900,210916788200,211686557500,212456326800,213226096100,213995865400,214765634700,215535404000,216305173300,217074942600,217844711900,218614481200,219384250500,220154019800,220923789100,221693558400,222463327700,223233097000,224002866300,224772635600,225542404900,226312174200,227081943500,227851712800,228621482100,229391251400,230161020700,230930790000,231700559300,232470328600,233240097900,234009867200,234779636500,235549405800,236319175100,237088944400,237858713700,238628483000,239398252300,240168021600,240937790900,241707560200,242477329500,243247098800,244016868100,244786637400,245556406700,246326176000,247095945300,247865714600,248635483900,249405253200,250175022500,250944791800,
251714561100,252484330400,253254099700,254023869000,254793638300,255563407600,256333176900,257102946200,257872715500,258642484800,259412254100,260182023400,260951792700,261721562000,262491331300,263261100600,264030869900,264800639200,265570408500,266340177800,267109947100,267879716400,268649485700,269419255000,270189024300,270958793600,271728562900,272498332200,273268101500,274037870800,274807640100,275577409400,276347178700,277116948000,277886717300,278656486600,279426255900,280196025200,280965794500,281735563800,282505333100,283275102400,284044871700,284814641000,285584410300,286354179600,287123948900,287893718200,288663487500,289433256800,290203026100,290972795400,291742564700,292512334000,293282103300,294051872600,294821641900,295591411200,296361180500,297130949800,297900719100,298670488400,299440257700,300210027000,300979796300,301749565600,302519334900,303289104200,304058873500,304828642800,305598412100,306368181400,307137950700,307907720000,308677489300,309447258600,310217027900,310986797200,311756566500,312526335800,313296105100,314065874400,314835643700,315605413000,316375182300,317144951600,317914720900,318684490200,319454259500,320224028800,320993798100,321763567400,322533336700,323303106000,324072875300,324842644600,325612413900,326382183200,327151952500,327921721800,328691491100,329461260400,330231029700,331000799000,331770568300,332540337600,333310106900,334079876200,334849645500,335619414800,336389184100,337158953400,337928722700,338698492000,339468261300,340238030600,341007799900,341777569200,342547338500,343317107800,344086877100,344856646400,345626415700,346396185000,347165954300,347935723600,348705492900,349475262200,350245031500,351014800800,351784570100,352554339400,353324108700,354093878000,354863647300,355633416600,356403185900,357172955200,357942724500,358712493800,359482263100,360252032400,361021801700,361791571000,362561340300,363331109600,364100878900,364870648200,365640417500,366410186800,367179956100,367949725400,368719494700,369489264000,370259033300,371028802600,371798571900,372568341200,
373338110500,374107879800,374877649100,375647418400,376417187700,377186957000,377956726300,378726495600,379496264900,380266034200,381035803500,381805572800,382575342100,383345111400,384114880700,384884650000,385654419300,386424188600,387193957900,387963727200,388733496500
		} 
		KeyValueFloat: *505 {
			a: 0,-61.72099,-61.73206,-61.74323,-61.75414,-61.76479,-61.77602,-61.78831,-61.80188,-61.81698,-61.83318,-61.84958,-61.86572,-61.88259,-61.90015,-61.91802,-61.9367,-61.95595,-61.97378,-61.99056,-62.00713,-62.02384,-62.04148,-62.0607,-62.08147,-62.10392,-62.12756,-62.15131,-62.17505,-62.19788,-62.21911,-62.23891,-62.25795,-62.27656,-62.29542,-62.31445,-62.33355,-62.35202,-62.36962,-62.38659,-62.40381,-62.41976,-62.43461,-62.44811,-62.45869,-62.46563,-62.47094,-62.47517,-62.47882,-62.48266,-62.48714,-62.49181,-62.49603,-62.49968,-62.50307,-62.5059,-62.50821,-62.51069,-62.51336,-62.51667,-62.52018,-62.52345,-62.52602,-62.52864,-62.53075,-62.53271,-62.53619,-62.53999,-62.54269,-62.54381,-62.54233,-62.53643,-62.52823,-62.51936,-62.51053,-62.50304,-62.49789,-62.4946,-62.49203,-62.49021,-62.48885,-62.48754,-62.48627,-62.48555,-62.48539,-62.48611,-62.48783,-62.49084,-62.49532,-62.50121,-62.50896,-62.5182,-62.52847,-62.53944,-62.54913,-62.55623,-62.56168,-62.5647,-62.56426,-62.56291,-62.56195,-62.56088,-62.56023,-62.56122,-62.56335,-62.5657,-62.56808,-62.57137,-62.57648,-62.58335,-62.59194,-62.60246,-62.61478,-62.62759,-62.64014,-62.65144,-62.66085,-62.66739,-62.67123,-62.67306,-62.67456,-62.6758,-62.67676,-62.67689,-62.67468,-62.66928,-62.66175,-62.65327,-62.64333,-62.633,-62.62255,-62.61163,-62.59953,-62.58701,-62.57385,-62.55947,-62.54333,-62.52583,-62.50799,-62.49095,-62.47511,-62.45992,-62.44418,-62.4261,-62.40347,-62.37667,-62.3469,-62.31629,-62.28546,-62.25597,-62.22844,-62.2021,-62.1754,-62.14778,-62.11972,-62.09142,-62.06411,-62.0392,-62.01903,-62.0046,-61.99506,-61.98808,-61.98206,-61.97522,-61.96674,-61.9575,-61.9492,-61.94209,-61.93553,-61.92943,-61.92331,-61.91769,-61.91372,-61.91226,-61.9131,-61.91472,-61.91565,-61.91504,-61.91298,-61.90854,-61.90221,-61.89491,-61.88776,-61.88205,-61.8785,-61.8777,-61.87889,-61.88045,-61.88147,-61.8831,-61.88536,-61.88882,-61.8946,-61.90237,-61.91121,-61.92072,-61.93096,-61.94138,-61.9517,-61.96194,-61.97209,-61.98149,-61.99058,-62.00134,-62.01317,-62.02609,-62.04199,
-62.06042,-62.07937,-62.09912,-62.12078,-62.14344,-62.16841,-62.197,-62.2295,-62.26561,-62.30547,-62.34822,-62.39291,-62.43963,-62.48711,-62.5339,-62.57892,-62.6216,-62.66142,-62.6993,-62.73516,-62.76887,-62.80096,-62.83065,-62.85674,-62.87962,-62.89919,-62.91505,-62.92793,-62.93826,-62.94609,-62.95362,-62.96159,-62.9693,-62.97704,-62.98598,-62.99548,-63.00461,-63.01346,-63.02174,-63.02845,-63.03177,-63.03327,-63.03366,-63.0339,-63.03548,-63.0391,-63.04461,-63.05238,-63.0612,-63.06893,-63.07635,-63.08167,-63.08349,-63.08235,-63.07827,-63.06993,-63.05812,-63.04513,-63.03253,-63.0218,-63.01508,-63.01263,-63.0128,-63.01418,-63.01495,-63.01268,-63.00631,-62.99661,-62.98341,-62.96769,-62.95053,-62.93313,-62.91609,-62.89998,-62.8853,-62.87227,-62.86095,-62.85099,-62.84243,-62.83408,-62.82562,-62.81623,-62.80584,-62.79449,-62.78377,-62.77281,-62.76211,-62.75121,-62.73896,-62.72407,-62.70833,-62.69358,-62.67997,-62.66784,-62.65717,-62.64671,-62.63531,-62.62268,-62.60924,-62.59649,-62.58611,-62.57788,-62.5721,-62.56825,-62.56486,-62.56086,-62.55566,-62.54879,-62.54192,-62.53616,-62.53269,-62.53179,-62.53416,-62.53927,-62.54681,-62.55558,-62.56522,-62.57517,-62.58464,-62.59295,-62.59989,-62.60493,-62.60809,-62.60988,-62.61212,-62.616,-62.62287,-62.63428,-62.64972,-62.66696,-62.68497,-62.70305,-62.72021,-62.73644,-62.75164,-62.76546,-62.77781,-62.789,-62.79895,-62.80844,-62.81782,-62.82722,-62.83535,-62.84188,-62.84695,-62.85018,-62.85151,-62.851,-62.84872,-62.84417,-62.83833,-62.83096,-62.82319,-62.81573,-62.80935,-62.80372,-62.8003,-62.79913,-62.79913,-62.79873,-62.79712,-62.79248,-62.78328,-62.76945,-62.75269,-62.73476,-62.71684,-62.70057,-62.6877,-62.67769,-62.66845,-62.65944,-62.65098,-62.64322,-62.63671,-62.63303,-62.63203,-62.63308,-62.6345,-62.63564,-62.63607,-62.63592,-62.63511,-62.63434,-62.63514,-62.63768,-62.64219,-62.64795,-62.65465,-62.66056,-62.66591,-62.6711,-62.67581,-62.67975,-62.68369,-62.68641,-62.68605,-62.68363,-62.67924,-62.67303,-62.66543,-62.65724,-62.64798,-62.63787,-62.62555,-62.61079,-62.59424,-62.57616,
-62.55608,-62.53487,-62.51321,-62.49138,-62.46954,-62.4488,-62.42966,-62.41222,-62.39623,-62.38151,-62.36795,-62.35512,-62.34341,-62.3327,-62.32339,-62.31498,-62.30696,-62.29835,-62.28936,-62.27943,-62.26841,-62.25693,-62.24615,-62.23623,-62.22768,-62.22108,-62.21691,-62.21511,-62.21487,-62.21577,-62.21783,-62.22063,-62.22353,-62.2272,-62.23277,-62.24006,-62.24876,-62.25857,-62.26916,-62.2796,-62.29011,-62.30079,-62.31124,-62.32242,-62.33514,-62.35002,-62.36642,-62.38619,-62.40826,-62.43146,-62.45443,-62.4782,-62.50166,-62.52572,-62.55009,-62.57509,-62.60122,-62.62843,-62.65539,-62.68254,-62.70975,-62.73581,-62.76,-62.78273,-62.80386,-62.82382,-62.84316,-62.8621,-62.87979,-62.89819,-62.91875,-62.94104,-62.9661,-62.99358,-63.0204,-63.04509,-63.06782,-63.08821,-63.10832,-63.12891,-63.15019,-63.17255,-63.19552,-63.21689,-63.23751,-63.25812,-63.27945,-63.30124,-63.3247,-63.34921
		} 
		;KeyAttrFlags: Cubic|TangeantAuto|GenericTimeIndependent
		KeyAttrFlags: *1 {
			a: 8456
		} 
		;KeyAttrDataFloat: RightAuto:0, NextLeftAuto:0
		KeyAttrDataFloat: *4 {
			a: 0,0,218434821,0
		} 
		KeyAttrRefCount: *1 {
			a: 505
		} 
	}

可以看到 AnimationCurve 有一個 unique id : 1385163939200,是用來 connect 對應的 Property。若是 trace 1385163939200 所綁定的 Property

;AnimCurve::, AnimCurveNode::T
C: "OP",1385163939200,1387214200912, "d|X"

得知 1385163939200 其實是綁到 1387214200912 其性質為 x 軸座標

;AnimCurveNode::T, AnimLayer::mocap
C: "OO",1387214200912,1387220967840

1387214200912 則定義了此 AnimationCurveNode 的 Properties

AnimationCurveNode: 1387214200912, "AnimCurveNode::T", "" {
		Properties70:  {
			P: "d|X", "Number", "", "A",0
			P: "d|Y", "Number", "", "A",101.656066894531
			P: "d|Z", "Number", "", "A",0
		}
}

接著看到 AnimationCurve 下的 KeyTimeKeyValueFloat

  • KeyTime 就是在動畫的相對進程期間,KeyTime 執行個體會指定特定主要畫面格應該發生的確切時間
  • KeyValueFloat 則是存放對應 Property 的資料
KeyTime: *505 {
			a: 769769300,1539538600,2309307900,3079077200,...
    }

注意到 KeyTime 內有很多奇怪的數字,若是用 a 儲存的一個數字(769769300)除整個數列,便會得到 1, 2, 3, 4 也就是代表第幾個 frame

結論

  • 想對資料進行處理,則必須從 AnimationCurve 下手
  • 像是對動作進行比對,最直觀的想法就是找出部位對應 Object 的 Properties,

  • "Lcl Translation" means "local translation
  • Be aware of AnimationCurveNodes, which can change the translation / rotation for animations.
  • 73135712 xxxxxxxxx is a unique id like pointer in c/c++
    There are four types of connections:

OO: Object (source) to Object (destination).
OP: Object (source) to Property (destination).
PO: Property (source) to Object (destination).
PP: Property (source) to Property (destination).
Translate “source to destination” as “member of container”.

AnimationCurve: 1385163938240, "AnimCurve::", "" {
		Default: -0
		KeyVer: 4009
		KeyTime: *505 {

AnimationCurve: 1385163937440, "AnimCurve::", "" {
		Default: 0
		KeyVer: 4009
		KeyTime: *505 {

AnimationCurve: 1385163937120, "AnimCurve::", "" {
		Default: 0
		KeyVer: 4009
		KeyTime: *505 {

AnimationCurveNode: 1387214201744, "AnimCurveNode::R", "" {
		Properties70:  {
			P: "d|X", "Number", "", "A",0
			P: "d|Y", "Number", "", "A",0
			P: "d|Z", "Number", "", "A",0
		}
	}


;AnimCurve::, AnimCurveNode::R
	C: "OP",1385163938240,1387214201744, "d|X"
	
	;AnimCurve::, AnimCurveNode::R
	C: "OP",1385163937440,1387214201744, "d|Y"
	
	;AnimCurve::, AnimCurveNode::R
	C: "OP",1385163937120,1387214201744, "d|Z"
  • keyTime
    • 就是在動畫的相對進程期間,KeyTime 執行個體會指定特定主要畫面格應該發生的確切時間

1387218683824 Model::RightHandRing1