Home | Tutorials | Wiki | Issues
Ask Your Question
0

Textures/colors problem. Large model almost black

asked 2016-02-18 09:56:38 -0600

fqez gravatar image

updated 2016-02-18 11:10:22 -0600

Hi,

I have a problem with a collada (.dae) model and Gazebo. I've got a race circuit model made with sketchUp

image description

and I've exported it to a collada format (.dae). The problem is: when I import that collada file to Gazebo it appears almost black, as you can see in this image:

image description

You can see that the ground_plane model has proper lighting, unlike my model. I only can barely see the textures applied to the model if I get near to it (see the grass and the building):

image description

I'm almost sure that the problems come with the textures and color applied to the model, but I've no clue how to solve this issue. I've tried to modify the sun parameters in Gazebo, I've also tried to invert all the faces just to make sure is not a normals inverted problem, I've created a world with no lights at all and included an scene tas, as this one:

<scene>
    <ambient>0.5 0.5 0.5 1.0</ambient>
    <shadows>0</shadows>
</scene>

But all of this ends the same, the model almost black. I've also try to uncheck "cast shadows" in the sun model. Also, when I include a point light the changes on the lighting are negligible. After some researching within this forum, I've reached no answer to my problem.

Do you know what is happening?

Thanks in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2016-02-18 11:26:42 -0600

nkoenig gravatar image

The problem is likely in your collada file. The materials in the collada file may have very low ambient values.

Can you somehow share the collada file?

edit flag offensive delete link more

Comments

I'm not sure if I can post external links, but here we are: https://www.dropbox.com/s/imurx0jh9urpxr0/circuit.zip?dl=0 Thanks!

fqez gravatar imagefqez ( 2016-02-18 13:09:26 -0600 )edit

It looks like there are no `<ambient>` tags in your collada file. Gazebo defaults to an ambient value of `[0.4, 0.4, 0.4]` which could explain why your model is dim. Does Sketchup have options to add ambient values to a model?

nkoenig gravatar imagenkoenig ( 2016-02-18 13:48:42 -0600 )edit

No, I can't see that option. I tried to add the ambient tag to the grass texture but it doesn't seem to change either (not sure if I did properly tho). Should I export it to another format and then use another converter; like .skp --> .3ds --> .dae Thanks

fqez gravatar imagefqez ( 2016-02-18 15:30:00 -0600 )edit

You could try loading the model into Blender, and export from Blender. Here is an example collada file with ambient: https://bitbucket.org/osrf/gazebo_models/raw/default/youbot/meshes/base/base.dae

nkoenig gravatar imagenkoenig ( 2016-02-18 15:45:15 -0600 )edit

Hi Nate, thank you very much for your tips! Now I have a better result of the model. It's still dark if it's far away from the sun but it can be seen now clearly. The solution for me is: 1- Import the .dae file to Blender. 2- Export it again in .dae format from Blender (now it has <ambient>tags 3- Replace all <ambient>0 0 0 1</ambient> to <ambient>1 1 1 1</ambient>. I do that manual change because I don't know how to apply ambient values to the faces of my model yet. But it works! Thanks again!

fqez gravatar imagefqez ( 2016-02-19 13:07:10 -0600 )edit

Hey! I was facing the same issue. I tried importing to Blender and exporting from it. It worked, however, I lost all the textures. Did you face this problem? If yes, how did you solve it?

rohitsuri gravatar imagerohitsuri ( 2017-01-08 21:41:32 -0600 )edit

Yes, you have to set your texture options when you export your model. When you click "export" there is a menu in the left which has a section named "Texture options" so you have to check "include UV textures" or "Include materia textures" depending on your needs.

fqez gravatar imagefqez ( 2017-06-26 04:27:14 -0600 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-02-18 09:56:38 -0600

Seen: 1,673 times

Last updated: Feb 18 '16