Export Particles operator

The Export Particles operator can be used to convert particles into scene objects or save them into various file formats.

If an Export Particles operator is placed into an event on its own, or an event only containing other Export Particles operators, its event will operate in “Global Export” mode. This means that the Export Particle operators in that event will operator on all particles within the flow (note: “Global Export” events are shaded blue).

If an Export Particles operator is placed into an event with other regular operators, it operates in “event” export mode. This means it will only export particles in its own event. If an Export Particles operator in “event” mode is instanced across multiple events, it will export particles from all of the events that it’s instanced inside.

These modes make it easy to control exactly which particles will be exported by an Export Particles operator.

The Export Particles operator will only export particles when its “Export” button is pressed by the user. This operator is not evaluated by the simulation itself.

By default, the Export Particles operator will respect your tyFlow cache settings. If caching is enabled, particles that are processed by the Export Particles operator will be added to the tyFlow cache. If you attempt to export more particles than can fit in your RAM while caching is enabled, 3ds Max may run out of memory and the export may fail. If you are exporting huge numbers of particles it is recommended to disable the tyFlow cache before doing so.

Note: This does not apply to export jobs submitted through Deadline, as caching will automatically be ignored by machines that process Deadline tasks.


MXS Functions

All Export Particles export functions can be initiated with MAXScript, without the need to manually press the “generate” button in the operator’s rollout panel.

When MAXScript is used to initiate an export, the operator’s current settings will determine the output format. All of the operator’s settings can be accessed through MAXScript as well, and the name of each setting can be determined by using the MAXScript command “showProperties”, using the operator as the function argument. Ex: “showProperties $.event_001.export_particles”.

The following functions can be used to initiate an export in an Export Particles operator using MAXScript:

  • [$operator].exportAlembic_Mesh()

  • [$operator].exportAlembic_PC()

  • [$operator].exportObjects()

  • [$operator].exportPRT()

  • [$operator].exportPRT_deadline()

  • [$operator].exportTyCache()

  • [$operator].exportTyCache_deadline()

  • [$operator].exportVRay()


Export Type Rollout

  • Objects: this mode allows you to convert particles into scene objects.

  • PRT: this mode allows you to convert particles into PRT format files (.prt).

  • tyCache: this mode allows you to convert particles into tyFlow’s tyCache format files.

  • tyCache (splines): this mode allows you to convert splines (generated with a Spline Paths operator, or just regular Max splines) into tyFlow’s tyCache format files.

Spline data is stored in a tyCache in a mesh-based format, and can be converted back to proper spline data (post-export) using a tySplineCache modifier. Please see the tySplineCache modifier documentation for more info.

  • Alembic Point Cloud: this mode allows you to convert particles point clouds into Alembic format files (.abc).

  • VRay Proxy: this mode allows you to convert particles into VRay Proxy format files (.vrmesh).


Frame Range Rollout

  • Start/End: these spinners control the start/end range of frames over which particles will be exported.

General Settings Rollout

Coordinates

  • Local/World: the coordinate system that the particles/meshes will be relative to, prior to export.

When “local” coordinates are chosen, all particle properties will be exported relative to the inverse transform of the tyFlow itself. Therefore the tyFlow icon’s transform will be the coordinate origin, rather than [0,0,0] in the scene.

Particles

  • Export particles: controls whether particles will be exported. Disabling this setting allows you to limit the export to additional geometry only.

  • Birth multiplier: the birth multiplier applied to birth operators at the time of export. Setting this value to something other than 1.0 will increase/decrease the number of particles generated during export.

Simulation Groups
  • Simulation groups: controls which particle simulation groups will be processed by the exporter. Use these groups to limit which particles will be exported.
Export Groups
  • Export groups: controls which particle export groups will be processed by the exporter. Use these groups to limit which particles will be exported.

Actors

  • Export bones particles: controls whether particles imported from a tyActor skin will be exported.

