Reputation: 91
I am developing an android app using vuforia sdk. Here I have succefully rendering my 3Ds max models in the app. However now I need to render translucent models.Is there a way to control the transparency of the 3D model using Vuforia sdk?
Upvotes: 0
Views: 1306
Reputation: 4941
I recently modified a Vuforia sample app, and had to modify the renderer (JNI method Java_com_qualcomm_QCARSamples_[...]_renderFrame(JNIEnv *, jobject)
) in order to display transparent objects by adding :
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
at the beginning of the function, and
glDisable(GL_BLEND);
at the end of it.
It may be what you're looking for!
Upvotes: 8
Reputation: 85
Im not at my computer with unity at the moment, so I cant give exact info but its not the model that you are trying to change the transparency on.
You want to change the alpha levels of the texture that is attached to the model, look at alpha and alpha blend shaders to give you the general direction you want to head in. Of course if you are not looking to adjust the alpha dynamically then you could just lower the opacity in photoshop and attach that to your model.
If you get stuck let me know and when I get back to my comp I can help a little more
EDIT I assumed you were using unity3d this might not be the case in which case I would say try adjusting the opacity of the textures in PS and run it then.
Upvotes: 0