XMesh is not saving the Material ID channels that I set in PFlow

Hi,

I am having an issue with XMesh not saving out my PFlow properly. Please see the attached screen grabs below.

I have a PFlow where I am splitting the particles into three different events, each with their own Material ID. When I render the PFlow itself, everything works fine.

When I try to save the pflow as a xmesh, I get the error that is attached. I don’t usually save a pflow out as a XMesh directly, so I’m not sure what I’m missing here?

If I use a Mesher that references the PFlow, and save that as a Xmesh, I don’t get the geometry error, but the Material ID assignments don’t get transferred over properly.

Any help would be appreciated!!


Sharing the actual .MAX scene file would have been helpful. :slight_smile:

Also, the error messages in the log do not match the names of the Events shown in the PFlow screenshot - they reference Events called “100 cube placement” and “Event 028” which do not feature in the flow. Is the log from the same flow you captured? If yes, then that could be a hint that the flow is corrupted, as XMesh is trying to get particle containers from it, and is not finding some of them…

I recreated as small part of your PFlow - basically the Birth plus 3 of the Material ID-assigning events, minus the Age Tests and Lock/Bond + Keep Apart stuff later on.

In short, I got a red+green grid of boxes on a box with Material IDs, and saving the PFlow to XMesh worked exactly as expected, recreating all the material ID assignments including building a Multi/Sub material to host all the sub-materials needed to shade the XMesh the same as the PFlow.

So the basics appear to be ok as far as I can tell, but there seems to be something wrong with your PFlow.

Sorry Bobo, I should’ve figured there’s probably just an issue with my pflow before posting.

I’ll try recreating my pflow with a simple test first and let you know if I still have this issue.

Actually, there wasn’t much of an issue after all. Despite the errors, after another attempt my pflow was successfully saved as an Xmesh with the MatIDs intact.

It turns out that the source of those errors were from another inactive pflow that was in my scene. I had only selected my active pflow for Xmesh export, so I’m not sure why a pflow that isn’t selected for export would trigger those errors.

In any case, luckily everything worked in the end.

It is possible that your active PFlow had some internal references stuck from the other, disabled PFlow. I am not sure how and why that happened.
But in general XMesh goes through every PFlow Event and collects its particles separately (this is why it is possible in the XMesh Saver UI to list PFlow Events as an alternative to a whole PFlow System). Also, if you ask XMesh Saver to save individual objects to XMeshes and pick a PFlow System, it will bake each PFlow Event of that system as a separate XMesh! (I forgot to switch to “One Object as Single Mesh in World Space” mode yesterday, and got exactly that the first time I tested :slight_smile: )

So when you pass an active PFlow System to XMesh to save, internally it asks the scene graph of 3ds Max for all dependent PFlow Events, and it collects their particles’ meshes. If the internal reference system of 3ds Max returns Events from the disabled PFlow because they are reported as somehow connected to the active PFlow being saved, it would explain the error you saw…

Hey Bobo,

Thanks so much for your explanation and suggestions! There definitely must have been something going wrong in my original scene, since I just tried recreating the effect in a fresh scene with both pflow and TyFlow and I was able to successfully export multiple MatIDs with my XMesh.

Thanks for the suggestion about saving different pflow events as different xmeshes. I thought about that as an option here. :smiley:

Privacy | Site terms | Cookie preferences