Log in or register to post comments

Transparent object

June 4, 2016 - 9:54am #1

Hi

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

thanks

Transparent object

June 12, 2016 - 12:35pm #4

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.

The relevant source code is in ImageTargetsRenderer class, if you are using the Image Targets sample app as a starting point; look in the Render() method.

 

Transparent object

June 6, 2016 - 9:25am #3

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)

if yes,

between which lines  exactly should I implement  these lines?

or am I on the wrong way to solution?

Thanks

 

 

Transparent object

June 6, 2016 - 6:20am #2

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

- you implement a Fragment Shader that sets the opacity (alpha component) of your fragment color, either based on a per-vertex attribute passes from the Vertex Shader, or through a Uniform shader parameter set by the application 

Log in or register to post comments