Blur shading test

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

Post Reply
jvprat
ScummVM Developer
Posts: 76
Joined: Mon Oct 30, 2006 9:10 pm

Blur shading test

Post by jvprat »

Hi, today I've begun experimenting a little with the ScummVM theming. I've added a new shading effect that blurs the background when a new dialog appears (instead of the default dimming).

Here are some screenshots:
Image Image Image Image

It's just a proof of concept. It has a configurable radius and it could be mixed with dimming to get a better global effect.

So, now to the problem: the current implementation is very very slow (around 7sec unresponsive waiting to show the new dialog). Is it worth trying to optimize it, or it's very improbable that it would get accepted?

Any feedback will be welcome :)
User avatar
DrMcCoy
ScummVM Developer
Posts: 595
Joined: Sat Dec 17, 2005 1:33 pm
Location: Braunschweig, Germany
Contact:

Post by DrMcCoy »

I can have that faster, I just need to take off my glasses! ;)
fingolfin
Retired
Posts: 1452
Joined: Wed Sep 21, 2005 4:12 pm

Post by fingolfin »

Seems like a nice idea. But you really have to do it a factor 1000 faster or so :). The current dimming code already is far too slow, IMO (due to the fact that it uses colorToRGB and RGBToColor on each pixel -- that's very bad for performance, as it involves calling virtual methods in a tight loop, which the compiler has no chance of optimizing.

maybe you are doing something like that, too? In that case, first grabbing the whole screen content, converting it to a suitable format (16 or 32 bit data) then running your filter and then converting back might already give a big speed boost (at the expense of memory).

Furthermore, consider using an alternate algorithm which maybe is not "mathematically correct", but looks good enough. After all, nobody will care how exactly the "blurry" effected was created :)

We use that for the aspect ratio correction, for example: The code is not doing 100% precise stretching, which most people never notice, yet is an order of magnitude faster.
Kirben
Posts: 421
Joined: Wed Sep 21, 2005 12:15 pm
Location: Melbourne, Victoria, Australia

Re: Blur shading test

Post by Kirben »

It is a terrible idea, the current dimming effect is bad enough.

The current screen shouldn't be made more difficult to see, just because the GUI is currently been shown.
clem
Posts: 2159
Joined: Mon Oct 31, 2005 11:14 am

Re: Blur shading test

Post by clem »

Kirben wrote:It is a terrible idea, the current dimming effect is bad enough.

The current screen shouldn't be made more difficult to see, just because the GUI is currently been shown.
dimming is useful in the launcher though so you can easily see what the current active dialog is - http://sourceforge.net/tracker/index.ph ... tid=418823
Kirben
Posts: 421
Joined: Wed Sep 21, 2005 12:15 pm
Location: Melbourne, Victoria, Australia

Re: Blur shading test

Post by Kirben »

clem wrote: dimming is useful in the launcher though so you can easily see what the current active dialog is - http://sourceforge.net/tracker/index.ph ... tid=418823
Yes, it can be useful inside the GUI interface. But not when used over the complete screen of a game in progress.
Post Reply