[DEV] - Lower Shadow Buffer Minimum

Hey. So, I noticed that the shadow buffer size minimum value is 512. I tried lowering it as a simple task, since not every lamp needs to be as detailed as a buffer of 512 will give you, especially with smooth variance shadow maps. An example might be a torch or hallway lamp or skylight (though martinsh’s area lights would be far better). This way, you can have some level of dynamic shading with larger amounts of simple lights. Try it out and see what you can do with more lamps / smaller buffer sizes.

When the demo blend first loads, it will load in wireframe mode (or rather, SHOULD load in wire-frame mode), so if you have a weak graphics card, you can tweak it before viewing the blend in textured mode. You’ll get more of a frame-rate increase in a smaller window rather than a larger one, but it should still be pretty useful. The demo blend file has 18-19 objects and 33456 faces, and 21 lamps, 19 of them being shadow enabled (if I recall correctly).

So, go into textured mode and see how fast the blend file runs for you. Then, select a lamp and switch its shadow buffer size from 512 to 128. All of the lamps are instance duplicates of each other, so it will automatically update. Posting your FPS differences can be useful.

Here’s the patch for it. I also made an example blend file that you can find here.

As a side-note, this is a recent build from SVN, so some new features from Moguri’s Swiss branch have been added to Trunk. Among others, caching for faster material conversion was added (I believe this is done on playing the game / loading the scene). This caching relies on materials and doesn’t play nicely with the old, simple “UV-image, no / one material” method of texturing objects with Multi-texture / Single-texture mode. So, if you run a blend file with Multi-texture / Single-texture shading with this or trunk builds of Blender, disable the caching to have it look normal. Alternatively, enable it and fix your materials up to take advantage of the faster loading.

EDIT: My patch was committed to trunk! You should be able to just get a fresh build from the build bot tomorrow (or when it’s >= r53319) and use it normally.

This is quite nice!But this works well only for indoor scenes.116 fps for 34k faces and 20 shadow lamps is pretty neat.

please fix the Windows 32-bit build .dll missing :

  • libgcc_s_dw2-1.dll
  • libstdc+±6.dll
  • libgomp-1.dll

Actually, my patch was committed to trunk. You should be able to just get a fresh build from the build bot tomorrow (or when it’s >= r53319) and use it normally.

Wow? Really? Greaaat.