The MegaCache Particle system allows you export particle systems from 3d packages and import them into Unity, you can control the scale, speed and emit rate of the system as it plays back either system wide or per particle. The system works alongside the Shuriken values so you can make use of the features in that to further enhance the imported simulation. The imported data is optimized and compressed to make playback of the simulation very fast, and you can also select a source object to be able to share the cached data so keeping memory use as low as possible. There is also a version of this system for the Legacy particle system in Unity.
How to Use
To use the particle system you would first have created your simulation in 3ds max or Maya (support for other systems coming soon) and exported it to a cache file using one of our exporters. Next in Unity goto the GameObject/Create Other/MegaCache menu and select the Particle Pro option, this will create a new game object in the scene with the component attached, or you can add the component directly to any object or to an object with a Shuriken Particle system on it.
If you have not attached the component to a particle system then select the one using the Particle System option in the inspector, you should then set the Max Particles value to match that of the particle system you just selected. Depending on the settings you have in the 3d package that created the particle system you may need to set the Import Scale option, if when you import the particle simulation it is too big or small then adjust the Import Scale value and reimport the file. Click the Import Particle Cache button and select the cache file generated by the exporter, the system will then load all the data. You can change the Import settings if you know you dont need parts of the saved data, so if you just need the positions then uncheck the other options, this will keep the memory use as low as possible. Finally make sure the Simulation Space is set to world for correct behaviour.
You are now ready to have the system play back, when you press play the particles will start to play back the saved simulation, if you turn of the emit option on the Shuriken settings and check the Use Emit Rate then you can control the emission of particles from the this component. You can ask the system to pre warm the simulation, and you can adjust the overall scale and play back speed of the simulation as well as the speed and scale for newly emitted particles.
When you are happy with how the particle system works you can click the Save Particle Cache File to save an optimized version of the simulation data for quicker loading or you can load a pre saved file.
It could be that you want to have more than one copy of the particle simulation in your scene, creating a whole new system and importing the same data would waste a lot of memory, so you can just add the component and then select a MegaCache particle system that already exists in the scene, the component will then use the data on that object as well allowing you to have lots of particle system without the memory overhead.
Description of the params for the MegaCache Particle system.
Use this to select the particle system that will be displaying the simulation, if you have attached the component to an object that has a Shuriken particle system attached then the system will find that if you leave this as None.
Set this value to the same as the Max Particles setting in the Shuriken inspector.
This will scale the data as it is imported, if you find the simulation to be too big or small then change this value and reimport the data.
Data Import Options
Allows you to select which data is imported from the cache file. Position data is always imported.
Import the velocity data, currently velocity data is not used so is not required but future systems may make use of it.
Import the rotation data, Unity can only have a single rotation on its particles so you can pick the axis to use with the Rot Axis below. If not imported then the Shuriken values are used.
Import the scale data, this is needed to make the particles change size during the simulation, if not imported then the Shuriken values are used.
Import the spin data, not currently used by may be in the future.
Import Particle Cache
Click this button to open a file select dialog to choose the particle cache file to import.
Save Data Options
Options for data to save to the cache file.
Check this to tell the system to compress and optimize the data for greatly reduced memory use.
Save the velocity data to the cache file.
Save the rotation data to the cache file.
Save the Scale data to the cache file.
Save the Spin data to the cache file.
Save Particle Cache File
Click to save the data to a custom cache file, the data will be compressed and optimized if the Optimize setting is checked above.
Load MegaCache File
Load a pre-saved cache file.
Some info such as memory use for the currently loaded particle simulation.
Cache Data Src
You can tell the system to use the cache data that is already loaded to another particle system, select the object here.
You can ask the system to show the paths of the particles in the system so you can get a feel for the size and look of the system in the editor.
Showing all the particles could make the editor too slow, so you can ask the system to show every nth particle by changing this value.
When drawing the paths the system will draw every step, this could be too slow so you can adjust the steps between line draws by increasing this value.
The color of the lines to draw.
The overall speed of the playback of the simulation, the higher the value the faster the playback, 0 will freeze the simulation and a negative value will play the simulation backwards.
The overall scale of the particle system, you can at any time change the scale of the entire particle system by changing this value.
It maybe that you want the adjust the scale for only newly emitted particles, say for smoke it can start of small and then get larger over time, changing this value will effect the scale for any new particles emitted.
This will change the size of the particles only.
You can change the speed of the playback for any newly emitted particles by changing this value.
Use Emit Rate
If you turn of the emission on the particle system you can control the emit rate by turning this on and changing the Emit Rate value below, with this off then the emission will be controlled from the Particle system.
How many particles a second to emit.
Tell the system to pre warm the particles so they will appear in the scene at start instead of starting from nothing.
The axis to use in the rotation value.