tySwitchers

  • Set index: globally override the switch index of all tySwitcher objects in the scene during export.

  • Index value: controls which switch index to use.

Use tySwitcher objects in your flows to quickly swap between different object setups.

Seeds

  • Reseed (+): globally increment all operator seeds by the specified value.

  • Seed value: the value to increment all operator seeds by.

The reseed operation does not change seeds to the specified value, but instead increments their current value by the specified value. So an existing seed of 12345 and a specified seed value of “1” will change the existing seed to 12346. All changes are reverted after the export is completed.

When “reseed” is enabled, you can manually exclude operators from the reseed operation by adding “noseed” to their name. For example, rename “Position Object” to “Position Object noseed”.

Retimer

  • Ignore retimer: turning this on will export raw frame timings (ignoring any retimer settings enabled within the tyFlow).

UI

  • Suppress all popups: when enabled, no popups will appear on the screen during export, including progress bar overlays, confirmation that export finished successfully, errors, etc.

Enabling “suppress all popups” can help in situations where you are exporting in UI mode with Deadline (popups may interfere with Deadline’s popup detection).


MAXScript Rollout (Export Objects)

  • Apply MAXScript on particle entry: when enabled, at the time a particle is first exported, custom MAXScript code will be executed on its corresponding scene node.

This option allows you to control various parameters of exported objects that would be otherwise too difficult to control from within the tyFlow UI. For example, if you are scattering PhoenixFD containers at particle locations, you could use this setting to set their cache frame offset to the time that their particle is born.

Object Settings Rollout

This rollout is exposed when the Export Particles operator is set to “Objects” mode.

Export object name (prefix)

  • Name: defines the prefix used to name the objects created by the exporter.

  • Pre-delete existing objects with prefix: when enabled, any objects whose name matches the assigned prefix will be deleted prior to export.

Export layer

  • Name: defines the name of the layer that exported objects will be assigned to.

  • Pre-delete existing objects in layer: when enabled, any objects already in the assigned layer will be deleted prior to export.

Export object type

  • Point helpers: exports particles as point helper objects.

  • Meshes: exports particles as editable meshes.

  • Reference Objects: exports particles as duplicates of a reference object taken from the listbox (chosen at random).

  • Copy/Instance: controls whether reference object duplicates will be copies or instances.

  • Include children: controls whether the hierarchies of input reference objects will be copied/instances along with the base input reference object.

If ‘include children’ is enabled, object export may be considerably slower.

Export Settings

  • Animate transforms: controls whether the transforms of the exported objects will be animated to match the motion of their corresponding particles.

  • Subframe keys: when enabled, keys will be generated on subframes if simulation time step set to a value of less than 1 frame.

  • Key tangent type: controls which tangent type is assigned to position/rotation keys generated during export.

  • Curve out-of-range type: controls which out-of-range type is assigned to position/rotation animation curves generated during export.

  • Always create new objects each export: each time objects are exported, new scene nodes will be created for all of them.

  • Use previously exported objects if found: if objects were previously exported in the scene, they will be updated during export. Otherwise if such previously-created objects are not found, new ones will be created.

  • Export ID: the export ID is an arbitrary numerical value assigned to exported objects, to help the operator track them.

In order for the operator to track exported objects (for later update), it assigns newly exported objects a tracking code. This code can be viewed in the exported object’s user properties. An example code might look something like this: “tfExport_10791161940 = 26” and takes the form of “tfExport[operator_uniqueid][export_id] = [particle_id]”

Reference object

  • List index from cust float: controls whether the reference object for a particular particle will be chosen from the reference objects list at random, or by an index derived from the specified custom float channel.

List index values are 0-based. Values greater or equal to the number of reference objects in the list will be looped back around with a modulus operation [list index = list index % reference object count]

  • Channel: the custom float data channel.

Object ID

  • Object ID from cust float: controls whether output objects will be assigned an Object ID value taken from a particle’s custom float data channel.

  • Channel: the custom float data channel.

