missing texture for a obj

Feel free to ask any question here
mquilter@utah.gov
Posts: 4
Joined: Mon Feb 13, 2023 6:29 pm

Re: missing texture for a obj

Post by mquilter@utah.gov »

When I bring in a OBJ file it comes in as black with no colored texture. There is a MTL file and associated PNG files in the same directory. Here is a clip of the MTS file. Notice the Tr line. Does this need to change to read Tr= 0?
newmtl material0000
Ka 1.000000 1.000000 1.000000
Kd 1.000000 1.000000 1.000000
Ks 0.000000 0.000000 0.000000
Tr 0.000000
illum 1
Ns 1.000000
map_Kd odm_textured_model_geo_material0000_map_Kd.png
newmtl material0001
Ka 1.000000 1.000000 1.000000
Kd 1.000000 1.000000 1.000000
Ks 0.000000 0.000000 0.000000
Tr 0.000000
illum 1
Ns 1.000000
mquilter@utah.gov
Posts: 4
Joined: Mon Feb 13, 2023 6:29 pm

Re: missing texture for a obj

Post by mquilter@utah.gov »

I found that after loading the OBJ file select it in the DB Tree panel. Then go to the Properties panel and uncheck "Normals". After doing this the colored texture mesh appears. I did not need to edit the MTL file or change the color settings. The OBJ files and associated texture files were produced using WEBODM. I have tried this process with several OBJ files and unchecking the Normals setting in Properties worked every time.
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: missing texture for a obj

Post by daniel »

Hum, I guess the normals were invalid or inverted maybe?

Would you be able to share the file with me maybe? (you can send a mail to admin[at]cloudcompare.org)
Daniel, CloudCompare admin
mquilter@utah.gov
Posts: 4
Joined: Mon Feb 13, 2023 6:29 pm

Re: missing texture for a obj

Post by mquilter@utah.gov »

Daniel: I emailed you the files.
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: missing texture for a obj

Post by daniel »

Thanks.

On my side, I didn't have any issue.

Is the 'sun light' disabled on your side maybe? (you can use the F6 shortcut to toggle it on or off, or via the 'Display > Lights' menu).
Daniel, CloudCompare admin
mquilter@utah.gov
Posts: 4
Joined: Mon Feb 13, 2023 6:29 pm

Re: missing texture for a obj

Post by mquilter@utah.gov »

The Sunlight was off. Thank you.

Could you explain why removing the Normals turned on the Mtl view.

Also are there other settings that a novice needs to be aware of.

I also work with LAZ / LAS files. I was not able to view them in an earlier version but they come up fine since I updated to 2.14.4.
daniel
Site Admin
Posts: 7713
Joined: Wed Oct 13, 2010 7:34 am
Location: Grenoble, France
Contact:

Re: missing texture for a obj

Post by daniel »

OpenGL (or any other rendering engine) relies on lights to properly display points with normals. If no light source is defined, or equivalently if the light source is not on the right side of the normal, the points come out black. So if you deactivate normals, there's no impact of light anymore, and only texture or RGB colors are used to color the cloud.

Regarding LAS/LAZ files, it may depend on their versions? In the previous versions, there was 2 different plugins to load LAS files (one that was able to work on all platforms, but could not open LAS 1.4 files, and the other that could only work on Windows, and that you had to specifically select to be able to open LAS 1.4 files). In the latest 2.13.alpha version, we now have a unified plugin to load all these files, and that works on all platforms (thanks to Thomas Montaigu).

However, this does not fully explain why you see a difference with 2.12.4 (and not 2.14.4 I presume?).
Daniel, CloudCompare admin
Post Reply