- Home /
Animated distortion of vertices
Hi - I have created a quad mesh on which I have a texture of a flame. I want that flame to appear as if it is flickering to the left and right. I was assuming I might either be able to make a shader that accomplishes this, or animate the vertices. Does anyone know what the best way to do this is?
Your very best solution is just to play an animated sprite !
you will NOT be able to achieve that look by wobbling the mesh.
if you do want to wobbble the mesh, try that "mega fiers" product on the asset store. or, learn all about mesh program$$anonymous$$g from scratch.
I guess some sort of custom shader could do it
(in general some sort of custom on the fly graphics generation, could do it, yeah)
I guess the issue with that is I wanted it to be user controlled, so I could tweak factors like flame amplitude and the direction of the wind, etc.
Answer by Fattie · Jun 21, 2012 at 12:42 PM
I completely understand 100%. I do stuffs just like dat.
IF YOU USED MESH it would work more if it was a rather large mesh, you'd need a lot of control. Imagine say 50 tris across and 50 tris down.
Maybe that's too extreme, perhaps 10 across and 20 down.
If you wanna do it that way, for sure, go for it.
As I have said you could possibly get and use "MegaFiers" from the asset store for this. Did you try it ?
I am not a shader programmer, but I guess it could be done in the shader. (As can any general programming task.)
We have done this in the past as a general sort of programming puzzle, thus, making the PNG on the fly. (Just like in photoshop when you distort an image by moving around a grid of dots.) So that's just a matter of a lot of code to build a png.
Don't forget too you could possibly do it with a skinned mesh model.
On that, I also urge you to get "SmoothMoves" from the asset store -- it is an amazing thing that is indeed for exactly the sort of thing you say.
I have now mentioned all the possible ways to do it ! Heh! Enjoy
@Fattie: I took the liberty and converted your comment into an answer ;). Usually i have to do the reverse... :D
Thanks for all the help guys - $$anonymous$$egaFiers looks great - I'm trying to keep things on the free side though, especially since I'm just experimenting (they should offer trials somehow...). Shader might be best, but damn, shaders look hard. I saw a shader tool in the store that looks great, but it requires Unity Pro to be able to view a preview of your shader. For now, I'm going to do a series of animated sprites and see how it comes out - not ideal, but oh well.
Your answer
Follow this Question
Related Questions
Material doesn't have a color property '_Color' 4 Answers
How to distort a plane 1 Answer
The name 'Joystick' does not denote a valid type ('not found') 2 Answers
Mulit-Pass Custom Shader Workflow 1 Answer
Play animation once 1 Answer