Trying to duplicate the mist effect in a Castlevania game (expanding/contracting effect on a texture

Hey everyone, I wanted to ask for a little help on a pretty complex graphical effect I am trying to replicate. It is basically an effect that stretches and squashes a texture on a primitive (called planes in Unity) to give it a kind of swelling and contracting effect (just like the Windows 7 logo when you first boot up the OS; I included a vid of it below too). As you move around (8 possible directions) it also uses this effect to “pull” the texture in that direction

Now I managed to duplicate this effect before in GameMaker by creating a square primitive with 8 triangles (that is 9 vertices total), applying a texture that uses a gradient on the edges to it, and then just “pulling” the outer 8 vertices as needed to create the effect. Now I know this can be hard to visualize, so here is a pic of what I mean, and the texture I used ( I circled the vertice that I would be “pulling” via code to achieve the wanted effect). I also uploaded a vid of the effect I want to duplicate at the bottom:

I did some reading and found a pdf telling me how I can manully create a mesh in unity and then alter the vertices in the same way. But would this be the ONLY way to achieve this effect, or is there a better way to do it such as a shader?

Some advice here would really be appreciated.

Video of swelling (it is just sitting in place until about 0:15, then I move right, stop, then move left and stop again):

Same Effect on Windows 7 logo (though it is subtle here due to all of the glow applied):

Anyone? Surely with all the talented people we have here someone must be familiar with this effect?

I guess you could use a shader, but just manipulating the vertices in a mesh seems easier than learning shader programming, since there wouldn’t be any real benefit to using a shader that I know of. You could also skin the mesh and manipulate it with bone transforms, which might be a bit easier than directly using the mesh.


1 Like

Thanks for the info! By skinning the mesh, do you mean I would have to make it separately in a 3d modeling app, or making the mesh via code like I mentioned above, then just applying the texture to it?

Do you have any good tutorials on “bone transforms” you could point me towards? I’ve never even heard of them before and I am used to making 2d stuff not 3d. I have a lot of interest in learning it though.

Skinned meshes can be made in a modeling app, or by code. Bones are what are used to animate skinned meshes, though they don’t have to be used for characters; you could make a skinned car, for example, where the bones animate the wheels.


Thanks for the info Eric. I did some searching based on what you said and found this amazing set of video tutorials that shows how to do exactly what you described and what I needed from a tool I checked out a couple of months back:

Figured I’d share it in case you mods try keep links to all kinds of useful stuff like this. Would help steer people like me in the right direction.