I have been doing some more testing with XMesh. Really awesome so far! I’m curious to know if you have plans to support particle animated materials when you add material support in the future. I have found that XMesh caching my entire thinkingParticles setup to one cache and then reapplying a copy of the TP Multi-sub material to the XMesh loader is actually working quite well for now. Material ID’s don’t seem to display correctly in the viewport, but they do render correctly. The only issue I have so far with that is when I use a material that is changing based on particle parameters such as age or speed, etc then it does not work obviously on the XMesh loader. It would be great if there is some solution for that in the future.
Assigning the TP MultiMaterial to the XMesh should produce the correct results (I am not sure why it wouldn’t show correctly in the viewports, haven’t seen that yet).
Saving and loading the material automatically when creating XMesh sequences and XMesh Loaders is on the wishlist, so it should become easier in the future.
Obviously, some shaders (like the Particle Age map) work (through a very hacky implementation) only with particle systems and XMesh is not a particle system - it does not have Age or LifeSpan channels and even if it had them, its class would not be recognized as particle system by such maps. So I am not sure if we will ever be able to reproduce 100% the rendering of a particle system where the material is changing based on particle data.
But we could support the saving of some of that data with the XMesh sequence (XMesh supports arbitrary data channels, just like Krakatoa’s PRT format does), or copy data into a Vertex channel like one of the 100 mapping channels (we already let you copy the Velocity to a Mapping channel). That would let you create shaders based on particle system data encoded in the XMesh sequence. Eventually, one day I personally hope to see MagmaFlow support for XMesh Loaders where you could wire together custom shaders based on any channels available in the data stream.
Right now, XMesh Saver will only save the channels that it supports explicitly if they are available in the geometry being saved. The only channel the user has control over is the Velocity (you can specify if you want it saved, and you can load it into an arbitrary mapping channel).
The XML-based .XMesh file format supports arbitrary channels though, but we would have to modify the Saver and Loader to support them.
If I may dream a bit, we could add a new class of Geometry Channel Modifiers to our Magma channel editing system currently used in Krakatoa to give you full access to the data. It would be cool to do things like convert the Color Channel to a Selection Channel or the other way round, or generate a new custom named channel and let the XMesh Saver dump it to disk, then read it back by adding a GCM to the XMesh Loader… But this is not on the roadmap yet.