Log in or register to post comments

Render the object with texture files

April 4, 2012 - 11:45am #1

Hi everyone,
I was trying to render the 3D object downloaded from here: http://thefree3dmodels.com/stuff/accessories/converse_all_stars/21-1-0-663 ,
I can successfully convert it to .h file using obj2opengl, however I encountered 2 problems.

1) the result of the object is not complete, it showed part of the complete object (only some of the triangles)

2) this object contains 2 texture files and i don't know how to use them (so i just test it with the banana's texture file)
the 2 texture files are

The ideal result

May i get help from all of you? Thank you.

Re: Render the object with texture files

April 9, 2012 - 11:09pm #7

Hi,

Can any one help me here how to export the texture file(.jpeg/.png) from 3D studio max which already bind with the model. Therefore, I can use exported texture file (.jpeg/.png) in the coding. I am struggling to export the texture after designed the model from 3D studio max in proper way. As a result, my 3D model is not showing proper texturing in AR.

Regards

Rassall

Re: Render the object with texture files

April 5, 2012 - 4:02pm #6

Be sure to triangulate the model.

- Kim

Re: Render the object with texture files

April 5, 2012 - 9:47am #5
robertross wrote:

Hi anthonyhui,

I couldn't see your images so I'm not sure what was wrong with your model.
Regarding number 1) it could be that the obj isn't in the right format for that obj2opengl script.
When exporting from Blender you have to be quite specific about what information you want in your .obj

Thank you robertross, i updated the image link so i think it's ok now. Do you have any idea on it? because i can render part of it but not the whole:(

Re: Render the object with texture files

April 5, 2012 - 9:45am #4
Sceada wrote:

Only a quick idea.
Merge both textures to one texture and re texture your model with the merged texture, or split your object into two parts and load them seperatly with their own texture.

Load two different texture
      else if (strcmp(trackable->getName(), "MassEffect2") == 0)
        {
            textureIndex = 4;
			textureIndexzwei = 3;
			
            check = 3;
        }

       const Texture* const thisTexture = textures[textureIndex];
		//Die zweite Textur an das Texturobjekt übergeben
		const Texture* const thisTexturezwei = textures[textureIndexzwei];

Load your object in Blender and do a UV Unwrap. First you have to make your own pattern with the "mark seam" function in Blender.

For more detailed explanation it's too late for me here in Germany ;)

Thank you Sceada, i got your idea and i will try to search the method about UV Unwrap in Blender:)

Re: Render the object with texture files

April 5, 2012 - 3:22am #3

Hi anthonyhui,

I couldn't see your images so I'm not sure what was wrong with your model.
Regarding number 1) it could be that the obj isn't in the right format for that obj2opengl script.
When exporting from Blender you have to be quite specific about what information you want in your .obj

Re: Render the object with texture files

April 4, 2012 - 2:48pm #2

Only a quick idea.
Merge both textures to one texture and re texture your model with the merged texture, or split your object into two parts and load them seperatly with their own texture.

Load two different texture
      else if (strcmp(trackable->getName(), "MassEffect2") == 0)
        {
            textureIndex = 4;
			textureIndexzwei = 3;
			
            check = 3;
        }

       const Texture* const thisTexture = textures[textureIndex];
		//Die zweite Textur an das Texturobjekt übergeben
		const Texture* const thisTexturezwei = textures[textureIndexzwei];

Load your object in Blender and do a UV Unwrap. First you have to make your own pattern with the "mark seam" function in Blender.

For more detailed explanation it's too late for me here in Germany ;)

Log in or register to post comments