viromedia / viro

ViroReact: AR and VR using React Native
MIT License
2.29k stars 481 forks source link

[Question] - Can we feed color filters to ViroCamera? #475

Closed tetreault closed 5 years ago

tetreault commented 5 years ago

Description

Hello again! I have a question regarding ViroCamera. One part of this prototype I'm building out (iOS only), we want to fake a "thermal imaging" style view from the camera. We found a way to apply color filters straight to the camera output from the iphone's camera natively in Swift using AVFoundation. First we apply a color inversion on the camera feed, then a black & white filter, then lastly we apply a color transformation which gives a cool fake "thermal imaging" sort of look to it. Since we're building this prototype in React Native we'd ideally love a way to handle this all in RN instead of trying to bridge some native code if not possible.

Is this something we're able to mess around customizing with Viro? I'd love to ideally be able to use ViroCamera instead of relying on something messy like react-native-camera and trying to hack that module to make this work.

Any pointers you can provide for this would be amazing, otherwise I understand if this customization is not capable. If it is not capable, do you think there would be issues creating this app with Viro, but relying on react-native-camera for one of the screens before using react-navigation to navigate to the ViroARScene.

dam00n commented 5 years ago

Hi @tetreault, we don't currently offer that functionality where you can apply your own color filters to the camera output. We do have a set of post processing effect (one of which is thermal) that you can apply -> https://docs.viromedia.com/docs/viroarscene#post-process-effects