As you can see PG, I achieved the effect I wanted to achieve
the number of textures is randomized to give the effect of flipping through them with a mouse movement.
make it visible only in a certain range Like inside a photo frame
First I tried to make an NME before doing this, but the number of textures is random and I can’t pre-bake them.
When I tried to make it as a node mat by code, I want to combine multiple textures to the right, adjust the uv value, and use the uv offset value to give the same effect as above.
Both of these methods only resulted in the textures being combined into a single texture and did not work as I had hoped.
I also saw a suggestion to use Procedural Textures, but to my understanding this does not work.
The description was too long. The conclusion is the same as the title
I asked if there was a cheaper way to achieve the above effect.
ps The frame is not mine It’s from Pavanpk and I found it while looking for a frame for PG’s effect. Thanks for that
if you put an empty image source
I think I can fill in a random image later, but the UV percentage is empty when the counts don’t match. I suspect the variability based on the number of images rather than the shape of the images will be a problem for future Calculate.
I have not succeeded in combining the images to the right as described above.
Let me see if I understand correctly, you want to achieve the effect of scrolling between multiple textures, but without using multiple planes/multiple materials? If so I think this would be achievable by using the Dynamic Texture: Dynamic Textures | Babylon.js Documentation (babylonjs.com).
You could do this in a number of different ways, one would be constructing a big vertical texture with all the individual textures, and the mouse movement would update the UVs shown. Another would be to construct a dynamic texture that’s the size of the frame, and the mouse movement would update which textures are drawn in the dynamic texture. The first method causes less redraw of the texture, but it takes more memory as you will have a bigger texture, while the second uses a smaller texture but has to redraw it. YMMV on what is the more advantageous.
One last step remains.
It’s a cropped ratio, not a 1/3 narrowed ratio from the original texture, is it possible to make it narrow from the original ratio? https://playground.babylonjs.com/#23651X#10