Getting to know Shader Approach
In this tutorial, you will learn how to paint walls using the Remodel-AR framework's Floor plan approach.
Before starting this tutorial, make sure you've completed Setting up Remodel-AR in Android.
Step 1:
You shall wait for callbacks from the configure() method, Once you get callback in onPassioSDKReady()
Step 2:
First let us supply the color and/or texture that we want to paint the wall with, you can pass any color hex in this format #RRGGBB, metadata can also be supplied with it using below code:
It is also possible to set color/texture individually using this methods:
with pickTexture() you can directly pass bitmap as texture.
Step 3:
To start Shader approach, you can simply call startShaderApproach(), it will do necessary initialisation for using Shader approach
Step 4: Choose occlusion color
We can use this approach for ARCore not supported devices. here we can apply color over the selected area which contain the same color by selecting three different shadows(Lighter, Medium and Dark) of same color using below methods.
After making call of above function, whenever user will tap on visible camera frame, it will automatically pick color from touched point.
Step 5: Apply threshold value
Using OcclusionThreshold user can set threshold value from 0 to 100 to manage better visibility of paint area occlusion.
If at any point you need help from the Passio team, please reach out to us at support@passiolife.com
Last updated