laser blaster - it seems like other people are having clipping plane problems as well. I have no idea how to fix that though… I will rewrite the fresnel term to something more simple.
Yoda Almighty: It looks like the clipping plane is not applying. If I disable it on my computer it looks exactly the same. It is an OpenGL error or something.
thanks Vitor!
BlendingBGE - I will make a water surface demo with controllable color and specularity through Blender material tab. Wind speed, bumpy-ness etc. will be adjustable through shader though…
features:
• reflection & refraction
• normal map displacement (no real geometry displacement yet)
• water sunlight scattering
• chromatic aberration of refraction
• accurate fresnel term
• multi-frequency waves
• wave choppyness simulation
• bunch of tweakables to control all of this stuff
So, this is by far the most beautidul Water Shader that I have seen running on my PC by now. : D
(Yeah, I simply don’t play most of the modern Games. )
Ô, and it runs fast and smooth! :ᴰ (Weirdly it runs even faster when I display it big, and runs slower when I keep the Viewport small – but hey, that is great too!^^)
And for me that Shader Code looks pretty complicated, but dissecting it to understand some more of it might be very helpful.
Ô, and by the Way: I virtually* bow before you, martinsh, as I honestly had thought Blender’s current Shader Capabilities would not allow such… well, Beauties!
(* like, over the Internet, so just imagine it. ;p )
chäeMil, thank you. yeah it should be possible, but quite messy with current setup, I have to try it first.
C.A.ligári, cheers man :). I am really glad you like it. The code is not really clean and could be optimized, but actually it is quite simple. The most complex part is the tangent space conversion and normal texture blending.
@ ndee: Change the float speed, one of the first float Values in the List of Tweakables.
You can change a Lot there, you also can make it a true calm Water.
:)Very nice! The light scattering looks amazing. I’m still having problems with the fresnel, so I replaced it with a simple approximation that still looks decent. Other than that(and the clip plane issue), it works great.
What’s up with the wave strength variables having two components? I would assume that they control the scale on the x and y axes independently, but that doesn’t seem to be the case.
However, I found an issue that would need to be fixed before it can be used in games.
Select an object and give it a simple logic setup to restart the scene under a certain condition like if a key if pressed. When the scene restarts, the shader will stop working and Blender will crash.
Beautiful, 9fps, full screen, 1360 x 768. That’s not bad, considering I have an older Nvidia card.
The more serious work like this that gets done with Blender, the less people will consider it a toy. For instance, Turbosquid won’t certify Blender models for their Checkmate program. Thanks.
ndee, thanks :), the “Use Frame Rate” button was unchecked, perhaps thats why the water speed seems too fast.
BlendingBGE - well Crysis has a real geometry displacement. But I have an idea how to make it.
Thank you laser blaster, yeah I have not touched fresnel yet, but I just cannot figure out the clipping plane thing…
about waves - there are 6 layers total for normalmap - 2 for big waves, 2 for medium and 2 for small frequency waves.
The wave strength values change proportional strength of each normal-map layer. Values are normalized in the end (0.0 to 1.0).
Edit: I updated the file.
Added water color and scattering color variables, replaced the fresnel term.
I made another water surface shader, this one with texture displacement using iterative parallax mapping (relief mapping). But it is significantly slower due displacement calculation for 3 normal-map layers.
Hey hey bro this shaders lookin real nice!!! it almost reminds me of that shader u made with the SSS, is any of that shader used in this one, n if not do u think it would improve the performance?