Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OBJLoader + MTLLoader texture VS color issue #13923

Closed
3 of 13 tasks
ranbuch opened this issue Apr 23, 2018 · 2 comments
Closed
3 of 13 tasks

OBJLoader + MTLLoader texture VS color issue #13923

ranbuch opened this issue Apr 23, 2018 · 2 comments

Comments

@ranbuch
Copy link
Contributor

ranbuch commented Apr 23, 2018

Three.js version
  • Dev
  • r92
  • r90
Browser
  • All of them
  • Chrome
  • Firefox
  • Internet Explorer
OS
  • All of them
  • Windows
  • macOS
  • Linux
  • Android
  • iOS

As @Mugen87 suggested here I'm submitting this issue regarding Material color effecting the Texture color.

I can confirm that changing the THREE.Color RGB from (0,0,0) to (1,1,1) does resolve this issue but, as you can see on the link above, that issue does not occur on Blend4Web or Sketchfab.

I thought that the reason may be multiplying any value with 0 will always resolve in 0 but changing it (on debugger) to (0.01, 0.01, 0.01) didn't resolved this issue.

@ranbuch
Copy link
Contributor Author

ranbuch commented Apr 23, 2018

According to this link:

Specifies that a color texture file or color procedural texture file is 
linked to the diffuse reflectivity of the material.  During rendering, 
the map_Kd value is multiplied by the Kd value.

Looks like everybody else has a bug and three-js is actually doing what it supposed to do.
0 multiplied by anything is 0 . . .
my mtl file:

newmtl Tshirt04:lambert1SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
map_Kd 27.jpg
Ni 1.00
newmtl polySurface20SG
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00
newmtl polySurface20SG1
illum 4
Kd 0.00 0.00 0.00
Ka 0.00 0.00 0.00
Tf 1.00 1.00 1.00
Ni 1.00

As you can see in the Tshirt04:lambert1SG partition the Kd is 0.00 0.00 0.00

@Mugen87 please close this issue if you agree with me.

@Mugen87 Mugen87 closed this as completed Apr 23, 2018
@Mugen87
Copy link
Collaborator

Mugen87 commented Apr 23, 2018

Looks like everybody else has a bug and three-js is actually doing what it supposed to do

🎉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants