MegaCache - Object & Particle Sequence Playback [Released]


Introduction
MegaCache is an editor extension of for the Unity game engine, it allows you to import cached animated mesh geometry regardless of the topology, vertex count, material use etc of each mesh in the cached sequence as well as importing Particle systems exported from 3d packages. The system can accept a sequence of OBJ files where each file can have a number of objects all with different materials, MegaCache will import the sequence of files merging multiple objects and material sub meshes into a single mesh object for you, you can then play back the imported sequence either by asking the system to directly change the mesh using its stored list of generated meshes, or the sequence can be read from a generated cache file, or finally be read from a memory based image file. Play back of the animation is blazingly fast no matter which option you choose with the system making use of multiple threads where possible to further increase performance. You can also tell MegaCache to optimize the data that is imported reducing the memory use to under a 1/3rd of storing raw mesh data.

MegaCache is perfect for exporting complex animated meshes that are not possible to recreate using skin and bones, such as fluid simulations, fracturing objects, cloth simulations or anything where the vertex count, face count, materials etc change during the course of the animation. It is also perfect for playing back complex animations made using modifiers or deformers in 3d packages, all the animation can be baked down to a sequence of frames using standard OBJ sequence exporters which are available for all the 3d packages.

Included in the system are components to allow the import of a sequence of OBJ files and play those back as well as an OBJ reference component where multiple objects can playback a sequence from an already loaded source so dozens of objects can all be sharing the same data but playing back at different speeds or positions. Also included are components to playback imported particle simulations either on the Unity Shuriken particle system or the Legacy system.


Particle Simulations
As well as importing sequences of Mesh geometry MegaCache can also import and playback particle systems such as Particle Flow simulations from 3ds max. Again the system will optimize the memory use for imported simulation and gives you complete control over the playback of the particles, selecting emit rate, scales, speeds etc and works alongside the existing Unity Shuriken and Legacy particle systems allowing you to add even more detail to the finished particle animation.

Particle Exporters
At release we have available an exporter for 3ds max to exporter Particle Flow simulations, we also have a beta Maya exporter for Maya particle system exporting, please note the Maya plugin is still a work in progress and does not yet support all the features. If you require the exporters please get in touch with the invoice number for your purchase and we will send the exporter of to you. MegaCache now also supports the Maya .pda particle cache file format for the direct importing of Maya Particle systems.

Features

  • Import OBJ file sequences
  • Import Particle systems
  • Point Cloud Import
  • Support Maya .pda particle files
  • 3DS Max particle exporter
  • Blender particle exporter
  • Blazingly fast playback
  • Optimized memory use
  • Merge multiple objects
  • Playback from file or memory
  • Multi threaded code
  • Full Source Code Included
  • Works on all Platforms
  • Works in Unity Free

Example Videos
This video shows the Object cache system playing back a fluids simulation as well as a fracturing object animation.

This video shows the worfklow of exporting a sequence of OBJ files from a 3d package, in this case 3ds Max, and then importing them into Unity using the MegaCache OBJ system.

The next video shows a Particle Flow system being exported from Max and Used in Unity.

Available Now

MegaCache is available now on the AssetStore or on our Website for the early adopter price of $50

Another great looking system Chris, so can I check that the OBJ cache will allow me to play back an animation of a bunch of objects with multi materials where the vertex and poly counts and even material count change from frame to frame, so for example I had a cube with 6 materials that I blow up in max so that the next frame has a dozen fragments where a new material has been introduced for the internal fracture faces, that would work fine? That is what I really need to make use of the RayFire plugin I have for Max to play back my destruction animations.

That would work fine, it doesn’t matter how the vertex or poly count changes for each frame in the sequence, also it doesn’t matter if every frame has different materials the system will import and combine those with no problems, it will even merge multiple objects into a single object for you as well, so it should easily handle anything you can throw at it.

How does this version differ from the included version in megafiers?

Any chance MegaCache can be used to load point cloud data? I recently picked up a Project Tango tablet and am exploring ways to visualize XYZij files. Thanks.

@DrewMedina - The basic version in MegaFiers will just import OBJ sequences, it will not import particle animations and any further options added to the system will be for MegaCache only, so as we get feature requests or support other file types etc they will only appear in MegaCache.

@contempt - Should be easy enough to add support for point clouds, will take a look at the file format and see what can be done. Most likely could be linked into the Particle system for the best display options for each point. Do you have an example XYZij file?

