Can Truespace 6.0 + import Realviz?

About Truespace Archives

These pages are a copy of the official truespace forums prior to their removal somewhere around 2011.

They are retained here for archive purposes only.

Can Truespace 6.0 + import Realviz? // Roundtable

1  2  |  

Post by davidjohnson // Mar 7, 2006, 2:24pm

davidjohnson
Total Posts: 169
I am looking into software for matchmoving and motion tracking - can truespace import the information from RealViz Matchmoving software or any of the motion tracking software? Thanks

Post by davidjohnson // Mar 7, 2006, 2:58pm

davidjohnson
Total Posts: 169
I was just looking at Voodoo, the free tracker, it export with the python script - will this work in TS?

Post by frank // Mar 7, 2006, 3:02pm

frank
Total Posts: 709
pic
davidjohnson: I am looking into software for matchmoving and motion tracking - can truespace import the information from RealViz Matchmoving software or any of the motion tracking software? Thanks


David: trueSpace cannot natively import tracking data from Realviz Matchmover. SynthEyes, which is a very affordable program (especially for what it does), can export to trueSpace via a python script. If you want a fast and accurate solution, and are willing to spend $399, then I'd suggest SynthEyes.

http://www.ssontech.com/


However, a while back I wrote a translator for the free Voodoo Camera Matcher. Here's the link to download Voodoo:

http://www.digilab.uni-hannover.de/docs/manual.html


...and here's the link for my program:

http://70.147.193.182/vd2ts/


The good thing about this, is it's all FREE and you really don't have much to lose by trying it out.


If you ever want to get into complex stuff like tracking objects within a match-move, etc... then SynthEyes is your best bet for the price.

Post by frank // Mar 7, 2006, 3:07pm

frank
Total Posts: 709
pic
Here's a sample track I did with Voodoo and my VD2TS program:

http://www.frankladner.com/mt_cameramatchtest.avi


Basically I rendered the feature points to 32-bit TGA, brought them into After Effects as a TGA sequence with alpha-transparency, added glow, and rendered the layer on top of the original background footage.


VD2TS is not a very complex program - not a lot of options, etc... I wrote it in a day or so and added a few basic updates later.


You can get more details from the VD2TS page.

Post by davidjohnson // Mar 7, 2006, 3:07pm

davidjohnson
Total Posts: 169
Thanks Frank, I just found the Voodoo stuff and I am going to try it out. Any complaints about it? The convertor will be a godsend, great work!

Post by davidjohnson // Mar 7, 2006, 3:16pm

davidjohnson
Total Posts: 169
Just to let you know, I tried running Beta 3 and got this error :

"Component Misscript.ox and one of its dependencies..."

Beta 2 seems to work though.


WinME

Post by frank // Mar 7, 2006, 3:19pm

frank
Total Posts: 709
pic
davidjohnson Thanks Frank, I just found the Voodoo stuff and I am going to try it out. Any complaints about it?


No complaints! Especially with it being free and all. :)


For some people, having to convert your video sequence into TGA files may be inconvenient. (The Windows version currently only supports TGA.) I don't mind that part.


When you first get into it, don't let all the settings overwhelm you. The default values usually work, unless it's a pretty complicated shot with lots of movement.


I'm here to help if you have any questions, though.

Post by frank // Mar 7, 2006, 3:23pm

frank
Total Posts: 709
pic
David Johnson: Just to let you know, I tried running Beta 3 and got this error :

"Component Misscript.ox and one of its dependencies..."

Beta 2 seems to work though.



Ahh. Yeah, I was going to try some fancy stuff with the MS Script control (to make the output more customizable). Apparently you don't have the MS Script ActiveX control on your machine, but don't worry about it because it's not really functional (ie. I didn't write any code - just added it to the project.) Hopefully Beta 2 does what you want.

Post by frank // Mar 7, 2006, 4:58pm

frank
Total Posts: 709
pic
I decided to do a test run on a longer sequence. This was tracked with mostly default settings and again, I used the "glowy dots" (feature points) as test objects in trueSpace. I'm still quite impressed with the results Voodoo gives - there's not much slide at all. Now I will say that there were a few jittery frames at the very beginning but it wasn't a problem. It's best to always shoot extra footage at the beginning - not only so you can cut it out if you need - but if you shoot smooth parallax movement, it will give Voodoo a little more frame info to "lock" onto.


Also, there are no masks used, so dots (FPs) in the background will appear to move OVER the blocks in the foreground. If I was doing a real shot here, I'd add shadow-cather planes for the ground and blocks (using the FP objects as guides) and erase all the FPs. Then I'd add objects, set up lighting, etc...


