Page 2 of 2

Re: missing texture for a obj

Posted: Mon Feb 13, 2023 6:37 pm
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

Re: missing texture for a obj

Posted: Mon Feb 13, 2023 7:16 pm
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.

Re: missing texture for a obj

Posted: Tue Feb 14, 2023 8:24 pm
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)

Re: missing texture for a obj

Posted: Wed Feb 15, 2023 7:06 pm
by mquilter@utah.gov
Daniel: I emailed you the files.

Re: missing texture for a obj

Posted: Wed Feb 15, 2023 8:07 pm
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).

Re: missing texture for a obj

Posted: Wed Feb 15, 2023 9:09 pm
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.

Re: missing texture for a obj

Posted: Sat Feb 18, 2023 9:05 am
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?).