Just submitted a small update to the Asset Store, this has added the option to update a mesh collider, if present, for the Object Cache and Object Cache ref objects, please note that to update Mesh Colliders in Unity is a slow process so it may be too slow for complex meshes. Also added a runtime folder option for cache files, so if you need to use cache files loaded at runtime you specify the folder in the inspector and after building place the cache files you used in that folder for the system to be able to read them in at runtime.

Changes in v1.02

  • Added option to update mesh collider for Object Cache.
  • Added option to update mesh collider for Object Cache Ref.
  • Added a runtime folder option for OBJ Cache files, cache files for standalone builds need to be copied the data folder for the build after the Unity build.

Here is some info about the format from Google’s Project Tango docs:

I’ll post a sample file when I get in to the office today. Thanks!

Thanks for the link, I don’t have access to any device that would generate the data so would need a file or two to test with.

Sorry apparently there is no export option in the current builds provided by Google, I have to modify the source to generate the .xyzij file. I’ve almost got it working…

Just a quite note to say there was a small problem in the last version in the demo scene the data source for the Cache Object was set to File by mistake so the demo scene was looking for a cache file so the scene would not play correctly, submitted a new version where the data source is correctly set to ‘Image’ so the cache data is stored on the object so it will play back correctly. Sorry about that.

Just submitted a very small update to the Asset Store to fix a bug with the particle importer expecting files with a .txt extension whereas the Particle exporter uses the .prt extension.

Another small update has been submitted, this fixes a couple of issues int he Particle Inspectors and also we have added a beta exporter for Blender allowing the export of particle systems from Blender to be used with MegaCache.

Changes since v1.02

  • Fixed bug in Particle Inspector
  • Fixed bug in Legacy Particle Inspector
  • Added a beta exporter for Blender to export Blender particle systems to MegaCache prt format.
  • Fixed bug with particle importers wanting .txt extension instead of .prt generated by the Max exporter.
  • Demo scene was saved using a file as a data source which would not work without the cache file. Demo scene now uses an ‘Image’ data source.

Just submitted an update to the Asset Store, this adds a beta of a new component that can import CSV point cloud data to be displayed by a particle system, so can display Lidar style data. The csv format is the basic x,y,z,intensity values, you can load a sequence of csv files and have them playback via a particle system. The component is in beta so let us know what features need to be added and possibly other point cloud file formats we can support. To use the new component create a Point Cloud object from the GameObject/MegaCache menu, add a Particle system component. Then import your files using the Import Data section of the Point Cloud Inspector by setting your first frame and last frame and naming, then click the Import button and select any file in your sequence, the system will then import all the data. In the inspector you will see the value for the Max number of particles in a frame, set the Max Particles value in the Particle system to that value or higher and that’s it, When you press play you will see the point cloud data. You may need to adjust the import scaling values depending on your scene settings, there are scale options to adjust the cloud size at playback as well.

Also MegaCache is fully compatible with Unity 5.

Example Point Cloud
The new Point Cloud playing back a Point Cloud animation with over 12,000 points per frame.

Changes in v1.06

  • Smoke in demo scene working correctly.
  • Added a beta of a new Point Cloud import and playback system.
  • Works with Unity 5

Oh man you rock!!! I’m going to test this right now!!!

Just submitted a Unity 5 version to the store so that 5 users no longer get a warning when downloading the asset.

Another quick update submitted to the Asset Store, this sees the addition of a beta of a new particle playback component that is designed for playing back discreet one shot particle simulations for example explosions, the existing particle system is designed for playing back continuous emissions such as smoke and dust simulations.

Changes since v1.06

  • Added option to particle import to remove particles alive in last frame from import.
  • Improved particle importer to remove particles that only have one frame of data.
  • Added a new Particle Playback component for direct particle playback as opposed to the emitter version, means one shot effects like explosions etc can be used as opposed to constant effects like smoke.
  • Added playback component for legacy particles as well.
  • Removed the unused function LoadTexture which was causing a compile error when building for webplayer.
  • Fully Unity 5 compatible.

I know you don’t have to use the same number of vertices for this, but if you were to use models with the same number of vertices is there any difference in performance between using Mega Cache and using Mega Fires point cache vertex animation?

If you use the raw mesh data source for the playback then MegaCache will be a lot faster than the Point Cache in MegaFiers since all it is doing is changing a mesh pointer each update instead of updating an array of vertices. Using the other data sources ie cache file or image will be similar performance as that will be updating vertices.

The new particle playback system is great, was wondering how to get my explosion effects working with the system but the latest update added just what I needed, thanks so much again for your great assets and listening to the needs of the users, can’t wait to see what you release next :slight_smile: MegaMesh? MegaCar? MegaSpring?