Log in or register to post comments

Change the displayed box texture

May 18, 2011 - 2:32am #1

Hi,
i am new to Android and AR.

i have played with the multi-target sample and i want to detect the image targets but instead of the 3d object i want to change the look of the box - i want to display another box to the user with my textures or my text on the walls. So the user will see a box with the same size but with another skin.

is this possible?

thanks,
Ariel.

Re: Change the displayed box texture

May 18, 2011 - 12:11pm #4

The yellow wireframe is actually a 3D model, see jni/Cube.h. It is a unit cube that is scaled to match the box size.

See this thread for some help rendering a plane, there's a post containing vertex data a few down:

http://ar.qualcomm.at/node/2000302

Try rendering a single plane first. Then you'll need to use rotations, translations, and scales to create a box from six planes.

- Kim

Re: Change the displayed box texture

May 18, 2011 - 11:12am #3

Thanks Kim ,
if i choose to separate the object into 6 panels, any idea where to begin?

i thought that since i can see a yellow frame that marks the cube i can use this to position my panels.
any idea where is the code for this frame ?

thanks,
Ariel.

Re: Change the displayed box texture

May 18, 2011 - 4:47am #2

Sure, this should be relatively easy. You can model a 3D box with the same dimensions as the physical prop, and use a single texture that wraps all sides. Or, you could render 6 planes sized and positioned just right, each with its own texture. You're still just rendering a 3D object over the camera image.

- Kim

Log in or register to post comments