XSI to chan

Started by JohnnyBoy, December 30, 2006, 05:25:30 PM

Previous topic - Next topic

JimB

Quote from: Hetzen on January 18, 2010, 08:01:33 AM
Quote from: godzooks on January 17, 2010, 10:41:24 PM
So is the rotation in terragen really ROT -Z +X -Y?

I had a similar issue exporting a .chan out of Maya, and the way we got around it was by linking a Z,X,Y rotation order camera to the camera already animated in Maya (IIRC was set at X,Y,Z), then baking the Z,X,Y camera and using that data. Not sure if this is precisely the problem, but looking at your videos, the track is actually shifting on the wrong axis, so something is working in the wrong order.

Jon

I just tried that and it still doesn't work. Exactly the same result as previous.
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

JimB

Here's the test: http://vimeo.com/8815155

The numbers in the Transform fields are the same between TG2 and XSI except for the necessary changes to plus or minus.
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

FrankB

can it be the FOV's dont match?

Hetzen

#48
It definately looks like a rotation order problem. I was getting very similar results matching up a village to a lake edge.

Sorry for jumping in on this thread without knowing what you've done in the script. Am I right in asuming that all the keyframes in the rotational columns mach up in value? If so, then something is not right in matching the transform order. I'm pretty sure you can't just swap rotation columns around in a text editor, as the rotation order in TG tells the camera to first roll in Z, then with the X axis rotated pitch up or down along that axis, which then sets the Y axis. If you rearange that order, to say X,Y,Z, and feed in the same rotations, you'll pitch up/down first, then swivel on the new Y axis, then finally roll on the new Z, and end up facing in a very different direction. Try rotating your index finger with thumb and middle at 90 degrees to each other, through those translations, with the same values in for x,y,z.

Sorry if I'm stating the bleeding obvious.

JimB

Quote from: FrankB on January 18, 2010, 09:49:51 AM
can it be the FOV's dont match?
They're the same Frank. The rotations and translations are also off, as if some kind offset is being added through the animation.
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

JimB

Quote from: Hetzen on January 18, 2010, 09:57:49 AM
It definately looks like a rotation order problem. I was getting very similar results matching up a village to a lake edge.

Sorry for jumping in on this thread without knowing what you've done in the script. Am I right in asuming that all the keyframes in the rotational columns mach up in value? If so, then something is not right in matching the transform order. I'm pretty sure you can't just swap rotation columns around in a text editor, as the rotation order in TG tells the camera to first roll in Z, then with the X axis rotated pitch up or down along that axis, which then sets the Y axis. If you rearange that order, to say X,Y,Z, and feed in the same rotations, you'll pitch up/down first, then swivel on the new Y axis, then finally roll on the new Z, and end up facing in a very different direction. Try it with your fingers at 90 degrees.

Sorry if I'm stating the bleeding obvious.

But that doesn't account for the camera to cube distance being different by the end of the animation I posted, surely?
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

Hetzen

Are the distances different? Looks like the camera is just facing the wrong way.

Hetzen

Try rotating your index finger with thumb and middle at 90 degrees to each other, through those translations Z,X,Y - X,Y,Z - Y,Z,X, all through 30 degrees. Your index will face a different direction each time, even though all the rotation values are the same.

JimB

#53
I just put another elongated cube in XSI Z+ and it imported into TG2 as expected (TG2 Z-). The camera to cube relationship is fine at the outset (the imported XSI camera is in TG2 Z- at the start, as it should be).

Matt, are there any hidden Angular Position offsets in the camera that perhaps weren't there in older versions of TG2?
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

Postglory

If rotations are local to the camera in Terragen, would a local rotation export out of xsi not solve this?

JimB

#55
Quote from: godzooks on January 18, 2010, 11:46:39 AM
If rotations are local to the camera in Terragen, would a local rotation export out of xsi not solve this?

The camera SRT's are global both before and after baking. There's deliberately no heirarchy involved. I did compare both Local and Global transforms and they're identical.

I did find a Python script that exports a .chan for Houdini. It only writes six columns (Pos and Rotation), so it needs to have the frame number and FOV columns added (first and last respectively). I'm clueless with Python (and most things including speaking English coherently), so if someone wants to look at it ...:
http://www.highend3d.com/xsi/downloads/tools/3d_converters/XSI-to-Nuke-Chan-exporter-4032.html

Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

JimB

#56
Right, can someone try this out. I took another look at the Global and Local comparisons using a different property editor, and there were differences.

I've changed the Jscript again and it seems to work at last.

var oTrans = cam.Kinematics.Global.Transform;
became:
var oTrans = cam.Kinematics.Local.Transform;


Again, I hope Johnny doesn't mind all this faffing about with his script.
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

Postglory

The python script fails at line 23
f = open(File, 'w')

Any ideas?

JimB

#58
Quote from: godzooks on January 18, 2010, 01:35:30 PM
The python script fails at line 23
f = open(File, 'w')

Any ideas?

Forget the Python script, the new version of the JScript seems to be working fine (xsi2chan8.txt). I'm just rendering a version now, and the first 50 frames as a comp on top of the XSI render looks spot on. I'll post it on Vimeo.

If you really want to mess about with the Python script, look to the line near the top that gives the output filename beginning with /Home...
Create a new .chan file in your directory of choice (rename a new text file) and replace the Python script's /Home with the new file's full filepath and filename (be sure to do forward / not backwards \ )  It basically needs a previously created .chan file to write over. But then you'll have to find a way to add the frame number column at the start of the .chan file. TG2 only accepts .chan files with 7,8 or 10 columns apparently.

Something's definitely changed over time. Perhaps baking the camera now needs a Local transform output, and non-baked needs Global? I need to look into it just in case. Weird.
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.

JimB

Here's the video showing the match between XSI and TG2 using xsi2chan8.js :

http://www.vimeo.com/8821430
Some bits and bobs
The Galileo Fallacy, 'Argumentum ad Galileus':
"They laughed at Galileo. They're laughing at me. Therefore I am the next Galileo."

Nope. Galileo was right for the simpler reason that he was right.