Here is the composited video clip:

www.frankladner.com/Blocks_Track_Test.wmv


Before shooting the block footage, I placed bits of paper at the corners to assist in the tracking, but it could've been done without them probably just as well.

Post by davidjohnson // Mar 8, 2006, 3:32am

davidjohnson
Total Posts: 169
That looks amazing Frank! What exactly did you do in TS? Did you do all the dots (cubes) in TS? What did you finally do to export it from Truespace?

Post by frank // Mar 8, 2006, 3:58am

frank
Total Posts: 709
pic
davidjohnson: That looks amazing Frank! What exactly did you do in TS? Did you do all the dots (cubes) in TS? What did you finally do to export it from Truespace?


Here are the steps I take in trueSpace (after it has been tracked in Voodoo and converted from .MA(Maya) to .PY(Python) by VD2TS.):


- Import the Python script (may take a minute or so to display)

- Run the Python script (may take a minute or so to run)

- Erase the script by highlighting it all *

- Bring up a new small window and set it to match your video footage size

- Set the video footage as the background **

- Select and view from the camera

- Bring up the KFE and erase the camera scale/zoom keyframes

- Adjust the camera scale/zoom until the feature points line up with the footage

- Throw in some lights

- Render to 32-bit TGA


Then just bring the "dot" TGA sequence into your video editor and place it on a layer above the live action sequence.



* In the Python script window, Select All (Ctrl+A) and press delete. Do this because trueSpace apparently refreshes the script code (doing syntax coloring, etc...) for each operation. I noticed that even if I ran the script and started deleting lights or other objects, it would take a whiiiiiiile between each operation. Delete the script immediately after it runs and and you won't have to wait on it to update each time you do something.)


** I use trueSpace 5.1 for setting up tracked scenes. For some reason, trueSpace 5.1 can cycle through sequentially-numbered TGA frames as a background video but in trueSpace 6.6 that no longer works and you must use an AVI.


Hope this helps!

Post by davidjohnson // Mar 8, 2006, 2:37pm

davidjohnson
Total Posts: 169
Frank,


I can't seem to get your program to run without giving me errors when I try to convert it. HEre is the error (I think I did the motion capture in Voodoo ok).


Runtime Error 5

Invalid procedure or call argument.


I can't get any farther because of this! So no truespace for me yet...

Post by frank // Mar 8, 2006, 4:06pm

frank
Total Posts: 709
pic
David: Did you get the email with the new compile?


I tested it here on a couple of .MA exports from Voodoo and it worked fine. If you want, you can email me your .MA export and I can run it through to see if maybe it's something with the file. (frank@frankladner.com)

Post by frank // Mar 8, 2006, 4:28pm

frank
Total Posts: 709
pic
Ok, I went back to an older version (without the script control - and without some of the export features), changed a few things, and did a recompile.


You can download it here:

[EDIT: Link removed - see next post.]


It worked on a 480+ frame test file with no problems so I hope it does the trick for you.


I will say that it may have other issues. LOL! After looking at the code I realized there are plenty of places I could spiff up a bit. If you guys would like me to add something to it, post your requests. I can't guarantee that I can do it but I will sure give it a try. :)

Post by davidjohnson // Mar 8, 2006, 5:10pm

davidjohnson
Total Posts: 169
Thanks Frank, I have sent you two emails. Maybe I am doing the voodoo thing wrong, because I am still getting the error. I really wish I could use your updated beta3 because of all the extras with it! But right now, I wish I could use any of them!

Post by frank // Mar 9, 2006, 4:50am

frank
Total Posts: 709
pic
David,


I removed the script control and made a few changes. Here's the new build:


http://www.frankladner.com/apps/VD2TS_v04.exe


I tested it on the .MA file you sent and it worked.


What would be better than a .PY script (since it takes so long to run in trueSpace) is an export to an ASCII trueSpace .SCN file. Just thinking, though...doubt if I'll get around to doing it any time soon.


ALSO, remember that VD2TS is designed to work with Voodoo's Free Move option, which exports rotation and translation values. The Rotation option exports rotation and zoom values, which I cannot figure out how to convert to trueSpace's camera scale values.

Post by davidjohnson // Mar 9, 2006, 5:16am

davidjohnson
Total Posts: 169
Again, thanks Frank - you are a champ!

Here is what I did.

1) I used Voodoo with the default setting and put the camera on free move. I tracked it, saved it as a MA.

2) Next I took it into VD2TS, converted it and it was ok.

3) Then to TS - opened the script,

4) Then I ran it (this is where I get the KeyError and then deleted it. )

5) Now I opened up a new window, changed the background to the avi, switched to the camera and...

