Yep, I haven`t been very active blogger lately.
I am very glad that company I am working for brought me to Amsterdam to Blender Conference this year. I even did a presentation there together with my colleague Michael Otto about GLSL shaders in Blender Game Engine. And for the presentation purposes I decided to demo my water/underwater shader there.
Just before the presentation I managed to tune up the shader and the scenery a bit.
so the changes since last update are:
- projected grid approach for the water surface (lousy implementation)
- per-vertex displacement mapping for waves
- basic but effective shoreline detection for water surface and ground
- added some subtle cloud layer and stars in the skies
yet to be done:
- fixes on inconsistencies
- better and procedural wave propagation model
- focus to underwater visuals
- better camera transition from water/underwater
- better coastline behaviors
- buoyancy (partly done)
- heavy optimization
- when it`s done, as many have requested - implement in Unity
trees are generated with tree[d] by frecle
blend file to be uploaded (have to clean and optimize the code a bit)
Labels
- shaders (26)
- Blender (10)
- Racing game (10)
- BGE Candy (5)
- DoF (5)
- 3d models (4)
- bokeh (4)
- volumetric (4)
- platformer game (3)
- sky (3)
- BGE Air Race (2)
- SSAO (2)
- raycasting (2)
- status (2)
- WebGL (1)
- stereo 3D (1)
- tron (1)
- tutorials (1)
- webcam (1)
Showing posts with label sky. Show all posts
Showing posts with label sky. Show all posts
November 24, 2013
September 13, 2013
water/underwater & sky shader update #02
I published this quite a while ago, but found some time to post it here just now.
This is an update video to one of my oldest projects in the making.
nothing much has changed since the last video, I just have a better computer now and I recorded it in a higher quality and framerate.
The water shader is based on my own observations.
it features:
- reflection with accurate fresnel refectance model
- refraction with chromatic aberration
- projected caustics on geometry from the water surface based on normals
- seamless transition to underwater (no fake fog added)
- accurate water volume with light scattering
- view and light ray color extinction based on water color and sunlight
- simple coastline detection based on terrain`s height-map
does not yet feature:
- displaced water geometry
- underwater particles
- underwater light rays from caustics
- shoreline behaviors
Sky model is based on Preetham, but implementation is from Simon Wallner, with a significant (artistic) changes done by myself.
I have also included an overly exaggerated experimental glitter shader and a completely procedural "water droplets on lens" shader.
YES the underwater distortion is completely unrealistic and will be removed once I add underwater particles that will wobble similarly.
download blend:
- https://dl.dropboxusercontent.com/u/11542084/water_0.99_optimized.blend
- http://www.blendswap.com/blends/view/68857
sound files from freesounds.org
This is an update video to one of my oldest projects in the making.
nothing much has changed since the last video, I just have a better computer now and I recorded it in a higher quality and framerate.
The water shader is based on my own observations.
it features:
- reflection with accurate fresnel refectance model
- refraction with chromatic aberration
- projected caustics on geometry from the water surface based on normals
- seamless transition to underwater (no fake fog added)
- accurate water volume with light scattering
- view and light ray color extinction based on water color and sunlight
- simple coastline detection based on terrain`s height-map
does not yet feature:
- displaced water geometry
- underwater particles
- underwater light rays from caustics
- shoreline behaviors
Sky model is based on Preetham, but implementation is from Simon Wallner, with a significant (artistic) changes done by myself.
I have also included an overly exaggerated experimental glitter shader and a completely procedural "water droplets on lens" shader.
YES the underwater distortion is completely unrealistic and will be removed once I add underwater particles that will wobble similarly.
download blend:
- https://dl.dropboxusercontent.com/u/11542084/water_0.99_optimized.blend
- http://www.blendswap.com/blends/view/68857
sound files from freesounds.org
August 4, 2011
simple and efficient skylight setup
I have been using this lighting setup for years now. So whenever I need to make a prototype or game scene in outdoors this is a lighting template I am using. So I thought someone may find this useful.
Scene uses 3 lights - 1 directional light for sun and 2 hemisphere lights for sky color and reflected ground color. Hemisphere (Ancient Greek: half of a sphere) light is same Half Lambert. It is a perfect solution to imitate sky color and indirect lighting that comes from surfaces lit by the Sun.
float halfLambert(vec3 N, vec3 L)//N, L = Normal and Light vectors
{
retun max(0.0,dot(N,L)*0.5+0.5);
}
which, by the way is developed by Valve for Half-Life.
here are some illustrations:
this is an example scene - clear, blue skydome, Sun somewhere in middle between horizon and zenith and sand or dirt as the ground plane.

Sun. A directional light, lamp intensity is 1.0 and color is white.

Sky color. The whole skydome emits a lot of light, in our case, blueish. Hemi-light is pointing down .I usually use lamp intensity 0.2 and color (Red 0.0, Green 0.2, Blue 1.0)

Reflected ground color. It is an indirect light and the intensity and color depends on the surface color. Hemi-light is pointing up. Here we have light orangeish color as a sand or dirt would have.

here we have all three lights combined together.

some screenshots from Blender viewport:
sunlight only (shadows on ground are baked in a texture)

sunlight and reflected ground color

sky color only (ambient occlusion on ground is baked in a texture)

full lighting model

dirt

grass

blend file: HERE
Scene uses 3 lights - 1 directional light for sun and 2 hemisphere lights for sky color and reflected ground color. Hemisphere (Ancient Greek: half of a sphere) light is same Half Lambert. It is a perfect solution to imitate sky color and indirect lighting that comes from surfaces lit by the Sun.
float halfLambert(vec3 N, vec3 L)//N, L = Normal and Light vectors
{
retun max(0.0,dot(N,L)*0.5+0.5);
}
which, by the way is developed by Valve for Half-Life.
here are some illustrations:
this is an example scene - clear, blue skydome, Sun somewhere in middle between horizon and zenith and sand or dirt as the ground plane.

Sun. A directional light, lamp intensity is 1.0 and color is white.

Sky color. The whole skydome emits a lot of light, in our case, blueish. Hemi-light is pointing down .I usually use lamp intensity 0.2 and color (Red 0.0, Green 0.2, Blue 1.0)

Reflected ground color. It is an indirect light and the intensity and color depends on the surface color. Hemi-light is pointing up. Here we have light orangeish color as a sand or dirt would have.

here we have all three lights combined together.

some screenshots from Blender viewport:
sunlight only (shadows on ground are baked in a texture)

sunlight and reflected ground color

sky color only (ambient occlusion on ground is baked in a texture)

full lighting model

dirt

grass

blend file: HERE
Subscribe to:
Posts (Atom)