Final trueSpace 7.61 Beta 8 Unofficial Update

User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

Saw your post and did a bunch of research.

The Bridge Synchronize generally only works in one direction from workspace to modelspace. It originally designed to allow the workspace option of rendering to files.
You can't scrub modelspace and have workspace follow.
The sync now button just runs the script once manually.
The cycle bridge button can't be run with animation because it requires user input. It is used to update workspace view for nurbs and metaball object changes.
I don't remember what the timer is used for.

The modelspace autorecord needs to be turned off, otherwise random keyframes may be generated. It can be toggled from script with tSBridge.SuggestTSStateByAlias("AnimationAutoRecord"); The state can't be read with script. A script command exists to read it but it doesn't work.

It might be possible to have the workspace scrubber follow the modelspace scrubber via a workaround.

1. change the Bridge Synchronize Script into an invisible mesh so it can be animated on modelside without being rendered
2. get modelside frame range
3. modelside set position of the y value to the first frame value and set a key on modelside
4. modelside set position of y to the last frame and set key
on workspace side connect a watchdog to the Bridge Synchronize Script mesh, reading the y value to set the workspace animation time

With this arrangement it wont be possible to have both scripts active at the same time.

I did a proof of concept test and got workspace scrubber to follow modelside scrubber. Did not test with the tSBridge.SynchronizeObject command yet.

The only missing piece is the command to press the record key button on modelside from workspace side. I have a list, but that one is missing for some reason.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

Yeah I have been searching high and low for the Model's Record Keyframe command. No such luck.
I even created a Model Animation toolbar by using tSBridge.xxxxxxxxx and looked at the menu buttons in WMS.
The Record button command is tSBridge.SuggestTSStateByAlias("AnimationAutoRecord");
Which toggles the Autorecord on and off.
Then there is tSBridge.AnimationFrame() -> VAR?
In the Scene Editor the Keyboard Shortcut for Record is Ctrl + R

Take a peak at C:\trueSpace761\tS\Rs Main Libraries\Activities - My Activities\tS KeyFrame Recorder.RsObj
For me, Auto Record is not working in the above script.
I was able to get both scrubbers working using this setup.
Capture.PNG
Capture.PNG (7.12 KiB) Viewed 4338 times
I guess your Bridge Synchronize Script is working as is and as expected, Rendering a Workspace animation from Model.
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

Looks like some useful stuff in that "MoveAndRecordKf" script.
-
modelspaceKeying.jpg
I got the keyframes to set from workspace.
I used tSBridge.AnimationFrame = endframe; to set the frame, but looks like tSBridge.PutActiveFrame(endframe); might work better.

Found the keyframe command by looking in the tsxapi.dll file, tSBridge.SuggestTSStateByAlias("RecordKeyFrameButton");

tSBridge.XorTypeTSStateByAlias("AnimationAutoRecord"); turns autokey on and like you said tSBridge.SuggestTSStateByAlias("AnimationAutoRecord") toggles the state.
The combination of tSBridge.XorTypeTSStateByAlias("AnimationAutoRecord"); and tSBridge.SuggestTSStateByAlias("AnimationAutoRecord") turns it off.

When setting keyframes, autokey had to be on and I had to change the X and Y values of the mesh to get it to keyframe reliably. If I just used X or Y it was unreliable.
Maybe I can use tSBridge.FlushSyncEvents(); instead of the pause nodes which were added for reliability reasons.

The only real problem left with this setup is that it only sets 2 keys and the interpolation between them isn't linear. It needs to set a key at every frame to get around that.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

Yeah you found it!
I tested tSBridge.SuggestTSStateByAlias("RecordKeyFrameButton");
I have Model, Workspace, Link Editor, and the Stack open. Bridge set to Auto or On does not matter.

Model
AutoRecord - Off
Frame 0
Select object and run tSBridge.SuggestTSStateByAlias("RecordKeyFrameButton");
Set Frame to 30
Move selected object and run tSBridge.SuggestTSStateByAlias("RecordKeyFrameButton");

Model scrubber moves the object in Model and Workspace.

