Texture animation

Can we have it?


Seems like a great feature for all kinds of games. Thing like special effects, blood splatters, advanced particles would benefit a lot from being able to have an animated texture.

You can have this :grinning:

Use the offset properties in the material. e.g.

material.diffuseMapOffset = new pc.Vec2(0.5, 0.5);
1 Like

redka is talking about animated textures with multiple frames, not scrolling.
You can simply switch textures in a script to achieve this.

Actually, the texture animation in the linked demo is using sprite sheets. So you can just do this with the pc.PhongMaterial#diffuseMapOffset property.

1 Like

Hmm, actually you’re right.

Works like a charm with basic materials. But what about particle color maps? Is it feasible to have animated particles with maybe the same technique?

Particles use a different material than regular models, and currently we don’t support UV offsets in the particle material.

Something to look into though for sure.