MAXScript Language Reference > 3ds Max Objects > Modifier : MAXWrapper and SpacewarpModifier : MAXWrapper > Modifier and SpacewarpModifier Types > Other SpacewarpModifiers >

# Point_CacheSpacewarpModifier - superclass: SpacewarpModifier

    Point_CacheSpacewarpModifier - superclass: SpacewarpModifier; super-superclass:MAXWrapper - classID:#(923738083, 61950361)

Value > MAXWrapper > Modifier > Point_CacheSpacewarpModifier

| Modifier Classes - Quick Navigation

In 3ds Max 9, the PointCache World Space Modifier has been replaced with a version of the PointCache2 modifier previously available as a free plug-in. Its cache format has also been adapted to allow interchangeability with the new PointCache in Autodesk Maya for easier animation transfer between the two applications.

The documentation of the old PointCache World Space Modifier in versions prior to 3ds Max 9 is provided at the bottom of this page for users developing scripts for earlier versions of 3ds Max.

Constructors

    Point_CacheSpacewarpModifier ...
    PointCacheWSM ...

Properties

    <Point_CacheSpacewarpModifier>.fileName String default: "" -- filename

Get/set the cache file name.

### Record

    <Point_CacheSpacewarpModifier>.fileCount Integer default: 0 -- integer; File_Count

Get/Set the state of the file count radio buttons.

Possible values are:

0 -One File

1 -One File Per Frame

Available in 3ds Max 2008 and higher.

    <Point_CacheSpacewarpModifier>.recordStart Float default: 0.0 -- float; Record_Start

Get/Set the cache record start time in Frames.

    <Point_CacheSpacewarpModifier>.recordEnd Float default: 100.0 -- float; Record_End

Get/Set the cache record end time in Frames.

    <Point_CacheSpacewarpModifier>.sampleRate Float default: 1.0 -- float; Sample_Rate

Get/Set the cache sample rate in samples per frame.

### Load Type

    <Point_CacheSpacewarpModifier>.loadType Integer default: 0 -- integer; Load_Type

Get/Set the Load Type mode when using the Point Cache on a local workstation. Possible values are:

0 -Stream- Keeps the cache file open for fast access, but only loads a single frame at a time to conserve memory.

1 -Per-Sample- Opens the cache file, reads a single frame, and then immediately closes the file. This is slower than the stream load type, but is useful if you have many users reading/writing the same set of cache files since the cache files won't be locked open as you read from them.

2 -Pre-Load- Loads the entire cache file into RAM for very fast access, and then closes the file. Specifically useful for networks, or when a few caches are used by many objects in one scene (in which case, turning this on will prevent each object from thrashing the disk on playback). Be conservative in using this, as it can eat up RAM fast (though if one cache file is used by several objects, the cache will only be loaded into RAM once). See the pointCacheMan.GetUsedMemory() method for more info.

    <Point_CacheSpacewarpModifier>.loadTypeSlave Integer default: 1 -- integer; Load_Type_Slave

Get/Set the Load Type mode when using the Point Cache on a network slave. Possible values are:

1 -Per-Sample

2 -Pre-Load

### Playback Options

    <Point_CacheSpacewarpModifier>.strength Float default: 1.0 -- animatable; float

Get/Set the cache Strength. Default is 1.0. Lower values will influence the mesh less than the vertex positions stored in the cache file. Higher values will exaggerate the animation.

    <Point_CacheSpacewarpModifier>.relativeOffset BooleanClass default: false -- boolean; Relative_Offset

Get/Set the state of the Relative Offset option.

When true, only the differences from the first frame of the cache are used to distort the current object. If you would record a cache, set this option to true, add another modifier below the cache and modify the mesh, the recorded deformations will be added on top of the new deformations. Similarly, if the original recorded modifiers are still enabled, the object will get a double deformation.

When false, the point positions in the cache file explicitly set the point positions of the current object, overriding any additional deformations below the cache.

    <Point_CacheSpacewarpModifier>.applyToWholeObject BooleanClass default: true -- boolean; Apply_To_Whole_Object

Get/Set the state of the Apply to Whole Object option.

### Playback Type

    <Point_CacheSpacewarpModifier>.playbackType Integer default: 0 -- integer; Playback_Type

Get/Set the Playback type. Possible values are:

0 -Original Range- This will always play back the cache over the range it was originally recorded (so the animation will always be the same as the original).

1 -Custom Start- This will play back the cache from a custom start time, but the animation length/playback speed will be the same as the original animation).

2 -Custom Range- This allows you to set a start and end frames that the current cache plays back within. Using a range that is smaller than the original record range will play the cache back faster, a larger range plays the cache back slower.

3 -Playback Graph- Allows you to animate which cache frame is played at any given time. For example, if you record a cache from frame 0 to 100, set this parameter to 0 at frame 0, and animate it to 100 at frame 100. The function curve of this parameter in trackview shows how the cache is played back. Animating this lets you do interesting effects like slowing a cache down over time, or ping pong the cache playback, etc.

    <Point_CacheSpacewarpModifier>.playbackStart Float default: 0.0 -- float; Playback_Start

Get/Set the Playback Start value.

    <Point_CacheSpacewarpModifier>.playbackEnd Float default: 100.0 -- float; Playback_End

Get/Set the Playback End value.

    <Point_CacheSpacewarpModifier>.playbackFrame Float default: 0.0 -- animatable; float; Playback_Frame

Get/Set the Playback Frame. This value can be keyframes to control the playback when in Playback Graph mode.

    <Point_CacheSpacewarpModifier>.clampGraph BooleanClass default: false -- boolean; Clamp_Graph

