Mesh distortion

This forum is currently in read-only mode.
  • <img src="http://img222.imageshack.us/img222/9846/vertexbi5.png">

    I am currently working on a feature of sprite which allows it to render using multiple quads which can be deformed. I noticed it was a feature in the HGE engine, demonstrated by this tutorial http://hge.relishgames.com/files/hge_tut05.zip.

    At the moment you can individually move the vertex and change their colour and uv co-ordinates. However, it means you have to use 2 for loops and write long expressions.

    Construct is all about speed and ease of development, so I'm asking you guys if theres any kind of distortion you would like me to make built in. Attached is a template, just modify the second event and upload the example on the forum.

  • This is a kind of flappy flag like effect

  • And heres an exe of the above but with a mesh instead of just points

  • Awesome effects - those all should be built in . I can imagine the underwater scenes made possible by those effects! Even though it would be possible to do with loops and expressions, ease of development is important so add them. (And effects coded with C++ are faster, too...)

    Edit: Oh, I forgot. What kind of distortions I would like to have... You know, when a water drop drops to a puddle it creates circular wave. That kind of effect would be nice... and some kind of "punch" and "pinch" effects.

  • Please keep it so that we can affect the points using events! All sorts of neat stuff will be possible in that situation!

    Would we be able to set behaviors to the points? Then we can use physics behavior and make all sorts of neat stuff!

    Some thoughts are demonstrated in this video of Aquaria:

    Subscribe to Construct videos now

    First at 17 seconds, the main character swims past a banner and it waves with her. Then at 38 some underwater plants bend as she swims past, and again at 41. It's kinda hard to tell, but the plants bend at the proper place - if she swims past the tip, then the tip moves.

    I guess what I'm asking is if it would be possible to make the points move in response to a nearby object, but very importantly, have a settable maximum distance that the parts of the mesh can be from each other? Wouldn't want it to get too wild.

    At 56 there's an octopus that has a tentacle that bends, apparently using bones. Would it be possible to have a sort of bone based system - using bones to deform a sprite? I would imagine it working sort of like the custom mask for physics objects at the moment. Either that or could we attach points to another object? Like using 'create hinge' in the physics behavior - then we could rotate sprites via events to move groups of points.

    Also, would it be possible to choose the resolution of the grid? (to save on performance, etc.)

    I realize this is a lot to ask, so think of it more as food for thought.

  • hehe yeah i played that game thats what inspired me to add this feature!

    There will still be actions to set the points individually, i just wanna add some premade effects so people can be like 'hmm...i wanna make it wave a little...but how!? oh theres an action...cool!'

  • I tried to create a circular wave and played little around. I got this funky effect . That mesh is pretty fun to experiment with if you know some trigonometry.

  • First at 17 seconds, the main character swims past a banner and it waves with her. Then at 38 some underwater plants bend as she swims past, and again at 41. It's kinda hard to tell, but the plants bend at the proper place - if she swims past the tip, then the tip moves.

    That looks more like a pixel shader to me. I think you'll get a really nice effect like that with the Magnify pixel shader.

  • i just wanna add some premade effects so people can be like 'hmm...i wanna make it wave a little...but how!? oh theres an action...cool!'

    Ah, good then. I'm not good enough at math to make any decent looking ones on my own. If there were settings to fiddle with, then I'd be able to come up with something neat looking through trial and error.

  • Spiral effect. You can do some call stuff if you express the points in polar coordinates (ie. the angle and distance from the center), so you can play with the angle and distance instead of just the X and the Y.

    Maths for the win!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • More fun with polar coordinates!

  • Yay! Polar cordinates. Should have remembered! Thanks, Ashley.

    With polar coordinates, making these was easy:

  • Question: Can these mesh distortion effects placed on any surface or are these sprites-only? And do they use GPU or CPU?

  • Its sprite only for now, and the maths is done by the CPU and it works out the vertices and sends them to the GPU.

  • Hey! I got this idea from that Aquaria trailer and Arimas post about bones! I used a bezier as a "spine" for the mesh. I think that this effect is very useful for, trees waving in wind, tentacles, springs and such. What do you think?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)