Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature Request] Blur Effect #76

Open
dementia2029 opened this issue Apr 11, 2018 · 5 comments
Open

[Feature Request] Blur Effect #76

dementia2029 opened this issue Apr 11, 2018 · 5 comments

Comments

@dementia2029
Copy link

Hi, ViroCore team!
I need to set listener to every rendered frame to apply blur effect to every frame. As I understood, I should use:
mViroView.getRenderer().addFrameListener(NativeFrameListener)
But NativeFrameListener consructor is not public, so Listener can not be setted.
What can I do?

@dthian dthian changed the title Get every rendered frame as a bitmap or listener to every rendered frame Set FrameListener to Apply Blur Effect Apr 11, 2018
@dthian
Copy link
Member

dthian commented Apr 11, 2018

As mentioned, in Slack conversations:

Currently the addFrameListener API was not meant for public use. Event if it were, adding FrameListeners for your use case of blurring the output frame is not really a proper nor efficient approach.

Ideally, your blur effects will be applied as shader code that you can provide the ViroRenderer to run efficiently on the render thread. Unfortunately we don’t really have custom shader APIs at the moment. But If you really would like to see that feature implemented, please update this Github issue with:

  • A description of the feature you’d like to see added to the platform.
  • A range of dates of when you might need it by.
  • If you are shipped blocked by it.
  • Update the title to reflect the feature request.

@dementia2029
Copy link
Author

Hi, @dthian . Thank you for your response.
I uploaded the video that we had implemented in ARKit. We need a feature something like that:
https://youtu.be/feGZfR15dHQ

  • It would be nice to get a method with only one argument "blur percent" of type float;
  • the blur effect should be applied only on camera view and 3d objects on surface;
  • the blur effect should not be applied on inflated ar_hud layout.

About dates: we are working on a real project now, but of course we can wait some time.. But this feature is really needed.
Also, this feature could be very useful when we call a dialog or any overlay.

Thank you for your responsiveness!

@dementia2029 dementia2029 changed the title Set FrameListener to Apply Blur Effect [Feature Request] Blur Effect Apr 12, 2018
@dthian
Copy link
Member

dthian commented Apr 12, 2018

Thanks @dementia2029 for providing the descriptions of your feature request!
For the blur effect in your app, is is required that it be dynamic? That is, does/must the blurred scene behind your UI table always reflect the latest camera frame? If not, you might be able to mitigate this quickly by taking a quick screenshot of the scene, and then blurring the static result in an Android Image View, to be placed behind your UI table.

@dementia2029
Copy link
Author

Hello, @dthian. The best choice is to be dynamic, with ability to change blur radius or percent in any time. For example, we need to add listener to the sliding panel, get percent of swiped height and pass this as an argument to the "blur method".

Your suggestion about making screenshot and pass to Image View is quite nice, but it does not satisfy the original idea. Thank you.

@dthian
Copy link
Member

dthian commented Apr 13, 2018

No worries, I was trying to better understand the requirements of the feature asks to see if I can get you unblocked quickly. We've added a "blur effect" story in our backlog that effectively:

  • Blurs the scene that is rendered in the ViroView
  • Provides the ability to control the amount of blur.

We haven't yet decided on the release date for this feature, but will update this issue once that has been decided, and later on when it has been pushed into release. If you are on a tight timeline with quickly approaching near-term deadlines, please let us know, and provide the desired dates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants