Saturday, September 29, 2007

Water surfaces

hi
a lot of features and bug fixes, one of them is water surfaces.
i'v added water surfaces at the beginning but there was no lights interaction with it, i just rendered it last and it doesn't looks real, one of the main changes i made is recreating the material system so each material stage could use different shader, also each shader need to have few techniques if light interaction is needed.
after all shaders recreated for this new material system, every surface in the game could define how light interaction will effect the surface, so water will effected by lights.
i'v also fix refraction mask generation, i'm using ambient pass to generate refraction map, after that i'm rendering water surface into alpha channel of this map so i could mask pixels that doesn't need to be effected by water pertubation effect.
here is few screenshots of water inside the game.

ambient and point light
flash light interaction
refraction (close look)

Saturday, September 15, 2007

Soft Particles

hi
one of DX10 features is the ability to read from depth buffer, in DX9 you can't do it unless you are generating it by yourself and pass it as texture.
in my ambient pass i'm using multiple render target, one for color buffer and one for depth, after that i'm setting it as texture and use it when needed in the pixel shader.
for soft particle effect, i'm reading the depth value from depth buffer rt and compare it with particle depth, then i'm compute new alpha value based on the difference between those values, (closest particle to level surfaces = more transparent).
here is few screenshots of the effect.
i marked in red the area the particles intersect with level surfaces.


Saturday, September 8, 2007

MegaTexture

hi
after seeing id tech 5 mega texturing, i though how the heal he did that?
so i start digging and reading a lot about clipmaps and streaming and i succeeded creating mega texturing.
to create the huge textures i'm using L3DT (pro trial version) i'v created 8k and 16k, the 16k texture took more than 12 hours to complete and with 5 mip levels its takes 1 giga.
my computer have only 1 giga ram so it's not impossible to use this texture in system mem.
here is few screenshots showing the difference between using mega texturing and not.
note that this is just sample app using engine features but for now its isn't integrated inside.
the app uses 16k streaming texture with about 20 mb gpu mem.
the fps difference is big because mega texture ps takes 74 instructions (not optimized)

using mega texture

not using mega texture (very blurry)