Log in or register to post comments

problem related with textures on 3d model i created

December 26, 2011 - 9:37am #1

I made a 3 d model in 3ds max and converted it into .h file using the 'perl' script described in this forum. I imported that in to my code.3d model was overlayed successfully but the texture was not overlayed. i.e whole 3d model was of single texture (teapotblue and teapotbrass in this case) I want to have the textures and materials over the 3d model as i created.To be more specific suppose that my model is a house with red roof,blue and green walls and brown doors with materials added to it. With my current code i am getting only whole blue or whole brass coloured model of house. (i editted imagetargets.cpp )

Re: problem related with textures on 3d model i created

December 27, 2011 - 1:05pm #4

OpenGL ES doesn't know anything about the materials you use in 3ds max. Typically, you export four things from your 3D modeling software that OpenGL can use:

- vertex arrays
- normal arrays
- texcoord arrays
- textures

Our samples show how to feed these four things to OpenGL ES for rendering. I suggest baking your material effects into a texture that can easily be applied to your model using our current sample code. Note that such a texture won't take advantage of dynamic lighting, so effects like specular highlights won't come through. For dynamic lighting effects, you will need to learn some OpenGL ES basics.

- Kim

Re: problem related with textures on 3d model i created

December 27, 2011 - 7:35am #3

thanks kim for that quick response.... does that mean i cant have that exact model overlayed over the trackable?? adding texture to the 3d model during its creation in 3ds max is of no use??

Re: problem related with textures on 3d model i created

December 26, 2011 - 3:44pm #2

It will be simplest if you can create a single texture that can be applied over your entire model. Using your 3D modeling tool, can you bake your materials into a single texture? Look for a tutorial on "render to texture" or "texture baking".

Then, follow the steps outlined here to load your texture: http://ar.qualcomm.at/node/2001282

- Kim

Log in or register to post comments