I am wondering how expensive it would be in comparison, to create an effect for a procedurally generated mesh.
It’s a thruster for an engine, and I’m imagining 200 verts which are going to be ‘animated’ per frame.
Regarding Perlin, there’s a nice effect I just discovered if i take a sample (Mathf.PerlinNoise(0,0) to (1,1)
(see picture here : Is this reading the full range of Perlin Noise? - Questions & Answers - Unity Discussions )
and then push that sample range as a fixed size up in perlin (time,time) to (time+1,time+1) , it creates a really nice curtain effect. This is just animating the vertices and doesn’t take into consideration the changes in transform as the flame moves with the spacecraft.
Regarding Verlet, this is a concept I have just discovered, and just looking at a few search results I have alot to learn and understand before I can implement these ‘sticks’ that connect the vertices and pull them around relative to the parent gameObject. So, long time with lots to learn and accomplish.
There is a third option which is something I have already built, based on some excellent help from Aldo
(see question here : Calculate Spline points on Complex Geometry Mesh - Questions & Answers - Unity Discussions
From this I have created a ‘sock’, with 2 animation curves, one being the shape of the curve, and one being the ‘wave’ that scrolls through the vertices. Depending on the vertex z position factored with time , imagine vert 1 starts at the start of the curve, reads right from 0-1 , then loops. This actually makes some nice pulse effects and smooth sine wave actually gives an eerie ‘breathing’ effect!
So to summarize and place a solid (couple!) of questions down, and imagine all this is applied in iOS development :
1/ How expensive would each case be to do in comparison to each other computationally?
2/ How expensive is it to animate verts in this fashion every frame? Should I consider an InvokeRepeating (hi Fattie) as this is a small effect and I could ‘tinker’ with the timing so it doesn’t have a noticeable stutter.
3/ With what I have made (Iris Sock), and what I am capable of currently (perlin), and have no clue on implementation yet (verlet), what would be my quick and quite painless ‘go with that’ answer . Should I just use a ‘Sprite Combo’? Yes I think the sock is cool and it is complete however it doesn’t factor change in parent transform, but for something like verlet, which could be great once I have that ‘aah’ moment when I can actually imagine and see that ‘stick’ pulling along vert B while from a fixed Vert A as child to moving object. Wow.
Edit : to help clarify the effect I am after : for the ‘flame’ or ‘cloth’ material to be affected by the movement of the parent gameObject movement through world space. For example attached to a spaceship doing alot of quick turning and fast acceleration. Like a flame being blown by wind from different directions. My sock is static along the Z-axis.
Here is a picture of my Iris Sock :
// Tris / Verts
// 200 / 100 => Pent
// 400 / 200 => Deca
Of course, if anyone has a helpful link regarding verlet in any form, that would also be very cool. Google has some very nice equations yes (http://lonesock.net/article/verlet.html) but if you think ‘yes I have a bookmark that could help’ I as ever am very grateful. Thankyou everybody =]