Squint!

Community Forums/Graphic Chat/Squint!

Sledge(Posted 2005) [#1]
When I first got into this Blitz lark I remember one of the first threads I participated in concerned the water effect in StarFox 64 (which shows objects being distorted as they pass below the water-line) and if it could be done in B3D. Early last year, bored, I had a pop at something similar but considered the results too flawed to mention as, even though it was simple to implement, there was an obvious glitch.

Anyhow, I was merrily playing Resident Evil 4 last night when I had to do a double-take on some of the rendered water... same glitch! Only here, with a few extra layers of effects and shadery stuff, and cloaked in killer artwork, you could barely notice it. So I dug out my old code, cobbled together some *slightly* better art (than the original red box in the blue inverted box) and found myself a bit more pleased with how it looked.

Now if I get time, and I can find enough free, quality assets, I'll try to put together a demo that is worth looking at (no promises... busy), in the meantime here's a crappy lil' (temporary) gif that almost* shows you what I'm talking about ;P





*It's a subtle effect at 800*600, so at 160*120 you'll need good eyes (or to zoom in a bit). I already upped the params.


jfk EO-11110(Posted 2005) [#2]
The gif really doesn't show a lot. Also, if the waves are so flat, I'd suggest to use an animated texture instead, you'll save so much performence. The underwater mode looks kind of unspectacular, only a bit of fog, at least that's what I see on the small gif.

Now here's a suggestion: play my latest FPS Demo (CSP Engine 5) and take a bath in the water, dive underwater and you'll see both, water caustic projections on the walls as well as a sinus distortion of the screen.

Now If you could manage to sinus distort only (see code archives) the things that are over the water when you watch it from under water, that would be great.


Sledge(Posted 2005) [#3]

The gif really doesn't show a lot.


Yes, I think Tesco might be getting a new broadband customer soon.


Now If you could manage to sinus distort only (see code archives) the things that are over the water when you watch it from under water, that would be great.



Already done!* EDIT: Tomb Raider on the Saturn used to do a similar selective distortion and remembering how lush it looked there was no way I wasn't going to implement it :D



Now here's a suggestion: play my latest FPS Demo (CSP Engine 5)


Dude, I always check out your CSP stuff. "Caustic projections" don't ring a bell, though, so I'll have to have another lookie.

When I can get a nice-ish demo of the selective sinus in operation I will post.


*EDIT: In case that sounds like I've looked in the code archives and tweaked the code there... I haven't. The only reason I even mention this lil' project is to "publish first", if you will, because someone is bound to pip me to the riches, glory and women otherwise :P


Sledge(Posted 2005) [#4]
Okay, a bit of a larger shot to keep jfk happy - at this point whatever is on the other side of a water volume to the camera gets distorted, as you can see by the bandy poles:



It's subtle because there's no perspective correction so things can start to look very wrong very quickly, but the cumilative effect of a whole section of the screen wibbling away is lovely.


Sledge(Posted 2005) [#5]
Alright, took a little detour after trying some reflective water out on the above scene and getting carried away...



What you are looking at here (apart from a couple of fab free assets from Octane and Psionic) is my first evening's work on a water effect that is mildly - *mildly* - similar to that of Xbox Far Cry (maybe I should use Simple Tree Creator and complete the look :D). The whole surrounding scene is reflected and distorted on the water's transparent (not that you can tell on a jpeg) surface.

I'm not letting the submerged portions of character models show through currently as I reckon the reflections look nice enough on their own. But unlike the terrain reflections these cost BIG TIME at the moment - I couldn't find a cheap way to clip them (where they meet the model) that looked satisfactory but I should hopefully be able to speed things up at least a *bit*.

Again, I'm not getting much time for this at the moment but a demo is on my mind.


Damien Sturdy(Posted 2005) [#6]
Neat.

I worked D_Grafix's code a bit to do the above including seeing what was under the water but unfortunately it failed to run on many computers :(


Sledge(Posted 2005) [#7]
Thanks for commenting - I haven't seen D_Grafix's code but I'm keeping everything (graphical) internal to Blitz to hopefully ensure compatibility. Should be able to speed up the clipping several-fold also - a promising solution occurred to me this morning.


Sledge(Posted 2005) [#8]
It's neat when stuff works innit! Character reflection clipping totally optimised now.