Workspace AE using Mosel's scrubber.
AE 's Record selected object's first (0) and last (30) frame.
Activate Bridge Synchronize script.
Model and Workspace scrubbers moves the object in Model and Workspace.
User avatar
Emmanuel
Chief Warrant Officer
Posts: 650
Joined: 14 Jun 2009, 06:47

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by Emmanuel »

Very interesting !
To render a VRay animation of moving objects, from Modeler, I need to keep a WS window open. Otherwise, trueSpace does not synchronizes and renders always the first frame. If the camera is moving, it works though, even if there is no WS window opened (probably because moving camera forces synch).
Will your script allow to render VRay animation from a plain Modeler interface (with no WS window opened at the same time) ?
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

tS76_Vray1_54B8
Quote from the VRay Readme.rtf

"There is one important aspect where V-Ray support differs from other trueSpace render engines - even though the user interface is fully integrated into the Modeler aspect, V-Ray support is based on the contents of the Workspace in trueSpace. The scene description (geometry, lights, and materials) is taken from the Workspace scene graph, so rendering relies on the Bridge between the Modeler and the Workspace for scene synchronization. With the addition of the Workspace Material Editor, you can now choose to work exclusively in Workspace, thereby avoiding any Bridge conversion issues."


From Clinton's web site.

Bridge Syncronize script -> http://clintons3d.com/plugins/truespace ... esync.html

When truespace 7.61B8 was released a bug was introduced that prevented workspace animations from rendering in the model side renders. The object animations did not transfer through the bridge. The bug also shows when scrubbing the workspace timeline and no motion will show in model side.

The bridge cycle button can be used to update workspace with model space changes. Press the button then choose "Sync from modeler"
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

@ Clinton
Here is the Bridge Synchronize script and Animation preferences panel I am proposing to use in the 7.61 unofficial update.
Attachments
Bridge Synchronize.zip
(73.45 KiB) Downloaded 176 times
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

Got it, will test soon.
Did anything else change besides the Bridge Synchronize?

I made 2 changes:
1. typo Manualy to Manually in the help
2. added a means to press the Synchronize from modeler button automatically.

It creates a script file named "mysendkeys.js" in the scripts folder and runs it before setting the bridge sync to auto. The script returns immediately and runs in the background. It sleeps to give the dialog time to show itself then sends a <tab> and <enter> to trueSpace to focus the "sync from modeler" button and then presses it.
Attachments
Bridge SynchronizeX.RsObj
(98 KiB) Downloaded 179 times
Clinton Reese

http://clintons3d.com
User avatar
clintonman
Captain
Posts: 5422
Joined: 21 May 2009, 21:08
Type the number ten into the box: 0
Location: California
Contact:

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by clintonman »

Tested and it seems to be working.

I also tried my idea where the workspace slider follows modelspace and it half worked. I rendered from modelspace and got motion from both workspace and modelspace, but only got about half the frames. About every other frame rendered with the other half as zero byte files.
Clinton Reese

http://clintons3d.com
User avatar
trueBlue
Captain
Posts: 5206
Joined: 06 Jul 2009, 22:50
Type the number ten into the box: 10

Re: Final trueSpace 7.61 Beta 8 Unofficial Update

Post by trueBlue »

Yeah! I have wanted and tried several times to send keys!
Been testing this in different scenarios, several times this morning.
The Sync from Modeler has been working as expected from the floating panel. The Content Synchronization shows and disappears when you use it from the Link Editor. If I disconnect the keysExternal script, it works from the Link Editor.
Also notice that when you close the Content Synchronization with the X button, it sets the Bridge to Off. This is true with or without your script.
The status message shows and disappears. Ugh!
Thinking I should remove the Delete Bridge Synchronize from the scene in the Deactivate button script.


Edit: Reread your post about the keysExternal script. So I think it is working as expected (shows and disappears ) when you run it from the Link Editor, but Not from the floating panel. IE: "sends a <tab> and <enter> to trueSpace to focus the "sync from modeler" button and then presses it." The Content Synchronization shows inactive and I have to select the "Sync from Modeler" button.
Post Reply