Lights

These controls apply to reference objects which are lights (supports standard lights and VRay lights)

  • Intensity from cust float: controls whether the intensity value of the lights will be controlled be particle custom float data.

  • Channel: the custom float data channel.

  • Multiplier: an extra multiplier applied to custom float data values.

Pre-born/deleted/ignored

  • Scale to size: exported objects that do not have a corresponding particle at a particular frame will have their transform’s scale keyframed to the specified size at that frame.

  • Intensity to zero (lights): exported lights that do not have a corresponding particle at a particular frame will have their intensity animated to zero at that frame.

  • Visibility to zero: exported objects that do not have a corresponding particle at a particular frame will have their visiblity keyframed to zero at that frame.

Limiter

  • Minimum scale: when enabled, controls the minimum scale magnitude a particle’s transform can be assigned for any given frame.

Limits

  • Max objects: controls the maximum number of objects that will be exported.

  • Sort: ID: sorts particles by their birth ID;

  • Sort: life: sorts particles from oldest to youngest.

  • Sort: volume: sorts particles from biggest to smallest.

Auto-Export On Render Rollout (Export Objects)

  • Enable auto-export on render: when enabled, objects will be exported when a render begins, and subsequently removed when the render ends.

  • Export even if hidden: when enabled, the export will proceed at rendertime even if the tyFlow scene object containing the export operator is hidden.

  • Ignore ‘max objects’ limit: controls whether the “max objects” setting will be respected, while auto-exporting on render.

Renderers can typically handle many more objects than the viewport. Since the auto-exported objects will be auto-deleted when rendering ends, you don’t have to worry about the viewport slowing to a crawl if you’re exporting huge numbers of particles at rendertime.


PRT Settings Rollout

This rollout is exposed when the Export Particles operator is set to “PRT” mode.

Output

  • Filename: the output filename for the resulting PRT file sequence.

  • Skip existing files: partitions will be skipped if all of their files already exist (and no flow update for that partition will occur). Individual files of an incomplete partition will be skipped if they already exist (but the flow will still need to update for the rest of the partition due to its history-dependent nature).

Channels

  • [Channel name - data type]: lists the available channels to save in the PRT files, and their corresponding data type.

Data types and their corresponding size in bytes:
byte = 1 byte
int16 = 2 bytes
int32 = 4 bytes
float16 = 2 bytes
float32 = 4 bytes

The number in square brackets next to some data types represents the number of values that must be stored for that particular channel. For example, a position channel requires X/Y/Z values, each of which is stored as a float32 data type. So the size in bytes for a particular particle position value is 12 bytes (float32 x 3 values).

Export

  • Total partitions: sets the total number of partitions to be demarcated in the PRT filename.

  • Export All/Range: controls whether to export all partitions, or a range of partitions.

A PRT file’s filename is important, when loading it into a Thinkbox PRTLoader object. Partitions are identified using “partXXofXX” syntax. By keeping the “total partitions” value high, but only exporting a small range of partitions, you can easily add to that range later without creating incompatible filenames. For example, setting “total partitions” to 100 and setting the export range to “1 to 2” will create files marked as “part01of100” and “part02of100” which will be recognized as two partitions of the same sequence by a PRTLoader. Later you could set the export range to “3 to 3” which would create files marked as “part03of100”, etc.

However, if (in that example) you set the total number of partitions to 2, your initial files would be marked as “part01of02” and “part02of02”. Later setting the range to “3 to 3” would create files marked “part03of03” which would not be considered part of the same sequence as the prior two partitions, by a PRTLoader.

Therefore, it’s best to keep the value of “total partitions” high, even if you don’t plan on exporting the entire partition range, in order to allow for future increases of the desired partition range within the same sequence.

