java3d
  1. java3d
  2. JAVA3D-409

ModelClip scope control not working.

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: current
    • Fix Version/s: 1.5.1
    • Component/s: j3d-core
    • Labels:
      None
    • Environment:

      Operating System: All
      Platform: All

    • Issuezilla Id:
      409

      Description

      The use of scope (e.g. addScope) to control clipping on various objects does
      not work. Attached is an example with two objects with the intent of applying
      different ModelClip clipping for each object.

        Activity

        Hide
        mcneillk added a comment -

        News on this issue: according to my tests, the ModelClip scope ONLY malfunctions
        in VERY specific cases when transparency is used on multiple Shape3Ds (BLENDED,
        FASTEST, NICEST), and the bug can be qualified thusly:

        When 2 or more transparent Shapes are rendered – and when they subject to the
        influencing bounds and clipping planes – the Shape whose geometric Z is higher
        (+Z) ends up "selected", and its scope will effectively become global to the
        detriment of other ModelClip scopes that might apply.

        As soon as one object's transparency is removed, Java3D behavior is as expected
        and all scopes apply correctly.

        I might add that even unscoped ModelClips exhibit similar, unexpected results
        when transparency is used.

        I'll wait for feedback before going further on this one. It will probably
        require complex handing of Z depth during the actual render phase.

        -Ken

        Show
        mcneillk added a comment - News on this issue: according to my tests, the ModelClip scope ONLY malfunctions in VERY specific cases when transparency is used on multiple Shape3Ds (BLENDED, FASTEST, NICEST), and the bug can be qualified thusly: When 2 or more transparent Shapes are rendered – and when they subject to the influencing bounds and clipping planes – the Shape whose geometric Z is higher (+Z) ends up "selected", and its scope will effectively become global to the detriment of other ModelClip scopes that might apply. As soon as one object's transparency is removed, Java3D behavior is as expected and all scopes apply correctly. I might add that even unscoped ModelClips exhibit similar, unexpected results when transparency is used. I'll wait for feedback before going further on this one. It will probably require complex handing of Z depth during the actual render phase. -Ken
        Hide
        petroslj added a comment -

        I have found that having lines rendered with antialiasing=true also causes
        ModelClip by scope to fail in exactly the same fashion as transparency
        BLENDED.

        In addition, in the example, when the clipping is corrupted both shapes are
        still clipped, but it is by a common plane which is a different plane than was
        specified for either of the shapes originally (as if the clip values were
        mathematically combined?).

        Show
        petroslj added a comment - I have found that having lines rendered with antialiasing=true also causes ModelClip by scope to fail in exactly the same fashion as transparency BLENDED. In addition, in the example, when the clipping is corrupted both shapes are still clipped, but it is by a common plane which is a different plane than was specified for either of the shapes originally (as if the clip values were mathematically combined?).
        Hide
        kcr added a comment -

        Too risky for 1.5.1. Set target milestone to 1.6.0.

        Show
        kcr added a comment - Too risky for 1.5.1. Set target milestone to 1.6.0.
        Hide
        darwinjob added a comment -

        The test case does not show any artifacts on my computer.
        http://forums.java.net/jive/thread.jspa?messageID=243946&tstart=0#243946

        j3d.version = 1.5.1 fcs (build6)
        j3d.vendor = Sun Microsystems, Inc.
        j3d.specification.version = 1.5
        j3d.specification.vendor = Sun Microsystems, Inc.
        j3d.pipeline = NATIVE_OGL
        j3d.renderer = OpenGL

        native.renderer = GeForce 7600 GS/PCI/SSE2
        native.vendor = NVIDIA Corporation
        native.version = 2.1.1

        Show
        darwinjob added a comment - The test case does not show any artifacts on my computer. http://forums.java.net/jive/thread.jspa?messageID=243946&tstart=0#243946 j3d.version = 1.5.1 fcs (build6) j3d.vendor = Sun Microsystems, Inc. j3d.specification.version = 1.5 j3d.specification.vendor = Sun Microsystems, Inc. j3d.pipeline = NATIVE_OGL j3d.renderer = OpenGL native.renderer = GeForce 7600 GS/PCI/SSE2 native.vendor = NVIDIA Corporation native.version = 2.1.1
        Hide
        kcr added a comment -

        Verified that this fails in 1.5.0 and works in 1.5.1. Mark as "FIXED" in 1.5.1.

        Show
        kcr added a comment - Verified that this fails in 1.5.0 and works in 1.5.1. Mark as "FIXED" in 1.5.1.

          People

          • Assignee:
            mcneillk
            Reporter:
            petroslj
          • Votes:
            1 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: