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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

  • Recently Browsing   0 members

    No registered users viewing this page.