Point Cache 2 exporter

Point Cache is a simple vertex animation format, that’s used frequently in 3DS Max, and I think it’s used in Maya too. It’s a way of baking animation to a file, in the form of vertex locations, that can then be later streamed off disk, that can help not only for things like speeding up complex rig deformation playback, but also for i/o of animation data.

While the FBX export is far superior when you want to export a rig with armature (since you can actually manipulate it after the fact) the deformations won’t necessarily give the same results (i.e. Blender’s Quaternion deformation), and only mesh/armature deformation is supported. Using a point cache isn’t editable, but it can exactly support any kind of animation, on any kind of object, so long as the topology or vertex count/order doesn’t change between frames.

The Point Cache format just contains vertex positions, so to bring your animated mesh into another application, such as 3DS Max, you will also need to export the mesh itself in another format such as OBJ.

For use in Max, import the OBJ into Max with the standard File->Import, then add a Point Cache modifier, click ‘Load’, and open the point cache file.

Two screenshots, one in Blender of an animated bevelled curve object, being deformed by two hooks, and the same in Max with the Point Cache modifier:

http://mke3.net/projects/bpython/pointcache/pc_curve_blender.png
http://mke3.net/projects/bpython/pointcache/pc_curve_max.png

Movie of an animated mesh object in Blender, also being deformed by a lattice and hooks, and the same in Max:


And the script!

cheers

1 Like

Thanks Broken!!!:smiley:

Wonderful! Very simple and usefull! :yes:

I know there is a .mdd exporter and importer for blender, but this is cool: .pc2 is the way to go.

But what you think about an object modifier in Blender reading this bakeds.pc2 and .mdd files in the fly, with time interpolation like Point Oven and Lightwave?

And a script that converts a whole scene from Blender into a .lws (scene with camera animation), .lwo (objects) and .mdd (baked motion) to lightwave wolud be a dream!!! :smiley:

he, he, he! lightwave render is very nice and a converter to LW would atract A LOT of unhappy LW users with our beloved software (I´m a LW user too…:o)

Both communities woud be very happy!

Thanks broken!

I’d really like to see this too. There’s been a little bit of talk about a ‘bake modifier’ for use with the physics tools like particles/softbodies. If this happens, I think it should be easy to make it read MDD/PC2 files.

And a script that converts a whole scene from Blender into a .lws

Hah, that sounds like quite an enormous project, and I wouldn’t expect anyone here to be working on it any time soon. I don’t use Lightwave, I made the point cache exporter for getting animation into 3DS Max, which we use alongside Blender at the studio I work at.

cheers and glad someone else will find this useful

Nice one, Broken… This would probably be a good way to get a fluid sim into Maxya.

Just to clarify, is it possible to use point cache files on meshes in Blender? That would be great.

Thanks again.

Actually it wouldn’t, since fluidsim meshes change topology and vertex count quite drastically. Point Cache/MDD etc require the mesh’s topology to be consistent - so the format just contains the locations of those same vertices on different frames.

Just to clarify, is it possible to use point cache files on meshes in Blender? That would be great.

No, not at the moment. There’s been a bit of talk about that sort of thing though in the form of a ‘bake modifier’ (see my post above).

Hi, thanks for your script.

I’m trying to use this in more advanced animations; Exported the object in .OBJ and its
vertex animations in point cache 2.

But 3ds max, doesnt seem to apply it to the file, the object gets all messed up. Its like, the vertices just go crazy all over the screen, like a spider web, but even more complex then that.

:slight_smile:

Since I was curious about this, I tested it, in Softimage XSI foundation and works great (in this case refearing as MDD, not the same but… since 3Ds Max sucks… I was just testing blender out )

Hi,

It’s probably because the vertex order got messed up along the way. Try exporting the OBJ with the ‘Morph Target’ option on, this should preserve the same vertex order.

cheers

