Typically: "How do I... ", "How can I... " questions
-
xelda1988
- Posts: 13
- Joined: 02 Jul 2013, 17:13
Post
by xelda1988 » 13 Mar 2014, 16:26
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
- Site Admin
- Posts: 7450
- Joined: 14 Dec 2012, 00:25
Post
by coppelia » 14 Mar 2014, 09:59
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
Post
by xelda1988 » 14 Mar 2014, 13:33
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
- Site Admin
- Posts: 7450
- Joined: 14 Dec 2012, 00:25
Post
by coppelia » 14 Mar 2014, 13:55
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
Post
by xelda1988 » 14 Mar 2014, 20:05
The path seems to be correct,
as mentioned I can open it in Blender.
I sent you as well the correct Link now.
-
coppelia
- Site Admin
- Posts: 7450
- Joined: 14 Dec 2012, 00:25
Post
by coppelia » 16 Mar 2014, 23:09
You are right.
We'll look into this.
Cheers
-
coppelia
- Site Admin
- Posts: 7450
- Joined: 14 Dec 2012, 00:25
Post
by coppelia » 18 Mar 2014, 21:23
We have found the bug. It will be corrected in next release (V3.1.1)
Cheers