Maybe we could ferret out submeshes by watching shader variables?

It seems to be impossible to get at the vertices information for submeshes of Craft models.

What I’ve been trying to suss out is if I could use to watch a parameter inside a shader—in theory, if I could, every time a vertex was passed through a shader I could use the parameter’s callback to store it in a table, thereby ending up with a table full of every vertex in a model, including all the submeshes.

The new craft format for shaders seems to be a little more flexible than the old format, but I haven’t been able to watch any variables inside them, does anyone know if it’s possible?

@UberGoober What model are you trying to get the sub mesh for. Just one name will do, preferably one with a lot of submeshes.

@dave1707 the watercraft I used with your exploding code in the explodeyCraft project is asset.builtin.Watercraft.watercraftPack_003_obj, and if you move the time slider close to zero in that project, you can see that when it explodes it seems like only one submesh is being blown up.

That’s because I couldn’t figure out how to get at the vertex information for the other submeshes (I think).

@UberGoober For that model (003), the mtl file has 5 color groups and the .obj file has 22 mesh groups. So all the information is there, it’s just the code being used isn’t using it all.

@dave1707 it isn’t being used at all because, afaik, the Craft api provides no direct access to submeshes, and I think @John said as much.

If you’ve got a way to do it please share it.

@dave1707 honestly, dave, when you said “ it’s just the code being used isn’t using it all”, you sounded like you knew how to do that, and if you do, I’d really really really like to know how it’s done.

@UberGoober I don’t know. Haven’t really messed around trying to use it all either.