How can a mesh texture be animated?

image
Here are two of the same model, on the left, a normal part using the SpecialMesh instance with a texture on top, and on the right is a normal MeshPart with the same texture too.

What I’d want to achieve is wrapping the texture around the whole mesh, not just 1 side, to then offset it and animate it. This is mainly to be able to do effects similar to other engines, where they are able to load in 1 spritesheet and move it using the UV’s of a mesh.

With multiple images this would work, but it’s very inefficient and in my past attempts, out of every 10 images uploaded, around 2 get rejected by moderation.
I know of other methods for flat spritesheet animations, such as ImageLabels and ImageRectOffset, but I’m specifically looking for what I said above.

Has anyone found a way to do this?

1 Like

https://developer.roblox.com/en-us/api-reference/property/Texture/OffsetStudsU

https://developer.roblox.com/en-us/api-reference/property/Texture/OffsetStudsV

Those two properties don’t work on SpecialMeshes

Create a Texture on the part with specialmeshes and then use that.

Sorry for the late response, but that does not work either, I’ve tested all things related to textures, and the texture simply doesn’t cycle.

Does anyone know if Textures can be scrolled on SpecialMeshes?

Hey, did you ever figure this out?

Probably the time for a PM :sweat_smile:

I don’t believe that textures can be scrolled on special meshes.

Your best bet would be designing UV maps to wrap the image from a Texture instance (you’d need to use a MeshPart, but for 99.9% of use cases it’s the same as a SpecialMesh), then scroll the Texture instance, which does have the properties required.

Edit:
See this twitter post for an example:
https://x.com/albie_io/status/1153404866590597120?mx=2

Edit:

Definitely.

I had thought that the texture object applied the texture based on the UV map, but apparently it just does some weird algorithm to apply it to sideways faces. It seems like it would be so simple to have almost the exact same thing but without the surface direction mapping.

Still not the same, its a shame this hasn’t been implemented yet, literally every engine has this.

Also, my texture (a shorline) is built so, that putting it on a texture instance makes it straight,
When you put it on a mesh though, it adjusts itself.
Which is perfect in my case since it goes around the sand.
But making it a Texture instance, ruins the entire thing, as it isn’t connected to the mesh.

Here an image(They all have the same texture)

Also, thank you for reminding me of PM’s, mostly only read on the forum here ^^

1 Like

This is still not possible, Textures cannot use the Meshpart’s UV’s, only the roblox-generated UVs which use the face preset. They do wrap around SpecialMeshes, but you cannot use the offset values.

What would maybe work is using the new EditableMesh instance to scroll the UVs of the mesh, but I can imagine that wouldn’t be very good for performance.

but I can imagine that wouldn’t be very good for performance.

Yeah, it’s unfortunate.
I hope they do implement this some day.