Sie sind nicht angemeldet.

Lieber Besucher, herzlich willkommen bei: krpano.com Forum. Falls dies Ihr erster Besuch auf dieser Seite ist, lesen Sie sich bitte die Hilfe durch. Dort wird Ihnen die Bedienung dieser Seite näher erläutert. Darüber hinaus sollten Sie sich registrieren, um alle Funktionen dieser Seite nutzen zu können. Benutzen Sie das Registrierungsformular, um sich zu registrieren oder informieren Sie sich ausführlich über den Registrierungsvorgang. Falls Sie sich bereits zu einem früheren Zeitpunkt registriert haben, können Sie sich hier anmelden.

1

Freitag, 7. April 2017, 23:03

Postprocessing Plugin Example - Multi-Pass-Blur

Hi,

according to this request here:
WebGL createPostProcessingShader returns null
I have made a postprocessing plugin example that blurs the pano image (with an approximated gaussian blur).

Here a demo:
Postprocessing Plugin Example - Multi-Pass-Blur

The plugin source:
postprocessing_multipass_blur.js

The example xml: (changes the blur in a loop)
postprocessing_multipass_blur.xml

Here the full example for downloading:
krpano_postprocessing_multipass_blur.zip

The image will be blurred in 6 rendering passes with 9-taps/samples per pixel. That's quite a lot and a requires a good GPU for good performance.
When only lower blurring ranges are requires the number of passes could be reduced to 2 or 4 in the plugin source for better performance.

Best regards,
Klaus

2

Sonntag, 9. April 2017, 13:41

*thumbsup* Wow. Could be useful. Thanks.

Beiträge: 770

Wohnort: Russian Federation

Beruf: Interpreting, Building virtual tours

  • Nachricht senden

4

Montag, 10. April 2017, 11:29

Really cool stuff, Klaus! Thanks a lot! *thumbup* *thumbsup*
Regards,

Alexey

ramirox3

Fortgeschrittener

Beiträge: 354

Wohnort: La Ceja, Colombia

Beruf: photographer

  • Nachricht senden

5

Montag, 10. April 2017, 15:59

I would like to know what could be a creative use of this plugin. I would like to hear something about it
Ramiro

6

Montag, 10. April 2017, 17:27

@klaus...

did you test the optimal samples per blur value ?

perspixe

Schüler

Beiträge: 64

Wohnort: Bologna, Italia, Vancouver, BC

  • Nachricht senden

7

Dienstag, 28. November 2017, 12:26

This is working great. on a 650M 1080p fullscreen.
Android S7 with Opera jumpy frame rate. Will try lower demanding settings.
Is it possible to define a mask to apply the blur?
- only on certain areas of the pano (hv coordinates)
- only on certain areas of the screen (circle feathered mask for example).
That's a demanding... ;-)
Very impressed.

4 passes still too much for S7, 2 ok and not too visible artifacts on small screen, but on a desktop, 2 has a lot of artifacts.

8

Donnerstag, 11. Januar 2018, 21:10

Just to verify:

i can do this also with a simple 'tween' action on the blur right?

Quellcode

1
2
3
4
5
<action name="add_blur">

tween(plugin[pp].blur, 4, 1);
        
</action>


It does work, but maybe it might be too heavy on calculations?

Edit: (Extra question):

can the image also be 'darkened' abit with this plugin?
Where do i add the settings to do this?

(Just a setting in the js, not to interact with it via layer. Although that would make it a lot cooler *smile* )

Sergey74

Fortgeschrittener

Beiträge: 193

Wohnort: Russia, Chelyabinsk

Beruf: professional noob

  • Nachricht senden

9

Freitag, 12. Januar 2018, 10:45

can the image also be 'darkened' abit with this plugin?
Where do i add the settings to do this?
Just add a black layer with the necessary transparency
See example https://panosphera.ru/blog/virtual-tour/montenegro - click the share button or settings ︙
translation difficulties *huh*

10

Freitag, 12. Januar 2018, 10:55

Just add a black layer with the necessary transparency


Yes thanks for the insight! thinking outside the plugin of course :)


Edit:
this little bit did the trick:

Quellcode

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
<action name="add_blur">

        tween(plugin[pp].blur, 4, 1);

        addlayer(blur_shader);
        set(layer[blur_shader].type, container);
        set(layer[blur_shader].zorder, 50);
        set(layer[blur_shader].align, lefttop);
        set(layer[blur_shader].width, 100%);
        set(layer[blur_shader].height, 100%);
        set(layer[blur_shader].bgcolor, 0x000000);
        set(layer[blur_shader].bgalpha, 0.15);
        set(layer[blur_shader].bgcapture, false);
        set(layer[blur_shader].handcursor, false);
        set(layer[blur_shader].alpha, 1);
        set(layer[blur_shader].keep, true);

    </action>

    <action name="remove_blur">

        tween(plugin[pp].blur, 0, 0.5);
        tween(layer[blur_shader].alpha, 0, 0.5, '', removelayer(blur_shader) );


    </action>

11

Sonntag, 13. Mai 2018, 13:53

Hi Klaus

Would it be possible to define area inside sphere where to apply the blur?
E.g.

Quellcode

1
set(plugin[pp].blur, 4, ath_top_left,atv_top_left, ath_bottom_left, atv_bottom_left, ath_top_right, atv_top_right, ath_bottom_right, atv_bottom_right);

or
making bb plugin child of the distorted hotspot and then applying blur?

12

Sonntag, 13. Mai 2018, 17:20

@umalo
in the examples the effect always affects the complete panorama.
a mask would be possible in theory, but that would need a more complex implementation than the given examples.
also hotspots/layers can't be blurred like that, yet. i think klaus said maybe in some future update

Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von »indexofrefraction« (13. Mai 2018, 18:14)


360boy

Fortgeschrittener

Beiträge: 249

Wohnort: Mexico City

Beruf: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer

  • Nachricht senden

13

Dienstag, 20. August 2019, 17:39

Hello Klaus,
This is an awesome plugin and I have been using it for some time on desktop tour versions. Just recently I started using it as well on mobile devices as and found the following bug on an android phone (Moto G7 Power) where it degrades a lot the image quality just by being present (blur="0" at right side of the image, left side is without it being loaded. Check the helicopter icon) Already tested on other phones (iphone 8, galaxy s10) and everything is fine but as I can't guarantee this won't happen on other devices just removed it for mobile. Is there any turnaround for this? I really would like to keep this feature.
Best
»360boy« hat folgendes Bild angehängt:
  • blur_distortion.jpg

Sergey74

Fortgeschrittener

Beiträge: 193

Wohnort: Russia, Chelyabinsk

Beruf: professional noob

  • Nachricht senden

14

Dienstag, 20. August 2019, 19:59

I also wrote about it here
translation difficulties *huh*

360boy

Fortgeschrittener

Beiträge: 249

Wohnort: Mexico City

Beruf: Virtual tours, Krpano coding, Graphic Design, Photographer, Panographer

  • Nachricht senden

15

Mittwoch, 21. August 2019, 16:30

Same issue indeed Sergey74, in your post Klaus wrote about a possible recompression by internet provider but that's not the case as I'm having the issue locally with test server. It doesn't happens on all mobiles but's related to this blur plugin no doubt, when I disable it image gets back to normality.

Klaus, I can provide more details/screencaptures if needed, this is an awesome plugin, hope you can fix it.

Best

Ähnliche Themen