By default, all seed values in a flow will be re-seeded during a PRT partition export (for all partitions except for the first partition), in order to randomize particle properties between partitions. If you wish to exclude an operator from the reseeding, simply add the keyword “noseed” to its name. For example, rename “Position Object” to “Position Object noseed”.


tyCache Settings Rollout

This rollout is exposed when the Export Particles operator is set to “tyCache” mode.

Output

  • Filename: the output filename for the resulting tyCache file sequence.

Channels

  • [Channel name - data type]: lists the available channels to save in the tyCache files, and their corresponding data type.

Data types and their corresponding size in bytes:
byte = 1 byte
int16 = 2 bytes
int32 = 4 bytes
float16 = 2 bytes
float32 = 4 bytes

The number in square brackets next to some data types represents the number of values that must be stored for that particular channel. For example, a position channel requires X/Y/Z values, each of which is stored as a float32 data type. So the size in bytes for a particular particle position value is 12 bytes (float32 x 3 values).

Mapping values are stored as a float32[3] x the number of mapping channels assigned to the particle.

Mesh file

  • Backup at regular intervals: controls whether or not the mesh file of the cache (xxx_tyMesh.tyc) will be updated at regular intervals throughout the export process.

  • Seconds between backups: controls the number of seconds that must elapse during export before a mesh file backup will occur.

By default, tyCache mesh files are generated at the end of a tyCache export. If a tyCache export fails (for example: crashes due to lack of available RAM) before the accompanying mesh file is created, you will not be able to load the partial cache. Enabling this option will regularly update the mesh file, so that even if the export fails you may still be able to load the partial cache.

For simulations with a lot of unique meshes, the mesh file can get quite large. In those cases, the regular mesh file backups may take a considerable portion of the overall export time. In those cases, it is recommended to disable mesh file backups if you are confident that your export will complete successfully, as then the mesh file export will only need to happen once.

Post-export action

  • Create tyCache object: controls whether a tyCache object will be created in the scene if the tyCache exporter completes successfully. Its input file sequence will be set to the output sequence of the current exporter, and it will get its material and layer name from the current flow.

  • Only if not already created: a new tyCache object will only be created, if an existing one using the exporter’s output sequence as its input does not already exist. If one already exists, it will simply be updated.

Export layer

  • Name: defines the name of the layer that created tyCache objects will be assigned to.

Geometry Settings Rollout

This rollout is exposed when the Export Particles operator is set to “tyCache” mode.

Geometry

  • Include cloth geo: cloth geometry generated with Cloth Bind operators will be added to the cache on a per-frame basis.

  • Include actor skinned meshes: skinned meshes imported with Actor operators will be added to the cache on a per-frame basis.

  • By ID: when enabled, only actors with a matching ID will be exported.

  • Include terrain geometry: Terrain meshes created with Terrain to Mesh operators will be added to the cache on a per-frame basis.

  • Include VDB geometry: VDB meshes created with VDB operators will be added to the cache on a per-frame basis.

  • Include spline paths geometry: geometry created with Spline Paths operators (with appropriate tySplineMesher modifiers assigned) will be added to the cache on a per-frame basis.

  • Include dependent tyMesher geometry: tyMesher objects which include this tyFlow object as an input node will be added to the cache on a per-frame basis.

By default, 3ds Max won’t allow you to add a dependent tyMesher to the additional geometry list by reference (due to the circular dependency formed by a tyFlow-referencing-a-tyMesher-referencing-a-tyFlow). Enabling the “include dependent tyMesher geo” option allows you to circumvent this problem.

  • Include additional geometry: allows you to include additional geometry which will be added to the cache on a per-frame basis.

Additional geometry

  • Object list: list of additional objects whose geometry will be included in the cache.

An Export Particles operator in “event” export mode that is set to include cloth/actor/spline/additional geometry will include all additional geometry (corresponding to those checkboxes) created by the flow - not merely the additional geometry created by its event. This limitation may be subject to change in the future.

  • Activate render-only modifiers: when enabled, render-only modifiers on additional geometry included for export will be enabled during export.