6) Here is the last problem. Opening the Keyframe, there is nothing. It does not have any keyframes at all for the camera. I don't know if it is the KeyError that is not allowing the script to finish or not.


I will try the newest incarnation when I finish work today.

I agree this is probably alot of work for you. But it might be something if you get it done (the Ascii version), that you might be able to partner up with Voodoo and Caligari with!

I will post as soon as I test tonight.


PS - I have tried this with TS 6 and TS 6.5

David

Post by frank // Mar 9, 2006, 5:31am

frank
Total Posts: 709
pic
Hopefully you can get some use out of it, David!



davidjohnson: ...(this is where I get the KeyError and then deleted it.)


What usually causes that is Null values popping in at the last camera keyframe for the translation line:


cam.Position = (,-100,)


When it should be something like this:


cam.Position = (100,-100,100)


Deleting that line will allow the .PY script to run without getting the "KeyErrorTSP2"...but in that last update (.04) it shouldn't be an issue.

Post by davidjohnson // Mar 9, 2006, 12:35pm

davidjohnson
Total Posts: 169
Ok, I don't get that error anymore, which is a good thing, I did get this though when I ran the script, but I don't know if it affects the scene :


File "C:\PROGRAM FILES\CALIGARI65\TSP2.py", line 1192, in ontimestarted

fp.Positi


Now, when I opened up the KFE, the keyframes were there for the camera, a good thing - but which ones do I delete? Just the Scale? Leave the Move and Rotation?


Also, what are the FP01-FP? - are these something I should look at? I see them in the Keyframe Editor, but I am unsure what they do. I notice in your instructions on the website, it says : "Place 3D elements using the imported feature points as guides". I am guessing they are guides, but I am unsure how to use them. Are they supposed to show up as cubes or something in the camera view, because it they are supposed to show up, I don't see them.


I hope I am close to understanding this, so I don't have to bother you anymore!

Post by davidjohnson // Mar 9, 2006, 12:43pm

davidjohnson
Total Posts: 169
Oh yes, the FP01 do not have any keyframes attached to them...


Also the script thing -


File "C:\PROGRAM FILES\CALIGARI65\TSP2.py", line 1192, in ontimestarted

fp.Positi,

I get in both TS 6 and 6.5.

Post by frank // Mar 9, 2006, 2:17pm

frank
Total Posts: 709
pic
davidjohnson: Now, when I opened up the KFE, the keyframes were there for the camera, a good thing - but which ones do I delete? Just the Scale? Leave the Move and Rotation?


Correct - delete the Scale keyframes. Then you just view from the camera and scale in/out until the feature points line up with your background footage (as mentioned, you should set the background to your live-action sequence)


The FP(feature point) objects are the 3D feature points as exported from Voodoo. These represent where the elements of the 2D footage are located in 3D space. If you switch to a perspective view and move the camera around the feature points, you should actually see a (pretty accurate) representation of the scene you tracked. Also, there is a way you can select all the objects in the scene and rotate everything until the feature points line up with the grid, which makes placing objects a LOT easier. (...and it won't mess up the camera movement or anything) More on that later, if you want.


It's strange that you have the "FP" objects showing up in the KFE / SE but you don't actually see them. I wonder if they are just way out of view. Have you tried viewing from the camera and adjusting the scale?


davidjohnson: Oh yes, the FP01 do not have any keyframes attached to them...


Correct. They wouldn't have any keyframes as they are static objects - simply markers. The camera should be the only object with keyframes.


davidjohnson: File "C:\PROGRAM FILES\CALIGARI65\TSP2.py", line 1192, in ontimestarted

fp.Positi,

I get in both TS 6 and 6.5.


When you are at the load sequence dialog, are you selecting "Free Move"? (it is set to rotation/tripod by default)


Here is my latest test. It's locked-tight until the end (and some may not even notice it) when it starts to rotate slowly. I plan to post something in the Voodoo forums about it.


http://www.frankladner.com/Blocks_Track_Test2.wmv

Post by davidjohnson // Mar 9, 2006, 3:08pm

davidjohnson
Total Posts: 169
Awesome Frank, that seems to work. I finally found the points and put a test cylinder with it, seems to work great. I did find some of the points off, and way off in the distance, but I will focus on the ones that are clustered which is good. Going to do a nice test and see what comes up.


>>When you are at the load sequence dialog, are you selecting "Free Move"? (it is set to rotation/tripod by default)


Absolutely, I switched to Free Move. I don't know why I am getting the error, but it seems consistent. What does it exactly mean?


Another thing Frank, and I don't know how to do it -

1) how do you get the background of TS to be an IMAGE SEQUENCE?

