JDK-8102271 : When both diffuseMap and diffuseColor are set in PhongMaterial, diffuseMap is not used
  • Type: Enhancement
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2013-03-06
  • Updated: 2015-06-16
  • Resolved: 2013-05-03
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8
8Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
Relates :  
Description
Run the attached app from FX8-3DAPI.
Press M to switch diffuseMap
Press C to switch diffuseColor
The texture is shown only when diffuseColor set to null or Color.TRANSPARENT.
I'd expect them to either combine or map to override color setting.
Comments
No, it isn't missing. Please see the latest docs, which will be in b120.
11-12-2013

javadoc is still missing this specification
11-12-2013

Will add this specification into the javadoc for PhongMaterial.
22-10-2013

Fixed. Changeset: 235cdce126cf Author: Chien Yang <chien.yang@orcale.com> Date: Fri May 03 11:38:47 2013 -0700 URL: http://jfxsrc.us.oracle.com/javafx/8.0/scrum/graphics/rt/rev/235cdce126cf Changeset: 3bd9630ecd1d Author: Chien Yang <chien.yang@orcale.com> Date: Fri May 03 11:37:41 2013 -0700 URL: http://jfxsrc.us.oracle.com/javafx/8.0/scrum/graphics/rt-closed/rev/3bd9630ecd1d
03-05-2013

Kevin and I have discussed. The mathematical equation for the diffuseComponent is the vector multiplication of diffuseMap and diffuseColor where the default diffuseColor is set to (1.0, 1.0, 1.0, 1.0). This change will make user of diffuseMap only case feels intuitive and allow the flexibility of mixing diffuseColor is there a need.
02-05-2013

Attaching another example that clearly shows that the current behavior is confusing. You set diffuseMap for material but doesn't get the texture because Material has not null default diffuseColor.
06-04-2013

I agree with Alex as well. I think it makes sense for texture map to override the color. Or perhaps some kind of combination.
14-03-2013

I agree with Alexander. Ideally, they would be combined, but if one of them must take precedence, then the texture should override the color, not the other way around.
08-03-2013