AlbertoBonn

Animated .gif image as texture - how i can use it

Recommended Posts

Hi Babylonier,

need a animated gif as texture. the gif i see on the mesh, but only the first image. the gif start automaticly in the browser, but

not on a babylon mesh. No i cant use ogv or mp4 for 3 or 4 images per sequence/file.

thanks Alberto

Share this post


Link to post
Share on other sites

Hi,

 

If you must use several images as a sequence other than assembling in an mpeg movie, and the geometry is simple - you might try using one object per image and change the alpha channel to 1 and then 0 for each objects material consecutively in a loop or conditionally.  Not the most efficient method, but it should work.  This is the simplest, however you can also use multiple materials and textures on a single object, and do the same - there are examples online; not for your application, but for more complex shading.  If you cannot find any examples, please let me know.

 

Cheers  :)

 

David B.

Share this post


Link to post
Share on other sites

Wouldn't it be relatively easy to write a custom shader with an image-array attribute so that as soon as you apply the shader to your object you can fill the array with images and it would automatically itterate through the array, switching the texture applied to the object every "n"-seconds?

//Though I have never written a single shader... so it might as well not ... just an idea ;)

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.