The issue at hand is quite simple: When a SpecialMesh - with MeshType set to FileMesh - is parented to a MeshPart inside a ViewportFrame it renders the MeshPart as an invisible object (it’s there but nothing is rendered).
If this MeshPart were to be converted to a regular Part it would then render; however, not even THIS functions the same as a SpecialMesh parented to a MeshPart located in Workspace. SpecialMeshes have special properties when parented to a MeshPart with an existant MeshId: This is to say that the scale of the SpecialMesh is automatically set to fit within the bounds of the mesh that would be drawn without anything interfering (SpecialMesh overriding the contents of the Instance).
The goal of a ViewportFrame is to display the contents of several instances the same as it would be in Workspace, at least in respect to the whole rendering model. Thus, this introduces some inconsistency and it would be an absolute pleasure to see this fixed as I believe this feature is extremely important for hot-swapping meshes (my specific use-case).
Cheers!
5 Likes
Looks like it’s never supported, it’s also buggy in workspace. Out of curious, could you explain why do you need the parent to be a MeshPart? Thanks.
Yeah I’ve come to find that the special properties of the SpecialMesh seem to be unstable and irregular compared to the rest of the instances (at least contrary to my statements made in the post; for example, when the TextureId of the MeshPart is empty the TextureId of the SpecialMesh does not override the texture of the MeshPart).
Now for the reason why I needed it parented to the MeshPart. It was because SpecialMeshes have no respective scaling to their Parent: However, in the case where the parent is a MeshPart the scaling is - as mentioned in the original posting - automatically scaled down to fit within the bounds of the Parent. Additionally (as mentioned at the bottom of the post), I cannot set the MeshId of a MeshPart during runtime, so I cannot hotswap meshes and keep the same scaling restrictions.
These are my personal reasons but I believed that this was a primary issue and was what the platform supported. Glad to know that I can’t rely on this though.
The unstable behavior is a bug. The mesh doesn’t show up on devices that don’t support instancing. I’ll disable SpecialMesh from rendering in MeshPart so they’ll behave in the same way. For your use case I feel you can pre-create some meshes, save them into storage and hotswap meshes instead of changing MeshId.