Get/Set the state of the Clamp Graph option. It controls what gets loaded when the playback graph frame is out of the original recorded range. For example if the playback frame is set to 105, but the original cache was recorded from 0 to 100. With clampGraph set to true, the loaded frame will be 100. When set to false, the cache will "wrap around" and load frame 5. This way, you can loop caches more easily. In the example above, you could simply have a two key playback graph. Key 1 would be at frame 0 with a value of 0, and key 2 would be at frame 100 with a value of 100. Then you would set the out-of-range type for the graph to "linear extrapolate", and the cache would smoothly loop back to the beginning at frame 101.

The following properties are not exposed to the UI and are not fully supported:

    <Point_CacheSpacewarpModifier>.applyMeshToSpline BooleanClass default: false -- boolean; Apply_To_Spline

This option is not exposed to the UI. It should not be used.

    <Point_CacheSpacewarpModifier>.forceUncPath BooleanClass default: true -- boolean; Force_UNC_Path

Get/Set whether to force the cache path to UNC path or not. This option is not exposed to the UI.

    <Point_CacheSpacewarpModifier>.interpolationType Integer default: 0 -- integer; Interpolation_Type

This option is not exposed to the UI. It should not be used.

    <Point_CacheSpacewarpModifier>.playbackORTafter Integer default: 0 -- integer; Playback_Out_Of_Range_After

This option is not exposed to the UI.

    <Point_CacheSpacewarpModifier>.playbackORTbefore Integer default: 0 -- integer; Playback_Out_Of_Range_Before

This option is not exposed to the UI.

    <Point_CacheSpacewarpModifier>.preLoadCache BooleanClass default: false -- boolean; PreLoad_Cache

Get/Set whether to preload the cache when the scene is loaded. This option is not exposed to the UI.

## PointCacheMan Struct

    pointCacheMan.GetMemoryUsed()

Returns the memory used by Point Caches in the scene.

## cacheOps Struct

    cacheOps.DisableBelow <PointCacheWSM>

Disables all modifiers below the Point CacheSpace Warp.

    cacheOps.EnableBelow <PointCacheWSM>

Enables all modifiers below the Point CacheSpace Warp.

    cacheOps.RecordCache <PointCacheWSM>

Records the cache data of the given Point CacheSpace Warpto disk.

    cacheOps.Reload <PointCacheWSM>

Reloads the cache data of the given Point CacheSpace Warpfrom disk.

    cacheOps.Unload <PointCacheWSM>

Unloads the cache data of the given Point CacheSpace Warpfrom memory.

Old Definition Prior To 3ds Max 9

## Point_CacheSpaceWarpModifier : SpaceWarpModifier

    Point_CacheSpacewarpModifier - superclass: SpacewarpModifier; super-superclass:MAXWrapper - 7:0 - classID: #(567311073, 1221790701)

Constructors

    Point_CacheSpacewarpModifier ... PointCacheWSM ...

Properties

    <Point_CacheSpacewarpModifier>.time Float default: 0.0 -- float

    <Point_CacheSpacewarpModifier>.start_time Float default: 0.0 -- float

The frame number at which the cached animation starts playing back. Using decimal fractions lets you start at a sub-frame setting when using a Frame:Ticks time display. Default=0.0.

Sets the first frame for recording the vertex animation.

    <Point_CacheSpacewarpModifier>.end_time Float default: 100.0 -- float

Sets the last frame for recording the vertex animation.

    <Point_CacheSpacewarpModifier>.samples Integer default: 1 -- integer

    <Point_CacheSpacewarpModifier>.cache_file Filenamedefault: undefined -- string

Loads a vertex animation from a cache file on disk into the Point Cache modifier. If number of vertices in the cache file does not match the number of vertices in the object, a warning appears, but no error occurs.

    <Point_CacheSpacewarpModifier>.relativeOffset Boolean default: false -- boolean; Relative_Offset

Makes the Strength setting available. This enables offsetting the animated vertex positions relative to their positions as recorded. Default=off.

Note: When you turn on Use Relative Offsets and play back a cached animation with the modifiers turned on, the cached vertex positions are calculated relative to their positions as calculated by the modifiers. For example, if you record a Bend animation to a cache file, and then play it back with both Use Relative Offsets and the Bend modifier turned on and Strength=1.0, all vertex positions are doubled, resulting in exaggerated motion.

    <Point_CacheSpacewarpModifier>.strength Float default: 1.0 -- animatable; float

Affects the motion relative to the original animation. Available only when Use Relative Offsets is turned on. Default=1.0. Range=-10.0 to 10.0.

At 1.0, the animation plays back the same as recorded. With strengths between 0 and 1, the animation is relatively restrained. At strengths greater than 1, the animation is exaggerated. With negative Strength settings, the motion is reversed.

## Point Cache Interfaces:

    Interface:pointCacheWSM

Methods

    <void>record()

Stores the vertex animation to a disk file.

Call Record to activate the Save Points dialog, which lets you specify a path and file name for the cache file.

Click OK to record the file, and then load it into the Point Cache modifier, ready for playback.

    <void>setCache()

Loads a vertex animation from a cache file on disk into the Point Cache Spacewarp modifier.

If number of vertices in the cache file does not match the number of vertices in the object, a warning appears, but no error occurs.

    <void>enableMods()

Turns on all stack modifiers below the Point Cache SpaceWarp modifier.

Use this when you want to change modifier settings.

    <void>disableMods()

Turns off all the object's stack modifiers below Point Cache SpaceWarp so that only the cached vertex animation appears when you play back the animation.

#### See Also

- Point_Cache:Modifier