Author Topic: Optimized version of Blur (my example is 30x the speed)  (Read 615 times)

0 Members and 1 Guest are viewing this topic.

Ben

  • World Machine Guru
  • ****
  • Posts: 61
    • View Profile
    • http://home.comcast.net/~benbeckwith/portfolio
Optimized version of Blur (my example is 30x the speed)
« on: February 25, 2017, 05:52:47 PM »
Welcome back Stephen! One trick I use to optimize my large scale blur's is to use 2 Blur's. First blur is 1/4 resolution followed by a second, full resolution blur (in pixel space rather than world) with a distance of 4 to match the 1/4 scale difference of the previous blur. This usually gives me indistinguishable results but is incredibly fast. For example, I'm currently replacing a blur which takes 4:47 to render at full resolution (8192) on 40 cores and 210 GB of memory. The optimized version takes 9 seconds.
« Last Edit: February 25, 2017, 05:55:05 PM by Ben »

JakBB

  • World Machine Guru
  • ****
  • Posts: 78
    • View Profile
Re: Optimized version of Blur (my example is 30x the speed)
« Reply #1 on: February 26, 2017, 02:20:56 AM »
That sounds insane! What resolution did you set the first blur?

I think there is so much potential with the single device resolution settings and barely anyone uses it.
Especially with blurs, expanders and layout generators, in almost every case of using those devices you don't actually need a 1 to 1 resolution for those devices, I highly recommend everyone to try and mess around with that setting.
While we are at it, it would be amazing if you could change resolution of devices based on the group they are in, that could speed things up by quite a bit for large projects


Ben

  • World Machine Guru
  • ****
  • Posts: 61
    • View Profile
    • http://home.comcast.net/~benbeckwith/portfolio
Re: Optimized version of Blur (my example is 30x the speed)
« Reply #2 on: February 28, 2017, 02:03:54 AM »
Perhaps I'm misunderstanding but you can set a group resolution override in the group settings.

In my macro, which I attached, the first blur is 2048 followed by a full res blur with a pixel distance of 4 (Scale-Independent unchecked) since the previous low res blur has pixels that are 4x too big. WM's resolution up-sampling bicubic soft mode might replicate what my second blur is doing but I've never been too sure about it so I just do it manually.

This can of course be easily modified to handle lower resolutions, unfortunately there's no good way for me to make it universal with any resolution, which is why I would love a proper implementation in WM's Blur. For now you have to go into the macro and set the first blur to 1/4 your world resolution. Or 1/2 and then set the 2nd blur distance to 2.
« Last Edit: February 28, 2017, 02:07:19 AM by Ben »

JakBB

  • World Machine Guru
  • ****
  • Posts: 78
    • View Profile
Re: Optimized version of Blur (my example is 30x the speed)
« Reply #3 on: February 28, 2017, 07:30:42 AM »
Oh my god you actually can override it for a group, that's awesome!
You learn more and more with every day :)

Also are you on the newest WM version? Because with dev3014 a new blur type was implemente: Approximate, it's standard blur, less precise but much faster, I think that would fit your needs
« Last Edit: February 28, 2017, 07:33:00 AM by JakBB »

Yeti

  • Community Member
  • **
  • Posts: 2
    • View Profile
Re: Optimized version of Blur (my example is 30x the speed)
« Reply #4 on: March 11, 2017, 01:36:38 PM »
Oh my god you actually can override it for a group, that's awesome!
You learn more and more with every day :)

Also are you on the newest WM version? Because with dev3014 a new blur type was implemente: Approximate, it's standard blur, less precise but much faster, I think that would fit your needs

The approximate blur option is also available on earlier 3.0 builds :)

Ben

  • World Machine Guru
  • ****
  • Posts: 61
    • View Profile
    • http://home.comcast.net/~benbeckwith/portfolio
Re: Optimized version of Blur (my example is 30x the speed)
« Reply #5 on: March 29, 2017, 06:49:33 PM »
I'm on latest yeah. I'm glad I could help!

I just usually try to avoid approximate since it creates a blocky shape and often it's not much faster unless I'm doing a really large blur...in which case I find the quality of this 2 step method to be better looking. When I'm lazy I just use a single downsampled blur. It really all depends on if there's a lot of noise added down the chain, if you plan to add more noise then the quality doesnt matter so much.