Gazebo | Ignition | Community
Ask Your Question

Dae texture loading error

asked 2017-10-23 00:01:02 -0500

yjy765 gravatar image

updated 2017-10-23 06:16:45 -0500

Hello, I am trying to create a model from Blender and then import the dae file in Gazebo

First, I tried to make a tree with the files in gazebo_osrf/pine-tree ( I am going to make another model so please don't tell me just use the given model

And the result is as follow: image description

The leaf texture was loaded well but bark seems not being loaded

Following link contains all files I made:

There is no clear tutorial for how to create sdf files, material files etc so I just mimic what 'pine tree' models just did.

What did I do wrong and what should I do?

I would really appreciate if anyone tell me in detail. Thanks


I think adding mesh on plane goes well. But adding mesh on cube or cylinder etc just takes a simple color of mesh image.(Brown color for bark image)

p.s. In Blender, all parts look well

edit retag flag offensive close merge delete


when you export the dae file from blender, did you also export the texture uv coordinates? I remember there is an checkbox option for this

iche033 gravatar imageiche033 ( 2017-10-23 20:22:55 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2017-10-24 10:54:42 -0500

chapulina gravatar image

You're almost there. By applying the bbb/Circle material to the Plane submesh (the trunk), you're telling Ogre to override the material defined on the Collada file. However, the mesh still needs to have proper UV coordinates so Ogre knows how to distribute the texture along the mesh. That's currently not well set, so the mesh is stretched in such a weird way that the tree looks like it has a plain brown color.

I did a quick dirty UV projection using Blender's "Smart UV Project" and the updated DAE works with your material files:

image description

You can see the texture is stretched though, so you would probably be better off carefully adjusting the texture instead of using smart UV project. Search online for tutorials on UV unwrapping with Blender ;)

edit flag offensive delete link more



Thank you so much! It works!

yjy765 gravatar imageyjy765 ( 2017-10-25 05:00:49 -0500 )edit

Glad to hear :) Feel free to accept the answer so others know it works in the future

chapulina gravatar imagechapulina ( 2017-10-25 10:12:58 -0500 )edit

Question Tools

1 follower


Asked: 2017-10-23 00:01:02 -0500

Seen: 2,021 times

Last updated: Oct 24 '17