## import textured mesh

Typically: "How do I... ", "How can I... " questions
xelda1988
Posts: 13
Joined: 02 Jul 2013, 17:13

### import textured mesh

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

coppelia
Posts: 7911
Joined: 14 Dec 2012, 00:25

### Re: import textured mesh

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

xelda1988
Posts: 13
Joined: 02 Jul 2013, 17:13

### Re: import textured mesh

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

coppelia
Posts: 7911
Joined: 14 Dec 2012, 00:25

### Re: import textured mesh

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

xelda1988
Posts: 13
Joined: 02 Jul 2013, 17:13

### Re: import textured mesh

The path seems to be correct,
as mentioned I can open it in Blender.
I sent you as well the correct Link now.

coppelia
Posts: 7911
Joined: 14 Dec 2012, 00:25

### Re: import textured mesh

You are right.

We'll look into this.

Cheers

coppelia