Best way to animate a texture on a 3D plane with 120 images

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By Whypay

I have 120 images of a caustics animation in jpg format. Now I want to use them as a texture on a 3D plane, and change these images every frame in a loop.

Should I change the texture of my SpatialMaterial with code at each frame, or can I create a video as texture, or is there a better way to do this?

Caustics

:bust_in_silhouette: Reply From: SIsilicon

If your working with a plane, and only a plane, a AnimatedSprite3D should do. You can put all your caustics texture in the AnimatedSprite3D’s frames property.

Looks like I can not use AnimatedSprite3D, as it is not tiled, and has no texture repeat. The UV coordinates make the texture fit multiple times on the plane , as the texure is seamless.

Whypay | 2018-09-29 13:33

No texture repeat? What do you mean? If your frames are seamless, then it should repeat just fine.

SIsilicon | 2018-09-29 14:39

If your talking about the fact that you have no way to change the scale and offer of the texture, then all you have to do is give the AnimatedSprite3D a SpatialMaterial and in that material go to the UV1 tab and you’ll be able to transform the texture coordinates there.

SIsilicon | 2018-09-29 15:28

Yes, the SpatialMaterial did the trick, thanks!

Whypay | 2018-09-29 17:36