Splashing a car into water - how to do it?

Blitz3D Forums/Blitz3D Programming/Splashing a car into water - how to do it?

Vorderman(Posted 2006) [#1]
Morning everyone,

Something I've been meaning to do for ages is to get a nice splash effect when the SRX cars go off the track into the water, but I can't think how it can be done.

I'll probably use Tokamak to make the car surface and float (I need to retain that punishment delay that the original Stunt Car Racer had as the car ground along the floor) but I suppose I need some sort of particle splash effect and ripples etc...

I've not got much framerate to spare I don't think (although I could apply this effect only to the player's car and not the AI cars) so the effects need to be reasonably simple.

Anyone got any tips / pointers / weblinks / code etc... that might give me some ideas?

Stuff involving waterFX is always difficult....

thanks
James


Shambler(Posted 2006) [#2]
I would position a quad or triangle near each wheel and rotated slighly so that it lies in the plane that water might splash off of the tire.

It would probably had to be double sided so that the effect coud be seen from both sides.

When you detect a wheel has entered the water you then show that particular quad/tri and maybe use an animated texture for the water splashing.

This is the simplest way of doing it if you are stretched for framerate rather than having a full blown particle system...you could always include a particle effect too for those PC's with enough power.

Similarly a ripple effect on the water could just be a few quads with animated texture.


Naughty Alien(Posted 2006) [#3]
..for very nice and fast water ripples, you can use AMT-laboratory DLL's for Blitz3D..its very fast and easy to deal with..

http://www.amt-lab.com/index.php?page=wprew

for rest of vfx, messing with particles will be fine..


fredborg(Posted 2006) [#4]
I would do it with an animated texture, if there was little power to spare. Something like the splashes in this: http://www.blitzbasic.com/codearcs/codearcs.php?code=474


Vorderman(Posted 2006) [#5]
Thanks for the answers - Fredborg's link is kind of close to the effect I'm seeking to create, but I need something a little more specific...

The SRX cars drop through a semi-transparent water plane - at this point control is lost and the camera switches to an exterior camera that pans around the floating vehicle. When hitting the water the vehicle will penetrate it slightly or completely, dep. upon speed., then rise back to the surface. So I need some way to show a huge cascade of water being thrown up around the vehicle as it hits this flat water plane.

This is a one-off effect created when a vehicle crashes - it happens once, fades away or stops, and is not seen again until another crash.

Imagine this image -

combined with this image -


but with the car at 45 degrees nose-down when it hits the water.

I can't afford loads of particles so I was hoping there'd be a way to create that vertical-wall-of-water look with a few sprites or a scaling mesh, or with an animated texture on a simple mesh.


Yan(Posted 2006) [#6]
.


Danny(Posted 2006) [#7]
Hi Vorderman,

A complex effect like this can only be achieved by using multiple layers of effects. You can't ofcourse solve this (spectacularly) with a single sprite or mesh or whatever.

You have to build it up from several parts. Technically I would mainly resort to, like fredborg mentioned, animated textures, they are cheap and on that texture you can create any effect as complex or 'expensive looking' as you want. Use any 3d software or compositing or particle stuff you want..

For example:
One fx layer could be a couple quads surrounding the car/impact to create the vertical wall-of-water.
Another layer can be a few quads with 'directed water quads' (ie. in the direction the car was travelling - spewing out from the front).
Then perhaps you can assign a few quads to use tokamak and create some water that will come back down (ie. gravity) or collide with the water surface - to give it more realism.
Another layer could be a single large quad to project an aggressive ripple-effect that you place just above the surface of the water - and even though this ripple will be FLAT as can be, since you have control over the camera - you can prevent it from shooting too low / too close to the surface of the water - so it WON'T look flat.

What you could also exploit (if you look at your second picture) is to create a big cloud of water-spray/vapor. As you see in that photo the water is not so much made of individual little particles but very closely resembles a big cloud of smoke (It sprays up very fast and aggressive then hangs in the air a bit, slow falls and fades away).
If you put this effect-layer (on top of the rest!) this could help you HIDE the actual surface impact and other details that might otherwise make it look 'fake' or 'cheap' because they're not absolutely perfect.
The trick it to make it 'believable' and more of a 'suggestion', often the simpler it is, the better it looks. Because more detail will demand more accuracy.

Anyway, easy to talk about, but a lot of work, trial, error and tweaking for sure ;)

Come to think of it, perhaps the most simplest, cheapest and effective solution would be this: 'lock the camera!'

You mentioned the camera goes 'out of the car', if you make the camera ALWAYS end up at EXACTLY the same angle, all you have to do is create the footage for 'a splash' for THAT given angle! Then simply play it on 1 single quad.
Ok, you can do a really cool slomo matrix-style turn around whilst it's all happening. But you CAN make the splash as real and complex as you want, render 1000 layers to 1 texture and bob's your uncle!
Create a few variations (and angles) so it's not ALWAYS the same...

hope this helps.. Good luck with it!
D.