How do I make sea look like this?

Blitz3D Forums/Blitz3D Programming/How do I make sea look like this?

John Pickford(Posted 2006) [#1]


It's from the new Ace Combat game.

I'm assuming it's some sort of bump mapping with a specular highlight?

Can I do this in Blitz3d? - I've tried messing with Dot3 bumpmapping in the past but didn't get great results.


Ross C(Posted 2006) [#2]
There is a .dll out i think, that speeds up these processes. I don't think that kind of thing is achievable in blitz as it stands just now.

http://www.d-grafix.com/softwareted.html

T.Ed uses it i think. There was a thread about it in the blitz creations forum.


Ross C(Posted 2006) [#3]
Here ya go:

http://www.blitzbasic.com/Community/posts.php?topic=56954


John Pickford(Posted 2006) [#4]
That looks great - much more than I require though.

A static, working bump-map that interacts correctly with the lighting would probably do the trick.


Beaker(Posted 2006) [#5]
Fredborgs water from here:
http://www.frecle.net/misc/Water.zip
from this thread:
http://www.blitzbasic.com/Community/posts.php?topic=53162


Picklesworth(Posted 2006) [#6]
I highly recommend Fred's, too. It is very versatile, fast, and it can look fantastic!
Inarie's water from that thread also looks really good, and probably works best if you're looking for water to look like water from a great distance because it has lots of contrast.


Pinete(Posted 2006) [#7]
However could be fantastic if someone with enough programming experience could make an adaptation of some of the waters you can see over the internet...

for example, there is one at this thread:
www.blitzbasic.com/Community/posts.php?topic=53162

almost at the end of it, there is a link to a DX9 water that looks really amazing!

regards,


John Pickford(Posted 2006) [#8]
Cube-mapped reflections is a bit OTT for what I need.

It's a simple tile based system. I need it to look good from an isometric type view. Similar to the screenshot posted.

I don't want anything that'll mean me updating zillions of vertices, I'm trying to improved the framerate at the moment.


Pinete(Posted 2006) [#9]
Have you take a look at code archives?
I think you can find an animated water done with
a animated texture..
maybe it could be useful for you...
I don't remember where to find it in code archives... look for the word 'water'..

regards,


big10p(Posted 2006) [#10]
JP, wont that water effect look a bit out of place in Naked War? It looks pretty much photo-realistic. Just wondering. :)

I think it's possible to get some quite nice flat water effects just using animated textures, maybe using multitexturing to animate water textures in different directions, etc.

Also, maybe you could add a mirror plane to get reflections and make the water a bit more convincing? TBH, I've never tried this and am not sure what the performance hit is in using a mirror, though.


Braincell(Posted 2006) [#11]
Thats a shader in there because depending on the angle you look at the water it will be brighter darker. I've looked at shaders for so long i can tell its probably very similar to the ocean.fx you can find on the nvidia developer site. I wouldnt advise anyone to waste time on trying to get such water in blitz3d.


Beaker(Posted 2006) [#12]
If you don't want to move vertices, or use a DLL, or use cube mapping then you are stuck with moving wave-shaped tiles and/or flat scrolling textures. No way around that.

The former combined with the latter can look very good tho. That is what Fredborgs other demo does here:
http://www.frecle.net/jsl/


John Pickford(Posted 2006) [#13]
>Thats a shader in there because depending on the angle >you look at the water it will be brighter darker.

You can do that with
BrushShininess water_brush,1

. I've got that bit working and it looks nice. What I want to do is combine it with dot3 bumpmap but I can't get it working.


Ross C(Posted 2006) [#14]
You will need a cubemap to get the lighting correct, if you use a normal map.


fredborg(Posted 2006) [#15]
If you don't need reflections (of geometry) you can get away with something simple like this...

The result:


The code:
The texture (make sure to save as png, as the alpha channel is important):



John Pickford(Posted 2006) [#16]
Fantastic Mr fredborg! I'll give that a go.


John Pickford(Posted 2006) [#17]
okay, here's my attempt:



I've used multi-texturing rather than layers of polygons.


fredborg(Posted 2006) [#18]
Nice, maybe the texture could be tweaked to be a bit more toony.

I used different mesh layers to allow different shininess settings for the different layers... but multitexturing is probably just as good.

If you can add a bit of foam along the "coastline" it would be even better :)


John Pickford(Posted 2006) [#19]
I'll get my brother to have a play with the textures - I'm sure he'll be able to make it look even better.

Yep I'm planning to add little ripples\waves etc.


Picklesworth(Posted 2006) [#20]
That game looks stunningly amazing...
Nice water!

I'd love to see it in motion... does it animate? If so, how much? I'm thinking that slow moving water would work best here, because faster moving stuff with fancy ripples like you'd see in an action game could be a bit distracting.

It looks like that's what you're doing though... but just in case :)


John Pickford(Posted 2006) [#21]
>I'd love to see it in motion... does it animate?

Your wish is my command!

http://zee-3.com/video/newwater2.wmv

Just a quick, unedited video - hopefully the compression doesn't spoil it too much. BTW those 'load times' (with the sheep) are extended by running fraps. It's a lot quicker than that. Honest.

Still some work to do but it's pretty close to what I was aiming at. Simple, good looking and not a massive CPU drain.


GfK(Posted 2006) [#22]
Game's looking pretty good. Certainly one to show to the nay-sayers who reckon Blitz isn't up to the job.


Yan(Posted 2006) [#23]
...And you've sorted your server out. :o)


Pinete(Posted 2006) [#24]
wow Fredborg....
You plays in other galaxy, mate....
like the Real Madrid...
amazing..
:)

regards,


Picklesworth(Posted 2006) [#25]
Judging by the video, I'd say that that water is perfect!
It even has that lighting stuff that I've been too thick to sort out yet :)


Rob Buckley(Posted 2006) [#26]
Gawd that looks really nice. Just shows what Blitz can do when in pro hands. Water looks great, and the only bit I don't like is where water hits land as it jarrs a little. Perhaps a swell or something.

Rob


Braincell(Posted 2006) [#27]
@John Pickford
no you cant because in relation to the camera the ambient reflection light (which gives the ocean its colour) reflects at different angles depending on the distance of the water. So it wouldnt look quite as good especially as it doesnt count the normal map values. Its also kind of like the fresnel reflection effect, so you need more complex calculations than just changing the whole material.

Guys, if you want such eye candy blitz3d isnt for you. Its simply futile to invest such efforts in a hackjob that will be slow when there are much better solutions out there.


John Pickford(Posted 2006) [#28]
Well I got something pretty close to what I was looking for.

I've haven't wasted time and I don't think it's a hackjob. Just creative use of the capabilites of B3D.

Anyway, thanks again to all those with constructive advice.


John Pickford(Posted 2006) [#29]
UPDATE: Ste's done some work on the water texture. Hard to see in a still pic but the 'bumpiness' seems to interact with the specular highlight. Just an illusion but quite effective.

I'll be adding some waves & ripples next.




simonh(Posted 2006) [#30]
I think I prefer the water before Ste tinkered with it. The water looks a but rough now, like tissue paper.


Braincell(Posted 2006) [#31]
Yea me too.

Ok constructive criticism (sorry i forgot) would be, the edges of dark areas such as the castle in the middle of the bright part of the water would look 10x better with bloom filter. You know, so there isnt such a huge disparity between bright/dark parts of the render. Makes the render of the shinines look fake, so perhaps just put in a bloom option for users with machines which can handle it?

Looks great overall, needless to say.


Stevie G(Posted 2006) [#32]
The game looks superb!! I like both water textures .. the first looks better at the zoomed out distance but probably the second works better up close. If you could get some sort of coastline white wash to blend the land with the sea at the edges this would look even better.


N(Posted 2006) [#33]
Gotta agree with simonh here. Looks way too bumpy now.

I don't think a lot of folks are going to be staring at the water if they're playing a game like that though. They'll be clued in enough to appreciate the gameplay.


n8r2k(Posted 2006) [#34]
first one is good. just curious. How come thers half a boat in the middle there?


John Pickford(Posted 2006) [#35]
It's a full boat.