This rollout is exposed when the Export Particles operator is set to “tyCache (splines)” mode.

Output

  • Filename: the output filename for the resulting tyCache file sequence.

Post-export action

  • Create tyCache object: controls whether a tyCache object will be created in the scene if the tyCache exporter completes successfully. Its input file sequence will be set to the output sequence of the current exporter, and it will get its material and layer name from the current flow.

  • Only if not already created: a new tyCache object will only be created, if an existing one using the exporter’s output sequence as its input does not already exist. If one already exists, it will simply be updated.

Export layer

  • Name: defines the name of the layer that created tyCache objects will be assigned to.

Geometry Settings Rollout

This rollout is exposed when the Export Particles operator is set to “tyCache (splines)” mode.

Geometry

  • Include Spline Paths operators: splines created with Spline Paths operators will be added to the tyCache on a per-frame basis.

  • By ID: when enabled, only Spline Paths operators with a matching export ID will be added to the tyCache.

  • Include additional splines: allows you to include additional splines which will be added to the tyCache on a per-frame basis.

Additional splines

  • Object list: list of additional objects whose spline will be included in the tyCache.

An Export Particles operator in “event” export mode that is set to include spline geometry will include all additional geometry (corresponding to those checkboxes) created by the flow - not merely the additional geometry created by its event. This limitation may be subject to change in the future.


Alembic Point Cloud Settings Rollout

Output

This rollout is exposed when the Export Particles operator is set to “Alembic Point Cloud” mode.

  • Filename: the output filename for the resulting Alembic file.

World coordinates

  • Y-Up: exports particles with Y-Up (left-handed) coordinates.

  • Z-Up: exports particles with Z-Up (right-handed) coordinates.

Y-Up coordinates are used in packages like Maya, Houdini, Unity, etc. Z-Up coordinates are 3ds Max’s default coordinates.

Secondary mapping coordinates

Secondary mapping coordinates are any mapping coordinates not assigned to channel 1. Alembic’s native mesh schema expects only UV (not UVW) coordinates for channel 1. If you need to preserve W values for a mapping channel, enable “UVW” as the secondary mapping coordinate type and make sure the map data you want to export is assigned to a map channel other than 1.

  • UV (Vector): exports secondary mapping coordinates without the W value (legacy).

  • UVW (Vector): exports secondary mapping coordinates as full UVW values.

  • UVW (Color): exports secondary mapping coordinates as full UVW color values.

Channels

  • [Channel name]: lists the available channels to save in the Alembic file

The “widths” channel, despite not directly corresponding to any common tyFlow particle metric, is included in order to maximize Alembic compatibility with other software (“widths” is a default particle cloud channel within the Alembic SDK). Some software packages look for the “widths” channel in Alembic files and treat it as a measure of uniform particle scale. From tyFlow, “widths” are simply treated as double the particle radius (ie, diameter).

  • [Channel name string]: specifies how a channel will be labeled in the Alembic file.

  • [Position] Include pivot offsets: when enabled, particle positions will be combined with particle pivot offset values to give a final position that represents the combination of both. Disable this setting to export only the raw particle position values that don’t include changes made to particle pivot locations.

  • [Rotation] Quat/Matrix3x3: controls how orientation data is saved.

Quat (quaternion) mode is the traditional method, whereas Matrix3x3 mode is what’s used by Cinema4D.

  • [Widths] default value: when enabled, all saved “widths” values will be 1.

Some packages expect particle widths values to exist, but will also multiply them by any imported scale values. To avoid doubling-up width and scale values on import, you can choose to save all widths values as 1, by enabling “default value”. That will effectively result in only scale values affecting particles.


Alembic Mesh Settings Rollout

The Alembic format has evolved over time and not all Alembic importers can properly interpret data exported using the latest Alembic SDK and its various documented methods. Since tyFlow uses the latest Alembic SDK, this means that Alembic data exported from tyFlow may not be compatible with all importers.