2) How do you get the background to HOLD when scrubbing the timeline? Everytime I set the background, look at it, and move the timeline, the backrgound disappears completely. I am not sure how to fix this. I have tried global on and off. The LOCK seems to be GREYED out.


This is looking good, if I can find out what the error means and get the background as an image sequence, I will be ready to post some test!


Your test keeps look better and better!

Post by frank // Mar 9, 2006, 3:41pm

frank
Total Posts: 709
pic
davidjohnson: I don't know why I am getting the error, but it seems consistent. What does it exactly mean?

I would have to check out your script. It sounds like part of that "position" line is missing (for instance, the x or z number).



I actually use trueSpace 5.1 for importing tracked data and for scrubbing the frames. The reason is that I can't get later versions of trueSpace to play TGA sequences. The funny thing is that trueSpace 5.1 will only play the frames in realtime. When I hit render, it reverts the background to the first frame.


What you can do is render the TGA sequence out as an AVI (uncompressed AVI, while a large file, scrubs well) from your NLE and then set that AVI as your background.


I always render my 3D objects out separately as 32-bit TGA or to green background w/ green planes and objects for shadow-catching (( I have yet to get decent results with shadow/reflection-catching shaders - any advice welcome! )) Next I bring the live-action plate and the 3D sequence into an NLE for compositing.





If you want to adjust the camera rotation (if it's off slightly, for instance) the trick is to glue it to another object (like a sphere or box primitive) and - while viewing from the camera - rotate the whole glued object. This changes the global view but keeps the relative rotation of the camera. Hope that makes sense. :) Anyhow, you'd only need to do this for the first frame and the rest of the camera motion should match.


Here are some notes:


- When adjusting the scale/zoom, be sure to select the camera only (not both glued objects). You can do this on the first frame or any frame, as long as you have only one key. So if you set it at, say, frame 50 then drag that key back to frame 0 and it should all be fine. Otherwise, the scale will gradually change from 0 to 50.


- When adjusting the rotation, be sure both the camera and object it's glued to are selected - and that you are viewing from the camera.


Hope this is not too much info!

Post by davidjohnson // Mar 9, 2006, 4:50pm

davidjohnson
Total Posts: 169
Frank,


Well, I am getting some strange results - first Voodoo

1) I rendered out a sequence of hand-held watching a butterfly. Version Beta 8 crashed, while Version beta 7 handled it. Ran it through VD2TS, worked. Seems to be ok. 52 frames long...


2) TS 6.0 - same problem with scrubbing. I can't set the background as an AVI or TGA, because when I scrub, the background disappears. But that is TS, nothing to do with you ;) - I have a copy of TS5 around, I will have to look for it.

3) Deleted the scale frames, set up the camera and placed a cylinder in front of the camera (I can see it as I scrub, looks good). Now I render out one frame, any frame, THE CYLINDER IS NOT THERE! And besides that, neither are the place markers that are close. I can see small dots in the background, like stars (only about 6-7 of them), but the ones that are very close in the TS are not there! But most importantly the CYLINDER cannot be rendered out in a scene! I am trying to figure out what setting I have on TS to make it do this, it is visible and so forth, but I cannot see it when rendering!

Must be a TS problem or do you think it has to do with running the script? I have tried it three times now with new objects, many of them put in front of the camera and also adding a light and nothing works. Challenging to say the least. ANy ideas? What is making TS act this way?

Post by davidjohnson // Mar 9, 2006, 5:02pm

davidjohnson
Total Posts: 169
Ok, I am scrapping that file (the .ma file). I don't know why it is acting up, but it is. Going to re-render the TGA sequence and re-voodoo the thing and see if I can get VD beta 8 to work. The .ma file must be the problem, because one of the older .ma files is working fine.
Well Voodoo crashed again as I was doing it. I don't know why it doesn't like this TGA sequence. Very interesting..

Also, found TS5 (not 5.1) and tried a new avi file, seems to work better. HEre is the error running the script :

AttributeErrorCreateCTraceback (innermost last):
File "C:\PROGRAM FILES\TS5\TSP2.py", line 1062, in ontimestarted
fp = doc.CreateC
:

Frank, How did you get the image sequence in TS5? I can't find anything that will allow that. It seems to be fine now, must have been the avi I export with virtuadub as a TGA, it really didn't like it in Voodoo beta 8.

I also found out another problem, I can't seem to turn off the background effect shader for some reason...

Post by frank // Mar 9, 2006, 5:20pm

frank
Total Posts: 709
pic
davidjohnson: Challenging to say the least. ANy ideas? What is making TS act this way?


