MegaCache

cache back1

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.
Object Cache
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 as well as a beta exporter for Blender, we also have a beta Maya exporter for Maya particle system exporting, please note the Maya plugin is still a work in progress. 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.

Example Videos

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

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.
Workflow Video

Version History

v1.23
    MegaCache now fully compatible with Unity 5.6
    Changed various importers to work around the Monobehaviour bug for StringReader making importing of files with Unix line endings very very slow.
v1.22
    Fixed a small bug in the 3d rotation of particles in Particle Pro component that could cause an exception on first play.
v1.21
    Optimized particle playback, which will need you to re-import any particle files if rotation is used.
    Fixed maxparticles not being used for Playback particles, so if you had more than the default 1000 particles per frame you would get an error.
    Changed particle importer so it supports prt files with ‘,’ for decimal points.
    Added support for 3d rotation of particles in Unity 5.4 and later.
    Added Progress bar for particle playback importing.
v1.20
    Added option to Particle Playback that is data is already loaded you can choose to add to or replace.
    Made a custom exporter plugin for 3ds max 2017 for faster exporting of large particle systems.
    OBJ Material importer will now create Standard Shader materials instead of Legacy shaders.
    Added an error message when trying to import an OBJ file which contains faces with more than 4 sides, the OBJ importer only supports quads and tris.
v1.19
    MegaCache now fully compatible with Unity 5.5
v1.18
    Added check for PLY files to error if not Ascii format.
    PLY point cloud import now uses a stream the PLY data during import instead of reading whole file into memory, reduced memory required for very very large PLY point clouds.
    General Point Cloud import now also streams during import instead of reading whole file.
    Added Point Cloud and Point Cloud XYZ to the component menus for easier adding to objects.
    Fixed some exceptions with Point Cloud XYZ with empty image files.
    Sped up import of PLY files.
    Particle Skip value now taken into account for PLY data import.
v1.17
    Particle size now takes the startsize from the Particle system into account for more control over the particle size.
    Removed redundant FrameNum slider from Particle Pro component.
    Added option to Particle Pro components to change the Y Up on import, turn on if your particle files are importing on their side.
    Added support for PLY files in the PointCloudXYZ component, just single files supported at this time.
    Added option to Point Cloud components to change the Y Up on import, turn on if your point cloud files are importing on their side.
    Fixed bug that stopped frame number slider working it Show Paths was selected.
v1.16
    Improved the material importer so will use names in mtllib instead of expecting same filenames as obj files.
    Updates for obsolete particle values in the Unity 5.4.
    Note in Unity 5.4 you will get warnings about the Legacy particle system, support for Legacy particles will be removed when Unity 5.5 is released
v1.15
    Option added to force calculation of normals on import, this will override any normals in the OBJ files.
    OBJ files which contain no normals will now have normals calculated on import.
v1.14
    Import filename format now displays the split character in the inspector.
    Material importer now removes any ‘:’ found in the material names, ‘:’ can not be used in asset names in Unity.
    Material importer now defaults alpha value to 1 instead of 0 is alpha component missing, this stops meshes from being invisible after import.
v1.13
    Fixed bug where mesh would not display if multiple materials were found in the OBJ sequence but load materials is not selected.
    Removed Debug.Logs from the import code.
    MegaCache is fully 5.4 compatible.
v1.12
    Fixed the pingpong not working in the Point Cloud animation.
    Added a new Point Cloud Object, this one will read xyzrgb files so you can have colored point cloud particles.
v1.11
    Fixed Layout errors in console when Data Import section in inspector was closed.
    Added new beta feature of importing Maya .pda particle files. Use the MEL command
    dynExport -mnf start -mxf end -os 2 -atr position -atr velocity -atr particleId -atr lifespanPP -p “path” -f “pda” objname;
    Where start and end are the first and last frame of your particle sequence, path is where to save the files and objname is the name of your particle object in Maya
v1.10
    Added missing GetNextFrame() method when target platform is one that does nto support multi threading.
    Fixed error in the OBJ Ref editor script with a missing GUI call.
    Fixed mesh not updating when multiple OBJ ref objects used the same frame data one after the other.
    Made Unity 5.3 compatible
v1.09
    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.
v1.08
    Removed the unused function LoadTexture which was causing a compile error when building for webplayer.
    Fully Unity 5 compatible.
v1.06
    Smoke in demo scene working correctly.
    Added a beta of a new Point Cloud import and playback system.
    Works with Unity 5
v1.05
    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.
v1.04
    Fixed bug with particle importers wanting .txt extension instead of .prt generated by the Max exporter.
v1.03
    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.
v1.02
    Added option to update mesh collider for Object Cache.
    Added option to update mesh collider for Object Cache Ref.
v1.01
    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.
v1.00
    Initial release.