3ds max: 3ds Max’s Alembic importer uses legacy code that was originally part of the Exocortex plugin suite. In some versions of 3ds Max it is outdated, and does not support important attributes like proper material ID assignments on changing topology. To export Alembic data compatible with 3ds Max’s legacy importer, you should export using 3ds Max’s own exporter, not the Export Particles operator. Make sure your particles are properly converted to meshes using a Mesh operator before exporting. You should also place a default “Edit Mesh” modifier on your tyFlow object so the exporter recognizes it as regular geometry. To import tyFlow’s exported Alembic data into 3ds Max, you should use an updated importer, like the one included in VRay Proxy objects, which fully supports changing topology. If you use an updated importer, you can export tyFlow particles straight from an Export Particles operator. If you use a legacy importer, you need to use the legacy exporter to ensure compatibility.

Maya: Maya’s Alembic importer not only relies on legacy Exocortex code too, but it has a buggy implementation which will fail to load tyFlow Alembic data or may even crash while attempting to load it. Either export using Max’s legacy Alembic exporter (which is compatible with Maya’s legacy importer, as long as you follow the legacy export steps listed above), or import into Maya using a VRay Proxy object as the importer.

Unreal Engine: Unreal can import tyFlow’s exported Alembic data so long as it does not include empty frames which contain no geometry (otherwise it may fail to load the data or freeze during playback). For compatibility with Unreal Engine, enable the “no empty frames” checkbox and the “material ID face sets” checkbox in the Export Particles operator. When those are enabled tyFlow will automatically add an infinitesimally small triangle to the cache at all frames, which will prevent Unreal from crashing during playback when no other geometry exists in the cache, and tyFlow will also export material IDs in a way that Unreal Engine understands (as separate face sets instead of mesh attributes). When importing into Unreal, choose “geometry cache” mode, set sampling type to “per time step” and set the time step to [1/framerate]. So, for example, for a 30fps sequence, set the time step to 0.0333333.

Output

This rollout is exposed when the Export Particles operator is set to “Alembic Mesh” mode.

  • Filename: the output filename for the resulting Alembic file.

Mode

  • Single collapsed mesh: all meshes will be combined and exported on a per-frame basis. This will usually create extremely large files.

  • Node per particle: when possible, meshes will be exported once a per-file basis and only transforms will be updated on a per-frame basis. This results in much smaller file sizes and more efficient loading of particle data.

Coordinates

  • Y-Up: exports particles with Y-Up (left-handed) coordinates.

  • Z-Up: exports particles with Z-Up (right-handed) coordinates.

Y-Up coordinates are used in packages like Maya, Houdini, Unity, etc. Z-Up coordinates are 3ds Max’s default coordinates.

Compatibility

  • Swap face vert order (implicit normal flip): swaps the winding order of faces from CCW to CW. This implicitly flips normals, if the explicit normals are not read by the importing application.

  • Flip explicit normals: flips explicit normals. If the importing application reads explicit normals, this overrides face vertex order.

  • Material ID face sets: exports material IDs as face sets (compatible with Unreal Engine), instead of direct mesh attributes.

  • No empty frames: ensures every frame in the Alembic file contains at least one mesh (ensures compatibility with Unreal Engine).


VRay Proxy Settings Rollout

This rollout is exposed when the Export Particles operator is set to “VRay Proxy” mode

Output

  • Filename: the output filename for the resulting VRay Proxy file.

The Vray Proxy exporter does not use any internal tyFlow routines to generate VRay proxies. It just runs the exporter that comes with VRay. This means that the exporter will only export particle meshes that are explicitly generated with a Mesh operator, and that it will ignore viewport instances. So, in order for the VRay exporter to export particle meshes, you must add Mesh operators in applicable places throughout your flow, which are set to generate proper non-render-only meshes.