Page 1 of 1

import textured mesh

Posted: 13 Mar 2014, 16:26
by xelda1988
Hi

I want to import with simImportShape a textured mesh during simulation with a lua chilscript.
I already read some posts, which say it seems to work, but for me
only the mesh without texture is imported when using the lua function:

Code: Select all

shapeHandle=simImportShape(0,importShapePathList[1],0,0,0.001)
Whats the problem?
Cheers,
Alex

Re: import textured mesh

Posted: 14 Mar 2014, 09:59
by coppelia
Hello Alex,

currently the simImportShape API function will not preserve textures. But in next release, you will be able to set bit5 (i.e. 16) of the options argument, in order to preserve attached textures (currently only with the OBJ fileformat).

Next release will also have a new API function (simCreateTexture) that can import images onto planar shapes.

Next release (V3.1.1) is squeduled for the end of March 2014.

Cheers

Re: import textured mesh

Posted: 14 Mar 2014, 13:33
by xelda1988
Related to that I have another questions:

I have 2 different .obj files:

The first (object1) is imported correctly (manual import) with texture.
The second one (object2) is not.

When I import both of them in Blender, it works. And I compared the files, there does not seem to be a big difference.

Could you have a look at it, I sent you a link to the files in a PN.

Thanks for the fast answer by the way,
Alex

Re: import textured mesh

Posted: 14 Mar 2014, 13:55
by coppelia
you just sent a V-REP scene file (no obj files), and there is no object1 nor object2.

Try to open the related OBJ files with a text editor, and check the related material file: it happens often that the path of the material is not correctly written in the first place.

Cheers

Re: import textured mesh

Posted: 14 Mar 2014, 20:05
by xelda1988
The path seems to be correct,
as mentioned I can open it in Blender.
I sent you as well the correct Link now.

Re: import textured mesh

Posted: 16 Mar 2014, 23:09
by coppelia
You are right.

We'll look into this.

Cheers

Re: import textured mesh

Posted: 18 Mar 2014, 21:23
by coppelia
We have found the bug. It will be corrected in next release (V3.1.1)

Cheers