Creating Water Surfaces - Any tips on how to achieve it
Blitz3D Forums/Blitz3D Programming/Creating Water Surfaces - Any tips on how to achieve it
| ||
Does anyone have any tips on how to create a water surface? I am not interested in the rippling effect but more in the reflective/transparent appearance. What are some techniques that could be used to achieve this. |
| ||
EntityAlpha Entity,xxx# for the transparent effect. For reflection, I guess you'll need to use environment-mapping, but I haven't had much luck/experience with this yet... |
| ||
Cubemapping is your best bet. Take a look at the SetCubeFace commands and the optional texture flag. Essentially what you want to do to create a reflection is to render the world as seen from the surface to the cubemap texture. Blitz takes care of the rest when you call RenderWorld. Note than in order to render to a texture buffer you need to use RenderWorld and then CopyRect to the buffer. |
| ||
Check out Robs Demo1 in his sig: http://www.redflame.net/files/cubed.zip |
| ||
Yep rob's demo is the best water surface thingy ive seen so far, except for the outcast water.... |
| ||
Awesome! Really impressive stuff that. |
| ||
You can also use a mirror! http://www.blitzbasic.com/b3ddocs/command.php?name=CreateMirror&ref=3d_a-z Andy |
| ||
Problem with mirrors is they're a bit too Planar, and can be 'over-reflective'. Okay if you have a large or multiple water sources and a defined water level - otherwise, they're not too great. |
| ||
>Problem with mirrors is they're a bit too Planar, and can >be 'over-reflective'. Okay if you have a large or multiple >water sources and a defined water level - otherwise, >they're not too great. And yet it is a perfectly reasonable answer to the question asked. I am sure that MATTY will try it out and choose whatever approach suits his game! Andy |
| ||
Don't mirrors increase polygon count, too? I thought they doubled polygon count for every mirror placed... |
| ||
Yeah, it does. But cubemapped water requires you to take a render of the enviroment, which is probably as slow as a mirror. :) Cubemapped water does look the better tho :) But if, as you say, you don't need to rippling, then a mirror could be the way to go. |