Interesting... Sorry to hear you are having so many problems with trueSpace. I'm not surprised by how it's acting, though. I guess maybe after using it for so long, I've just gotten used to its...personality. LOL! Yeah, it can be aggravating at times.


As far as the objects not showing up, I've had that happen to me before (trueSpace wouldn't even render the feature points (box primitives) in one instance). I saved the scene and opened it in trueSpace 6.6, where it rendered fine. Can't explain why it does that sometimes.


Another thing I'd suggest is that since you are in the testing stages, render your sequence to smaller-sized TGAs and track those as a proxy. Voodoo will crunch through them a whole lot faster (and believe it or not it would likely even be accurate enough to use on your full-size footage) I'm assuming you're using 720x480/NTSC - so you'd render them to 352x235 (3:2 ratio), for instance.

Post by frank // Mar 9, 2006, 5:33pm

frank
Total Posts: 709
pic
I've attached some screengrabs to show the options I change most.


In the Draw Options area, if you enable 3D Fpoints, this will draw the feature points in 3D space. So if you play the sequence in Voodoo after the track is done and the blue dots stay in place, you have a good track.


When first starting out, I made the mistake of checking the tracker/crosshairs (FPoints in Draw Options), but this is actually just tracking groups of pixels in a 2D plane on the image.


David: I know you enable "Free Move" in the Sequence Select dialog, but I'm including it for anyone else that may be following along.

Post by davidjohnson // Mar 9, 2006, 6:42pm

davidjohnson
Total Posts: 169
thanks for the voodoo tips, that will come in handy in the future!

BACK to TS - I have tried the saving and opening in TS 5, TS 6 and TS 6.5 and yes I can see the blocks (place markers) and yes they render, but nothing else will - primitive that I have saved and reopened in all incarnations of TS will not render. I cannot place a primitive or anything in front of the camera because it just won't see it or render it - which kind of defeats the purpose I guess... :(
When I scrub through the timeline (camera view), I can see everything , the primitive I just put in, the cubes place holders, but when it comes time to render, the primitives are not there. It is a really strange sight to see everything else get rendered and that disappear. AND any other view EXCEPT the camera will render the primitive...
I don't know if it has to do with that error
AttributeErrorCreateCTraceback (innermost last):
File "C:\PROGRAM FILES\TS5\TSP2.py", line 1062, in ontimestarted
fp = doc.CreateC
:
Have you tried adding a primitive and rendering it out? It is definitely something to do with the camera...
I wish I could just give up, but I guess it is not in my nature:confused:

PS - tried glueing primitive to the Place markers as well, did not change the fact that the camera does not see them.

** Just did a test render with just the place marker blocks (because they seem to be the only thing that renders!), and wow, great accuracy in tracking. I want to test this out big time!

Post by davidjohnson // Mar 10, 2006, 2:59am

davidjohnson
Total Posts: 169
A quick update. I have been at it long into the night and here is what I have discovered.

Reopening the scene doesn't work when rendering primitives BUT

copying the camera keyframes, starting a new scene seems to work - I can see the primitive through the camera but again, this is without the place markers. So I am going to try and delete all the place markers instead and see what happens. I will keep you posted.

Post by frank // Mar 10, 2006, 5:32am

frank
Total Posts: 709
pic
File "C:\PROGRAM FILES\CALIGARI65\TSP2.py", line 1192, in ontimestarted

fp.Positi,

:


AttributeErrorCreateCTraceback (innermost last):

File "C:\PROGRAM FILES\TS5\TSP2.py", line 1062, in ontimestarted

fp = doc.CreateC

:


In both of those instances it appears that trueSpace possibly didn't load all of the PY file. "fp.Positi" and "doc.CreateC" are cut off. This would make sense if maybe it was a huge script and the code buffer was limited but I don't think that's the case. Also, I ran the script you sent me and it worked fine. The non-rendering objects is an issue, though.



davidjohnson: ** Just did a test render with just the place marker blocks (because they seem to be the only thing that renders!), and wow, great accuracy in tracking. I want to test this out big time!



I know what you mean! There's just something about getting a virtual camera matched to live-action footage. :)


There are many possibilities with this - even besides placing 3D objects in the footage. Ever thought of adding Depth-Of-Field accurately and realistically to a moving video shot? After you track the sequence you can add planes based on the feature point locations and then render depth maps, effectively giving you depth maps for the live-action plate. Very cool.
Awportals.com is a privately held community resource website dedicated to Active Worlds.
Copyright (c) Mark Randall 2006 - 2024. All Rights Reserved.
Awportals.com   ·   ProLibraries Live   ·   Twitter   ·   LinkedIn