How to use the PlayCanvas engine to achieve the color change effect in the video

What is the idea of this?Please help me, thanks!

Hi @11113,

You will have to use a custom shader for that, where you pass a custom uniform that sets the border between the two colors.

This can be quite advanced if you aren’t fluent in GLSL. A good place to start are the shader tutorials here:

https://developer.playcanvas.com/en/tutorials/?tags=shaders

Thank you for your answer. Yes, I know that materials must be customized, but what’s the idea of changing colors?

You use a shader to apply two different colors in your material, based on a custom uniform (param) passed that defines the current border per frame.

@Leonidas is right, you need a custom shader for this. The shader itself can be pretty simple, I made an example here:
https://www.shadertoy.com/view/wlfczr

4 Likes

Many thanks for sharing this @LeXXik!

1 Like

wow!!! 666…

1 Like

https://stonerao.github.io/three-city-pass/

This seems to be good,too

https://github.com/stonerao/three-city-pass