Sukurk savo BLOGą Kitas atsitiktinis BLOGas

Blog moved

The blog has moved to:

Rodyk draugams

Short video

 Ok time to show something in action :) I captured a short video of test-scene and you can download it here. The big monster model made by Zachary Brakin and Tom Miller, model was used only for testing scene. Video is a little bit laggy because of capture software working.

  Currently I am working on fluid dynamics (real particle water). Be patience, I will post some screenshots in the near future.

Rodyk draugams

Lighting shader and Motion blur

  It seems that to develop excellent lighting system you need to develop excellent shader too :)

In this shader I need avoid a lot of 'if' instructions to establish various light types, many cycles and etc…

Multiple lights are really where shaders muff up.

  I estimated all lights and now I have 7 different light types. Each of them brings 3 potential samplers into shader - a 2d shadow map, a cube shadow map, and a projected cube map. Naturally, lighting shader has 4 samplers, that are already engaged - base texture maps: ColorMap, NormalMap, SpecularMap and HeightMap. Therefore, I used all possible 16 samplers very rationally.

  Oh, by the way last week I made Motion Blur (currently I am blending only one previous frame):


                                                Soldier motion blur                                         Camera (fast movement) motion blur


  Of course, it is not the “real” motion blur, but it requires just few adjustments to achieve the real one (blend several frames with accumulation buffer…). 

  In conclusion - some person’s reaction of the CryEngine2 technology trailer

  • “Why this video is exceptional?” 
  • “I don't notice anything there that I haven't seen before.” 

  Did everybody game-players/developers degraded? Oh well… What does the future hold in store for us? :D


Rodyk draugams

Baked maps (Lightmaps)

During the smart lighting passes system and testing the variety texture units I found that baked maps (lightmaps) are very proper for the true static objects (the combination of the light and shadow maps is quite popular at the moment):

Also here you will find one of the post-processing effect called bloom and experimentations of gloss mapping (rocks are too much plastic now).

Rodyk draugams

Wonderful discovery

“All modern shader model 2.0 hardware and greater have at least 16 texture units.”

 Bah! I didn't know!!! :)) I thought for example GeForce 6200 have only 4, because according this:

reports 4-texture unit for the fixed function pipeline, but we can use
16 when using the programmable pipeline (for example fragment shader). 

 What a wonderful discovery :)

 Oh, now it is all going to be different, now I can get even four light passes in one! :) I just need to do very efficient light passes system.


Rodyk draugams

Parallax mapping

 I had read parallax mapping: 

Moreover, successfully implemented it with glsl shaders:

Soldier model made by game.exe

I think nowadays this effect, even if it costs one additional texture unit (height map), adds more realistic graphics than usual bump mapping and it is fast enough to be implemented in the next-gen engines.


Rodyk draugams

Shadow maps techniques

Heh stencil shadow volumes are really slow for complex objects :) (shadow volumes for skinned models are just foolish).  Therefore, I tried to implement shadow-mapping technique - it is easy, fast and looks good. The one of the complicated thing is omni directional lights shadow mapping. The
perspective shadow mapping is used only for spot lights and it
unsuitable for omni lights.  There are few solutions for the way out:
cube map shadowing (6 rendering passes and without depth values -
non-self shadowing), and dual paraboloid shadow mapping. Firstly, I implemented cube map shadows with
smooth the edges. Now I realized that cube map is too much expensive, and that dual paraboloid required only 2 rendering passes with 2-texture unit. Additionally I have been reading that: “…a Sphere and paraboloid maps uses only 78%
of the actual texture resolution available in the texture map image…” and that dual paraboloid shadow maps cause unprofitable results. So I am a little bit confused now, which way is better? :)


Rodyk draugams


Look at this site:
these guys rock! The one of the main things that draws my attention is
per-object motion blur and specular bloom. These effects allow to draw
more realistic environments than ever before.

Rodyk draugams

Soft shadow volumes

 I am trying to make soft shadows so that they will cast on every object in the scene. As you know, shadow volumes are good, because shadow caster receives shadow by itself.  However, the main disadvantage of shadow volume is that they are hard-edged (non-soft). So I asked myself - how can I make shadow volumes that become soft edged? I found some algorithms and solutions on the net, like to do several shadow volumes in different alpha values… Oh yes, they are too slow in real-time graphics (imagine few objects that cast shadows and all this runs at 14fps on my gf6200). But the real idea of soft and fast shadow volumes came to me when I made post-process effect called bloom (aka fake HDR). One of the bloom elements is a screen space blur… Therefore, I thought why we couldn't use this blur element (separable convolution) to blur our shadow volumes? :) Here you can see results of my expermentations: 



Rodyk draugams


Hello every one. This is my personal thoughts about new technologies,  next-generation graphics and game development.

Rodyk draugams