Jump to content

image texture dynamic transition


Recommended Posts

Hello, I am trying to create a dynamic transition from one image texture to another shape and not a created mask transition. In short I am trying to create the effect show on the link below.

 and one other question is it possible to click on a single stroke that is part of the. borderline of a graphic shape?

Thanks for your time and thumbs up for your library !


Edited by CamO
forgot a question
Link to comment
Share on other sites

You could do that by creating a shader with two texture inputs which blend between those two. The actual code & math inside the shader is out of my scope in reasonable time.

As a starting point I would propably try doing somekind of convolution with previous frame as feedback and then moving towards target image.

This is the closest example for blending. In the example a perlin noise image is used to determine the blending. In your case that would be the shader somehow morphing the images.


Edited by Exca
Added example link.
Link to comment
Share on other sites

  • 8 months later...

Hello, I'm completely new to PixiJS, Webgl and the concept of shaders and so on. However, I'm trying to learn them currently and I would like to refer me to useful sources that would help me in my learning process. Moreover, I want to eventually try and implement the above transition between images. I want to know if thats even possible? 
Thanks a lot in advance!

Link to comment
Share on other sites

Getting to know how shaders work would be a good first step.

Sites like these help:


Then looking into some whitepapers about texture combinations or finding some example code how that is done in cpu/gpu would help in understanding how you would go on creating a webgl compatible version running on gpu.

Overall the transition shown in the video is not the easiest thing to tackle. As I said above, the way you would do that in pixi is having a shader that has 2 texture inputs and then it mutates the uv-mapping and how the two textures are blended together, but  the actual math related to that takes plenty of time to create (at least for me). If on the other hand you already know the math to calculate how the transition happens, then implementing it should be pretty straightforward learning how glsl works and then implementing a custom mesh (or filter) in pixi. There's lot of shader examples in https://pixijs.io/examples/

Link to comment
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.

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.


  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...