"We offer new support options and therefor the forums are now in read-only mode! Please check out our Support Center for more information." - Vuforia Engine Team

Transparent object

Hi

how is it possible to change the TeapotĀ  model as Transparent Teapot in Imagetargets ?

thanks

AlessandroB

Mon, 06/06/2016 - 13:20

This is more of an OpenGL question than a "Vuforia specific" one.

You can render transparent models so long as:

- you enable Alpha Blending in your OpenGL pipeline: https://www.opengl.org/archives/resources/faq/technical/transparency.htm

As I understand I should enable Alpha Blending with the following lines :

glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);

but (for imageTargets sample) :

-Should I do that in Renderer Source code? (for example imageTargetsRenderer.java)

AlessandroB

Sun, 06/12/2016 - 19:35

Yes, those 2 lines enable alpha blending; typically you'll want to add those lines right before rendering the augmentation (your transparent objects), right after drawing the video background. 

You'll also want to disable GL_BLEND after rendering the augmentation.