looking for fast bloomfilter

Blitz3D Forums/Blitz3D Programming/looking for fast bloomfilter

Pinete(Posted 2006) [#1]
Hi,

During the past week I've been looking for functions
of BloomFilter. I've found the one write by Bouncer and
some other, but after implement it, I could see I lost a lot of framerate in order to the various renderworlds it
need to work, the one for render to 512x512 texture and
another one for blurring it.

My question is if someone knows if there exist some piece of code more optimized or the way in which I could optimize
it.

I am managing a scenario with 90 surfaces, 64,000 polys, about 25 textures of 512x512 and 12 animmesh enemies of 2,000 polys each one.

Before implement the bouncer bloomfilter I use to obtaion a framerate of 19-22 frames and after implement it, I obtain 8 to 11 frames.

My computer is a P4 2.6 with a X800 128Mb.

Some idea of how could I optimize this or some piece of code???

Thanks in advance!!!


Stevie G(Posted 2006) [#2]
Not sure about the bloomfilter in terms of optimization but you could be doing with reducing that surface count.

Depending on how your scene is set up you could combine some of the surfaces / entities which have the same brush properties. Also, make sure you use instancing ( copyentity ) where possible.

There will be many other areas which could be optimized but these are the main ones which spring to mind.

Stevie


Dreamora(Posted 2006) [#3]
The only way to optimize it is using Toms r2t.dll and instead of rendering to the backbuffer render to textures which you place then on the sprites.
That way you only need 2 renderworld calls per frame.

But in the end: even if optimized, your code needs some very good optimiations in other places ... 20 FPS on a X800? that means no FPS on normal graphic cards anymore.


Pinete(Posted 2006) [#4]
Stevie: Thanks a lot. I've attempted to maintain number of surfaces as small as possible yet... I've also used instancing for enemies, I just load one enemie and make "copyentities" for the others, but I've not notices a big speed increase.. I hope a bigger increase..

Dreamora: Thank you very much. Could you explain me a little more about how works the r2t.dll of Tom and where I could find it? A more complete information about framerates could be for example:
- Without load 12 animmesh enemies, without bloom and without shadows: 60-70fps
- Loading 12 animmesh 2000 polys enemies, without bloom and without shadows: 40-45fps
- Without bloom but with 2000 polys enemies (12) with swift shadows of 256x256: 19-22 fps
- With bloom and enemies with 256x256 swift shadows: 8-11

Any idea will be welcome!

thanks again!


Stevie G(Posted 2006) [#5]
I would recommend using ( flip false ) to get a true FPS reading. Also, put in some simple code to time your main functions and display them on screen to see where some of the other bottlenecks are.

Obviously shadows on animated meshes is giving you a big slowdown. Assume your only using a single light source for the shadows. Is your 60k poly level segmented into cullable areas ... I understand his system is optimised to work best this way. Also, have you tried using the fastest shadow method ... e.g. textured blobs under the characters?

Stevie


Pinete(Posted 2006) [#6]
yes, I have various types of shadows to choose, from textured blobs as you say to swift shadows of 256x256,
but where I can appreciate the maximum slowdown is when
activate the bloom. Is dramatic.
The problem is I would like to maintain a kind of bloom because it gives to the visuals a special consistence and
a actual game feeling..
That's the reason because I'm looking a similar function or the way in which someone help me to improve the current bouncer bloom..
I would be prepared to pay millions of dollars to achieve that!!! :)
The bouncer bloom is divided into two parts: The first one in the renderworld to a 512x512 texture, and the second one is to blurring that texture. I am trying to avoid the blurring making a bigger texture (1024x1024), but I don't know how could I adjust it to fix perfectly in the screen. All the attempts I've done has been time waste.
.......


Naughty Alien(Posted 2006) [#7]
I still think its too slow for dealing with 64000 polys and something about 12 textures and 90 surfaces..i got better results with weaker GPU and similar poly count with more textures..(nVidia 5600FX)