I'm looking for the way to acomplish something like this http://prntscr.com/6qciei
I have location map which is supposed to be opened spet by step (surprisingly, isn't it? ). Well, I want only the active location to be sharp, the rest of the map should be blurry like the one on the sreenshot. How would you do this in starling?
In typical flash I'd probably use BitmapData#draw to draw map into the bitmap image, added the image right over my map, used Erase mode to create a hole under the target location button, and then applied blur filter to the overlay.
I can pretty much do the same here, but I'm afraid it will be way too "expensive", since it's a mobile game.
Maybe there's some better way? Or am I better off without this idea?
p.s. the map is starling Sprite containing starling Images and MovieClips.
Blur unfocused part of image. Looking for the (best) way to do it(4 posts) (2 voices)
No other way of doing it than the one you described, really. If the map you're blurring is animated, you should each frame:
1. Draw the whole map (part visible on the screen) to RenderTexture.
2. Draw a hole in the texture (BlendMode.ERASE) with a circular display object (Image with a circular texture probably).
3. Pass the render texture to an Image instance and draw this image over your map.
4. Add a BlurFilter to the Image.
Because the whole thing is blurred you can probably get away with using a lower resolution texture. And it doesn't really have to be slow, without too many blur passes (using low res texture for higher blur) you should get a decent framerate.
That's bad.. well, I'll do it this way then. Thanks for the reply, booster
You must log in to post.