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?
2 Answers
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!

- 4,851
- 23
- 25
-
When using a blending technique, it is recommended to sort your scene objects back to front and preferably render the opaque objects first (see for example http://www.opengl.org/wiki/Transparency_Sorting). – Raphael Grasset Jul 19 '13 at 12:47
-
Thanks man, saved my day :) On most devices, everything works fine if you do not call glDisable at all, but on some it makes video background disappear. – daemontus Feb 09 '14 at 21:07
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.

- 85
- 9