Take a look at the code in the attachment. It sets a MeshView with TriangleMesh and PhongMaterial of RED color and adds it to the scene.
What you get is black rectangle.
It is not obvious that in order to see the color of the material you have to set AmbientLight.
I believe there should be default white AmbientLight if no ambient light is specified to the scene. It would make easier for developers to start with 3D in JavaFX.
What you get is black rectangle.
It is not obvious that in order to see the color of the material you have to set AmbientLight.
I believe there should be default white AmbientLight if no ambient light is specified to the scene. It would make easier for developers to start with 3D in JavaFX.
- relates to
-
JDK-8123980 FX 8 3D: Scene doesn't have default lighting that is stated in the specification
- Closed
-
JDK-8102271 When both diffuseMap and diffuseColor are set in PhongMaterial, diffuseMap is not used
- Resolved