can i have this water?

Blitz3D Forums/Blitz3D Beginners Area/can i have this water?

Santiworld(Posted 2011) [#1]
hi, can i make this kind of water effect with blitz3d?

regards.






Last edited 2011


Kryzon(Posted 2011) [#2]
Couple of effects we can see: environmental reflection and specular highlights.

The first one you can achieve with a cubemap (since there is no need for much definition, you can use a very low resolution cubemap because just the smudged color matters).
The latter you need to use Environmental Bump Mapping (also known as EMBM), with an animated bump-map texture to give the wave effects (since you can't animate this texture with a pixel shader, it needs to be pre-computed).

You can make\bake\generate animated water bump maps or normal maps with the "WasserTextur" application found in this page: http://www.holzchopf.ch/?category=tools - big kudos for the author of that.

You will need to color your ocean-mesh with a world-space to normal-space converting codes. :
;the dot3 light
PositionEntity normalPivot, 0, 0, 0
RotateEntity pivot,-EntityPitch(sunLight),EntityYaw(sunLight)+180,0
MoveEntity normalPivot, 0, 0, 1

r#=(EntityX(normalPivot)+1.0) * 128
g#=(EntityZ(normalPivot)+1.0) * 128
b#=(EntityY(normalPivot)+1.0) * 128
EntityColor Ocean,r,g,b	

You just need to calculate this once, if you are using a static light like a sun, for instance. Calculate the normal, color the ocean, then continue with the program.

You can also use two different textures that are dislocated at different speeds and directions to avoid repetition: their overlapping will cause always a new texture to come up as a result. This used in the N64 game The Legend of Zelda - Ocarina of Time.


Yue(Posted 2011) [#3]
my water (FastExt)



Santiworld(Posted 2011) [#4]
Hi, Thanks!!!

i made some test and got better results!.

i'm trying to make a mix between 3d mesh waves and textures...

YUE, i'm using fastext!, and is excelent!, but only reflect if i use a plane.

and i have some 3d waves in my ocean water.

regards!!!