0 votes

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?


in Engine by (25 points)

1 Answer

0 votes
Best answer

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.

by (3,901 points)
selected by

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.

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

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.

Yes, the SpatialMaterial did the trick, thanks!

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read Frequently asked questions and How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.