PS. I also did an importer as well ( http://mke3.net/projects/bpython/pointcache/import_pc2.py )

A great one for Me, in my personal (animation shorts) and professionals ( ilion studios) pipelines
I use the mesh caches a lot, not only between two 3D programs, also is good with the same 3D program in the pipeline of a big studio, really useful.

Thanks a lot :slight_smile:

Daniel

Glad you like it! I’m interested to know if there are any issues with the importer, since I haven’t tested it that thoroughly myself. It should be fine, but hey :slight_smile:

I have the same problems, no luck with ‘Morph Target’ option, same result with fbx
Here is the file http://www.daniel3d.com/pepeland/misc/3dstuff/blender/to_export.blend.
I tried with blender snv and XP (if help)

I was studding the script, It would be difficult that the scripts export and import the new
common cache files of Max 2008 and Maya 2008 (XML file + .mc format)?

Daniel

Hi again,
tryed with diferent methods, no luck. Though, doing the same with a diferent program, like the one I mentioned before, XSI, in this case in MDD format, it works great.

*Hehehehe, really funny, having the same issue as Pepe :smiley: That his work I’m fan of! Holla from Portugal! =D

I’ve opened the file Pepe left as example, tryed it, it doesnt work too, Max gets that really strange behavior - The Infamous Spiiiiiider weeeeebb!!! =D Lol This kind of behaviours (strange) allways happens with Autodesk software, they really like to complicate :smiley:

Heres a Screenshot (I tryed to exagerate a lil bit…hehehe):

http://imagebin.ca/view/QQrOrAAe.html

Tks for your time and atention about this Broken ;D

Weird… What version of Max are you two using?

We’ve got Max 9 at work, and that’s what I tested on. I haven’t used it in a while, perhaps something Blender changed? I’ll give it another try back there on Monday.

Doing an updated point cache format should be pretty easy, although I have no Max/Maya 2008 to test it on. I’m happy to accept donations :stuck_out_tongue: Do you know where I can find the format specification? Though I’m not sure if that will fix the vertex order stuff either…

Hi Broken!

I’m using Max9, I’m not a Max user though, I’m just using it, for testing, etc. This is really important, since, to work with other people, with diferent packages, I could keep using Blender for animation, etc

I dont have any information about the specification of the file format, but:

http://www.ef9.com/ef9/PO1.5/Max/PointOven_max.html
http://www.ef9.com/ef9/PO1.5/PointOven_15.html

I dont know if this helps or not, but thats what I’ve found around. Sorry about bothering you about this issue :slight_smile:

I’ve downloaded Blender 2.43, and tryed with Pepe example, but still, the same issue.
Also tryed to find information about the file specification, but I cant find any!

I dont know if this can help, but theres a few Point cache managers, developed
to work with xsi, maya, 3ds max 8, etc:

http://www.kai-wolter.com/

Using the tools provided in that site, I mean, the XSI addon, I’ve started by (from Pepe example above):

  1. Exporting .MDD & .OBJ from Blender 2.43 (.45 works also)

  2. Importing .OBJ & its .MDD, into XSI 6 - Works great!

  3. In XSI 6, using the Point Cache Manager, I’ve exported/translated/converted (from .MDD) to .PC2 format
    http://filebin.ca/rpatzn/XSI_MDD_to_pc2__to_export_OBJ_fromBlender.pc2

  4. Imported .OBJ & .PC2, into 3DS MAX 9 - Works great!

http://filebin.ca/sehe/to_export_OBJ_fromBlender.obj
http://filebin.ca/rpatzn/XSI_MDD_to_pc2__to_export_OBJ_fromBlender.pc2



I’ll try to send a email regarding the .PC2 file specification, since you need it Broken, I dont know if he can help us, but i’ll do my best :slight_smile:

Thanks!



I’ve found this info by John Burnett (http://www.footools.com/plugins/docs/PointCache2_README.html or
http://www.maxplugins.de/r6_files/burnett/PointCache2_R6.zip):

.PC2 File Format:

You can create or modify PointCache2 files by hand using the following file format. The start of the file is a header containing: char cacheSignature[12]; // Will be ‘POINTCACHE2’ followed by a trailing null character.
int fileVersion; // Currently 1
int numPoints; // Number of points per sample
float startFrame; // Corresponds to the UI value of the same name.
float sampleRate; // Corresponds to the UI value of the same name.
int numSamples; // Defines how many samples are stored in the file.

EMAIL RESPONSE:

kai:
Hi Helder,
you can find the specification in the html doc of John Burnetts Point
Cache Modifier for Max:
http://www.maxplugins.de/r6_files/burnett/PointCache2_R6.zip
Good luck!

1 Like

any update?
When I import pc2 from blender into max,the vertex of the model mass up…

I remember some 3ds users were having problems with the built in .obj importer(in Max) messing up vert order, I do not have 3ds so I can not test here.I think they were using some third party plugin to get around the issue.

Forget about this exporter.

Yes,this doesn’t work in max,tried with max 8 and max 2008.
There is any way blender user can import/export data(vertex animation)with max?
Tried also fbx,it doesn’t work.
For integrating blender into production pipeline this is not good(I would like to use the wonderful automatic weighting blender has to deform mesh for render them after in max,or to export mesh deformation from max and use blender fur to render meshes that need fur).