Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8091531

Support rendering of triangles with flipped normals when seen from the outside

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • tbd
    • 8
    • javafx
    • 8.0-graphics-scrum-b1201-x64, Windows 7 x64

      There is CullFace property in MeshView which allows to see 3D surfaces from inside, for example, if you put a camera inside a sphere. However the lightning would still be reversed.

      For example, if you put a camera and a light source inside a sphere and set cullFace to None, the sphere surface will still be black if there are no light sources outside the sphere.

      Run the attached sample. It shows several planes (2 triangles connected to form a rectangle) having different wind order and different colors. Light source is attached to camera. CullFace set to NONE.
      Only those rectangles with correct wind order are rendered bright, other two are rendered black. When the whole thing is rotated 180 degrees, you can see that the same things happens to the rectangles which were bright - they became black and those which were black become bright.

        1. anotherSide.jpg
          anotherSide.jpg
          27 kB
        2. Bug.java
          4 kB
        3. oneSide.jpg
          oneSide.jpg
          27 kB

            Unassigned Unassigned
            mrkam Alexander Kuznetcov (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Imported: