isl-org / isl-org/Open3D

No color assigned at Kd value in mtl file?

Open
#6,202 1 comment 1 reaction 0 assignees View on GitHub
bug
Dominant language
C++
Stars
14k
Forks
2.6k
Avg merge
5d 18h
Merged PRs (30d)
6

Description

### Checklist

- [X] I have searched for [similar issues](https://github.com/isl-org/Open3D/issues).
- [X] For Python issues, I have tested with the [latest development wheel](http://www.open3d.org/docs/latest/getting_started.html#development-version-pip).
- [X] I have checked the [release documentation](http://www.open3d.org/docs/release/) and the [latest documentation](http://www.open3d.org/docs/latest/) (for `master` branch).

### Describe the issue

I simply wish to make a green capsule without texture specified by mtl file.
I downloaded a capsule sample from below and workd perfectly with texture.
[http://paulbourke.net/dataformats/obj/minobj.html](http://paulbourke.net/dataformats/obj/minobj.html)

But when I removed texture and set color green at Kd value by modifying mtl file, it doesn't work and only white color.

### Steps to reproduce the bug

```python
import open3d as o3d

mesh = o3d.io.read_triangle_mesh("capsule/capsule.obj",False)# I tried both True/False,either didn't work.

# Computing the normals for the mesh.
mesh.compute_vertex_normals()

# Visualizing the mesh.
draw_geoms_list = [mesh]
print(mesh.textures)
o3d.visualization.draw_geometries(draw_geoms_list)

capsule.mtl
[Bfore] it works.
newmtl material0
Ka 1.000000 1.000000 1.000000
Kd 1.000000 1.000000 1.000000
Ks 0.000000 0.000000 0.000000
Tr 1.000000
illum 1
Ns 0.000000
map_Kd capsule0.jpg

[After] only green Kd without texture, it doesn't work.
newmtl material0
Ka 1.000000 1.000000 1.000000
Kd 0.000000 1.000000 0.000000
Ks 0.000000 0.000000 0.000000
Tr 1.000000
illum 1
Ns 0.000000

[Result]
Only white capsule, no result from specified Kd.
```

### Error message

mtl file with a color scpecified by Kd value without texture doesn't work.

### Expected behavior

Green color capsule

### Open3D, Python and System information

```markdown
- Operating system: Ubuntu 20.04
- Python version: Python 3.10.6 64bit
- Open3D version:0.17.0
- System architecture: arm64
- Is this a remote workstation?: yes
- How did you install Open3D?: pip
```

### Additional information

_No response_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.