Waves, tides, and ripples

Get help using Construct 2

Post » Sat Mar 02, 2013 8:00 am

@Scirra recently tweeted a link to a particle effects demo at https://www.scirra.com/labs/particlesdemo2/

The smoke trails, explosions, and water splashes (while nicely executed) are all fairly standard particle effects.

However, what I'm curious to know is the method used to create "tidal waves" - the rippling across the surface of the water from a point of impact.

Does anyone either know, or have some suggestions about how they would go about doing this? It seems to be a fairly simple sine curve distortion, but I wasn't sure how to apply this to an object...?

Thanks for any advice!
B
8
S
2
G
3
Posts: 83
Reputation: 2,668

Post » Sat Mar 02, 2013 11:42 am

I'm working on producing realistic webgl water atm. The lens shader will do what you're saying to the distortion, it will just depend on how you draw the sprite it's applied to and how you manipulate magnification, scale etc throughout its lifespan.
B
14
S
4
G
3
Posts: 38
Reputation: 3,741

Post » Sat Mar 02, 2013 12:59 pm

is this any good for you to start from ?

sine wave

click on the line to see effect
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
59
S
30
G
34
Posts: 1,194
Reputation: 23,767

Post » Sat Mar 02, 2013 2:09 pm

Thankyou both for the suggestions.

@RamPackWobble - yes, I had attempted something like that, although per-sprite sine behaviour on 60 individual sprites seems very expensive, and also I couldn't work out how to "fill" below the line. Any ideas?

@TommyTTK - I'll give lens shader a try and see how I get on - will post back here if I get anywhere!
B
8
S
2
G
3
Posts: 83
Reputation: 2,668

Post » Sat Mar 02, 2013 2:34 pm

Rojo's canvas plug would work nicely except for the webgl thing.
Just draw a spline along the x axis, and give the control points random(-5,5) integers that you lerp out over time.
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Sat Mar 02, 2013 5:36 pm

I guess to fill below you could use tall thin sprites ? (maybe fading from blue to black ?)

probably overkill on the number of sprites - I don't think it would bother a desktop but might bring a tablet to it's knees ?

I like the sound of using a gl shader but , unfortunately, know nothing about them   

I am interested to to see how this goes - good luck.

August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
59
S
30
G
34
Posts: 1,194
Reputation: 23,767

Post » Sun Mar 03, 2013 2:06 pm

another approach

silly but just maybe...
August 2015 - I misplaced a lot of links - I will try to find backups and repost. If You find a post that interests please reply to post with @rampackwobble and I will get a nudge!

If you find my posts useful please consider donating something to a local charity or to the http://www.mndassociation.org/
B
59
S
30
G
34
Posts: 1,194
Reputation: 23,767

Post » Sun Mar 03, 2013 6:20 pm

Silly perhaps, but I think you might be onto something - I suspect the answer might well lie in some black magic trickery such as this :)
B
8
S
2
G
3
Posts: 83
Reputation: 2,668

Post » Sun Mar 03, 2013 8:07 pm

Maybe someone clever than me can make this better but I was thinking you could use the polygon plugin to draw the water and then animate the vertexes. I did look at using curved vertexes but couldn't see how or if possible.

Sure you could make this smooth with better use of lerp, functions, delays etc..

Demo

Capxlabithiotis2013-03-03 20:09:02
B
24
S
11
G
5
Posts: 140
Reputation: 5,004

Post » Sat May 18, 2013 10:16 am

well i gave it a shot, and i think this is how they did it ;)
hope this helps, pretty much eyecandy , unless it can somehow be used for...something interactive,
just click anywhere in the scene to make a box drop

https://dl.dropboxusercontent.com/u/22979766/ripplesC.capx
B
2
Posts: 2
Reputation: 654

Next

Return to How do I....?

Who is online

Users browsing this forum: flemmig, Nifl and 29 guests