Realflow obj sequence to .bobj fluid cache?

I’m wondering if there is any way to accomplish turning an obj sequence exported from realflow into a .bobj fluid cache that I could then trick blender into loading as a native fluid sim cache. So far I’ve managed to find some old (2.4x) docs on a .bobj import script, but nothing on exporting to .bobj files. I can’t find anything in the API docs either so far so I’m not feeling to hopeful, but I thought I’d try.

All that I really require is a way to export to the .bobj format (which as I understand is a Binary encoded .obj file). I don’t know enough about the internals of these files to write an exporter myself, but I was hoping that there would be something in the API that I could use.

Any ideas? If not I’ll have to resort to a different strategy. I had a go with the a script called meshfoot (https://vimeo.com/64965747) yesterday, and whilst it works well for simpler obj sequences, it stores all of the mesh data in the blend file, which quickly becomes unmanageable for long sequences/complex meshes (tried it on 100 frames of fluid sim data and ended up with a 3GB blend file that was impossible to interact with). If I have to go down a similar route I’ll try a script that only loads the obj for a single frame and dumps the data on frame changes.

I’ll try a script that only loads the obj for a single frame and dumps the data on frame changes.

This was the original approach I took for Meshfoot for Blender and the 3DSMax version of Meshfoot works this way, however due to the slow nature of the OBJ importer in Blender I had to abandon that approach in favor of the “cram it all into memory” approach. The load on frame change probably is possible but do not expect any kind of realistic preview.

Can you get a PC2 or MDD out of Real Flow? If so, the Mesh Cache modifier might be a better approach.

If you can get your realflow data into pc2 or mdd - use Blenders Modifier Mesh Cache.
Not sure if realflows Mesh Sequence format .md acrually is mdd? try it.

Mesh cache isn’t an option unfortunately, as the MDD or PC2 formats requre that vertex order is preserved between frames, which isn’t the case for something like fluid sim data. This is what makes fooling blenders fluid sim into taking the realflow output desirable.

@Atom: I thought that would be the case, from playing with your script it looked like the larger obj’s were taking anything up to around 40 seconds. This would make loading a single obj each frame unusable for realtime playback but so long as I can check a few frames and then just leave it to render, it should suffice.

Another idea i once had would be to somehow convert the obj seq to Blender Fluid Mesh Cache files, those are bobj.gz bvel.gz files. And then fool Blender so it thinks it’s regular Fluid cache… Just an idea…

Just found this. Can’t see if it’s only for particles.

Edit: It seems to be particles only…

@Bashi: Yeah I came across that. Like you say, particles only.

I have tried Atom’s MeshFoot and it does work for getting the RF mesh bin or obj animation into Blender, but as soon as any cache is tried, like exporting to MDD, I get the old ‘number of vertices has changed…’. I was also thinking of the bobj angle as well. Already figured out a bobj importer, but to reverse it back to an exporter, I am wondering about this big integer between the normals and faces. I can get around it on import, but don’t know if Blender needs that value for something. It isn’t in the Wavefront OBJ format definition, which bobj is derived from.
>>>
('vertices: ', 1176)
('normals: ', 1176)
('unknown: ', 1065101349)
('faces: ', 2348)
Done!
>>>