Collada plugin for After Effects

More info here
Plugins and Scripts > trueSpace > Animation

Cloth to vertex and/or morph for trueSpace7.61

cloth icon

Script for creating morph, vertex texture or modelspace vertex animations from a workspace cloth simulation.

A version comes pre-installed in the Unofficial trueSpace Updates v9 - https://www.united3dartists.com/forum/viewforum.php?f=55

persistent base install required

requires Clintons3D Package v.1638440 or higher (February 18, 2023 plugin file date) - Clintons3dPlugin.rsx

Global function set required.

Status Message required.

The modelspace vertex animation also requires a python script, "modelCloth2vertexAnim.py", available here. Right click to save the script. It can be saved to "C:/trueSpace761/tS/PythonScripts", but the location does not really matter.

Installation:

  1. Reset the Default Context if any toolbars have been modified
  2. install the persistent base if not already installed
  3. install all the requirements
  4. drag the node into the link editor, ignore the alert and press the install button
  5. delete the node from the scene after install is complete
cloth conversion script cloth conversion script cloth conversion script

Morph Animation:

  • End Time - number of seconds to capture, where the time starts at 0.
  • Frames Per Sample - number of frames that run between samples. A value of 10 means 10 simulation frames will run between each capture of the mesh state.
  • Make Morph - create a morph animation from the selected cloth simulation.

Vertex Color Animation:

  • End Time - number of seconds to capture, where the time starts at 0.
  • Frames Per Sample - number of frames that run between samples. A value of 10 means 10 simulation frames will run between each capture of the mesh state.
  • Use World Coordinates - when checked a vertex shader that uses the objects world transformations is copied into the material. Otherwise the transformation is not included. Checking this option only works for the case where the original cloth object does not have any rotations. Freezing transforms is recommended.
  • Export Images - export the resulting position and normals animation images for use in other applications.
  • Make Vertex Color - create a vertex color animation from the selected cloth simulation with the option to export the bitmaps as image texture files.
  • Open All VTA Panels - used to open the Vertex Texture Animation(VTA) panels for all scene items. The panels are dragged into the Stack view Panel tab to activate the vertex color animations.

Modelspace Vertex Animation:

  • End Time - number of seconds to capture, where the time starts at 0.
  • Step Frames - number of frames that run between samples. A value of 1 means for each simulation frame the mesh state is captured.
  • Distance - offset value in x,y and z to prevent the copied meshes from interfereing with the cloth simulation run.
  • Make Vertex - create a collection of meshes from the selected cloth simulation to be used in the modelspace python script for vertex animation.

The first step is to determine the length of the animation.
Make sure the "PhysEngine" node is visible and you can see the Current Time.
Run the simulation and and take note of the Current Time value. Stop the simulation after determining the desired end time.

Morph Animation

  1. Set the End Time to the length of the desired animation.
  2. Set the Frames per Sample value. This is how many frames of the simulation will run before a morph target is created.
  3. Select the object and press the Make Morph button.
  4. Answer "Yes" to any construction history alerts.

Vertex Color Animation

  1. The cloth object must have D3D nodes style materials. Use the material converter script if the material is a compiled material.
  2. Option: freeze the cloth objects transforms.
  3. Set the End Time to the length of the desired animation.
  4. Set the Frames per Sample value. This is how many frames of the simulation will run before a morph target is created. Vertex color animation is stepped, so a value of 1 works best.
  5. Use World Coordinates if the cloth object does not have any rotation values. Uncheck if the object has any rotations.
  6. If exporting the result to another 3D program or game engine, check the Export Images.
  7. Select the object and press the Make Vertex Color button.
  8. Answer "Yes" to any construction history alerts.
  9. As instructed press the Vertex_shader button, "activate/return to scene". The LE will open to it automatically.
  10. vta panel A Vertex Texture Animation (VTA) panel is added to the object and the button can be used to "wake up" all the VTA animations in the scene.
  11. Ctrl drag the Vertex Texture Animation(VTA) panel into the stack Panel to activate the animation.

Modelspace Vertex Animation

  1. Set the End Time to the length of the desired animation.
  2. Set the Step Frames value. This is how many frames of the simulation will run before a shape target mesh is created.
  3. Set the distance so that the copied meshes don't interfere with the cloth simulation.
  4. Select the object and press the Make Vertex button.
  5. Answer "Yes" to any construction history alerts.
  6. Close any open Scene View panels
  7. Go to modelspace
  8. Load the python script, "modelCloth2vertexAnim.py", into the Scene script(top of the dropdown list)
  9. Edit the script so the timeIncrement is the same as the Step Frames value.
  10. Run the script to create the vertex animation.
  11. Remove the script from the scene

For most cases the Morph Animation is the best choice for use inside of trueSpace.

Press the "Esc" key to abort a run.

Always answer yes when asked about construction history.

The Stack view Panels tab must be visible to see and render vertex color animations

Vertex colors only render with the D3D render engine

Vertex color normals will not process within trueSpace shaders.

Vertex color animation works better if the cloth object does not have any rotation values. The main advantage is that the animated object can be moved and rotated. Use the freeze transform script to remove rotations.

Exported vertex color textures have only been tested with the PNG file format.

Use the Open All VTA Panels button or the VTA Activate All VTAs button after reloading the scene file.

The 3 Flags.RsScn demo scene uses a UV Mapper node, so these cloth objects should be flattened before freezing their transforms for a vertex color run.

Vertex color result can be moved and rotated if the original object does not have any rotations and the Use World Coordinates is checked.

Close any open Scene View panels before running any python scripts. There is an incompatibility between the workspace Scene View and the modelspace python editor. If it is open tS will slow down right after opening the python editor. To fully recover from this state, close the Scene View and restart trueSpace.

TODO: auto open closed stack view using unpublished Global Function Set, UU will use the UUFunctionSet - need adjust code for these cases. Low priority since a closed stack view is unusual
Also check to see if this is the same scripts as the UU9 version.

TODO demo all 3 methods using the 3 Flags.RsScn sample from the pdf docs

TODO demo export of vertex color into Godot game engine - have new shader that uses normals and some rough steps worked out

Videos below are based on an earlier version of the script

Click this for the first part of the video demonstration for vertex animation(wmv, 4:00, 3.5Mb).

Click this for the second part dealing with morph animation(wmv, 4:52, 3.9Mb).

Vertex Animation Texture script can be used to export position and normal textures created from a morph animation. It also has some theory behind the vertex color animation process.

you tube here

February 22, 2023

  • new ui and color vertex export images checkbox by trueBlue
  • activate/return to scene button by trueBlue
  • trueBlue camera and light check restriction
  • Vertex color animation node automatically opens in the panel view. No need to drag it in anymore.
  • Added an "Open All VTAs" button to the VTA nodes. Activate all the vertex color animations in the scene without needing to select them all and no need to open the cloth panel to press the same button.
  • better status line feedback in vertex color
  • fixed tS modelside renaming of nodes which sometimes stopped the python file from running properly
  • updated the python file to use the new modelspace freindly names
  • added one more frame to model vertex animation so first frame not lost
  • fixed vertex color to work with scene instanced materials
  • vertex color works with multi-material objects
  • morph and vertex colors use up fewer undo steps
  • removed automatic flattening as that should be a user choice

February 13, 2023

  • new vertex color animation
  • updated morph
  • fix errors
  • updated the installer to use permanent style install
  • fixed button highlighting
  • workflow improvements for morphs

July 27 2015

  • unique button id
  • auto-installer
October 29, 2009
June 5, 2013