By cenk89
on Sat, 06/04/2016 - 16:54
Hi
how is it possible to change the TeapotĀ model as Transparent Teapot in Imagetargets ?
thanks
Hi
how is it possible to change the TeapotĀ model as Transparent Teapot in Imagetargets ?
thanks
This is more of an OpenGL
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
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)
Yes, those 2 lines enable
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.