Use blender model in ARToolkit but cannot display the materials. Why?

246 views Asked by At

I use blender to create a model like an apple like this: The model in Blender

And I export the model, getting a .obj file and a .mtl file, then I copy those two files into the folder of ARToolkit - examples/.../models - and change the setting in models.dat file by adding this:

models/Apple.obj 0.0 0.0 0.0 90.0 1.0 0.0 0.0 10.016 10.016 10.016 MARKER 1

But the model display without material like this: The rendering effect seen in the camera

What should I do to display the model with material?

1

There are 1 answers

0
Thor_Bux On

you didn't provide a lot of information. But from the information I can see you can try the following. Sometimes the textures in the material are switched so you can try and load the obj using this function:

glmReadOBJ3(model0file, 0, 0,true); // context 0, don't read textures yet. The last parameter forces the rendering to flip the texture when rendering which might help in your case.

Documentation for this function is here: https://github.com/artoolkit/artoolkit5/blob/master/include/Eden/glm.h#L386

Let me know if that works for you.