Archive 17/01/2023.

Animated textures

gabdab

I create a texture2d vector , then switch texture on material on update .
Is this the best way to achieve textures animation on Urho3D ?

codingmonkey

UV offset animation, you must prepare one big texture atlas with animation frames for this.
code maybe look something like this:

[pastebin]gizQdYb2[/pastebin]
for mat details see urho3d.github.io/documentation/H … erial.html

gabdab

Cool ,thanks .
Movie like animation breaking framerate ?

codingmonkey

Movie like animation breaking framerate ?
I think yes. Old-style tech animation like drawed with pencil flying bird on corner of the book.

and if you needed animation in 2D for this there are exist special 2d urho stuff, like AnimatedSprite2d and so on… there are some modern tech are using for animation.

Mike

Apart from using AttributeAnimation, this can also be made at the shader level.

codingmonkey

this can also be made at the shader level.
You mean if use custom Uniforms, and calculate UV in vertex shader ? Yes I guess this will be best method. But need some knowledge with shader tweaking.

gabdab

…full option .