KP_PointCacheTools 2.5 for XSI

The Point Caching Tools allow you to record complex object deformations to a cache file and reapply those deformations. You can even interchange these caches with 3ds Max, Maya, Houdini or Blender.

The set of tools contains a command to record 3ds max compatible caches like pts or pc2, an operator to apply the cached data to the object (polygon, curve or nurbs) again and a manager user interface to easily record, apply and manage mulptiple caches at once.

KP_PointCacheManager
After installation you find the manager under the Import/Export button in the Tools section of the Animate toolbar.
The manager features three tabs, one to record caches, one to read them and one to manage the caches.
kp_pc_xsi_record.gif

To record caches you need to set a few parameters:

  • Specify a prefix for the cache file (set to scene name as default)
  • Enter or pick the folder where you want to store the cache files
  • Chose the file format (pts or pc2 for maximum compatibility and feature support)
  • Specify start and end frame of the animation you want to cache
  • Specify a sampling rate, 1 will record the vertex positions once per frame while e.g 0.1 will record 10 samples per frame
  • Add all the objects you want to record a point cache for to the point cache list. You can do this by picking a group or by adding the current selection
  • Finally specify if you want the tool to create a pci file. A pci file is a text file that stores information about all the caches you have recorded. To reapply all the caches again you simply need to load in the pci file and the manager can hook up all caches automatically

Now that you have set the parameters you can click “record list” to record the caches for the objects in the list or click “record selected item” to record the cache for the selected item only.

To reapply the caches switch to the read tab.
kp_pc_xsi_read.gif

Here you need to locate the pci file first and then click on open. Now the list on the left contains all the recorded caches and the list on the right contains all the matching objects in the scene (name based matching).
Before you click on “apply caches” you can optionally initialize the operator parameters and check whether you want reset transforms, remove SRT animation etc. (since the tool records vertex positions in worldspace you need these settings checked to avoid offsets and double transformations).
When you now click on “apply caches” an operator is created for each matching object and the correct cache file is loaded.

To manage the point caches or better the point cache operators in the scene, kindly switch to the manage tab. Here you can inspect, (un)mute or remove all operators or only the ones applied to objects in the current selection.
kp_pc_xsi_manage.gif

KP_PointCache operator
The operator features a parameter to set the cache file, offset the recorded animation, set the influence weight of the operator and speed up or slow down the animation (TimeWarp). What is more you can customize how the cache is played back (e.g. reverse, bullet time effects, etc.).
kp_pc_xsi_operator21.gif

Version 2.1 introduces new interpolation methods that help with motion blur. While older versions only supported linear interpolation you can now switch between linear, cosine, cubic and hermite. Linear is the simplest and fastest interpolation but results in discontinuities at each point. Cosine offers smoother interpolation but true continuity is only provided by cubic or hermite. For best motion blur results I recommend hermite interpolation. If you set interpolation to hermite you can set the HermiteTension and HermiteBias parameter to tweak the results.

In the Cache Handling group you set whether you want to stream the cache file (file is not closed between subsequent frames), load in just the current frame (file is closed after frame data is read) or load the complete cache in memory (e.g. useful for faster playback over networks). The check box “Use cached Y as scene up” is only needed if you have pc2 files that store Y as scene up and not Z which is default for this format.

KP_PC_Record command
To directly record a point cache you can use the KP_PC_Record command:
KP_PC_Record (pcFile [string], objName [string], startFrame [double], endFrame [double], sampling [double], pcType [int], globalCoords [bool])
All arguments are pretty much self-explanatory, the pcType is the type of cache you want to record (0=pts, 1=pc2).

If you are working with 3ds Max I recommend you take a look at Kai Stavginski’s fantastic point cache manager for Max. It is able to load pci files as well and thus allows for a smooth interchange of multiple cache files.
If you are working with Maya you might find my pc2 exporter for Maya useful, you can get it here.

Add-On for XSI 6.02 and 6.5 Windows (32 bit): KP_PointCacheV25_XSI65_32.xsiaddon
Add-On for XSI 6.02 and 6.5 Windows (64 bit): KP_PointCacheV25_XSI65_64.xsiaddon

Add-On for Linux 6.5 (32bit): KP_PointCache.tar.gz (You need to copy the Add-On directory)
Thanks to Alan and Stefan for compiling and testing.

Add-On for Linux, 7.01 to 2010 SP1 (64bit):
KP_PointCache_Linux64.tar

Plugin Source Code Windows: KP_PointCachePlugin_XSI_Source.zip
Plugin Source Code Linux: KP_PointCache-src.tar.gz

To compile the plugin, you also need the KP_PointCacheCore.cpp and KP_PointCacheCore.h : KP_PointCacheCore_Source.zip

If you compiled the plugin for another platform or version feel free to send me a link so that I can put it on this site as well - thanks.

Disclaimer:
The software is released as is, without any written or implied warranty. The software cannot be redistributed without permission from Kai Wolter. Kai Wolter is not responsible for any damage or loss of data incurred by the use of this software.

For XSI 5.11 you can still download the 2.1 Add-On: KP_PointCacheToolsV21_XSI511.xsiaddon (cache files are compatible).

version notes:
V2.5:
fixes:

  • fixed compability issues with 64 bit, PC2 files can be read and written by both 64 bit and 32 bit applications now
  • improved memory mode: with load option set to memory scene playback is now a lot faster (approx.: 50-100%)

removed:

    removed pcd support (was saving doubles instead of floats) due to compability issues (plugin still supports pts and pc2)

note:

    Both the operator and the record command are compiled into one DLL:KP_PointCache.dll

V2.1:
fixes:

  • fixed bug that could crash XSI while applying cache files
  • fixed bug that prevents operator from updating when a new cache file is set or an obsolete is replaced

new features:

  • added support for linear, cosine, cubic and hermite interpolation

V2.0: version 2 is a complete rewrite of the old plugins.
The main new features are:

  • support for motion blur
  • sampling rates other than 1.0
  • option to load the cache in memory
  • operator is now a self installable operator (expression to evaluate at every frame no longer needed)
  • custom playback parameters

Categories


All scripts and plugins on this site are free for personal and commercial use. If you got any questions or like to give me props, feel free to drop me a mail, to give credits or to visit
Thanks.