JDK-8093566 : [3D] Shapes can be very blurry in 3D rotations if not started in the 2D plane
  • Type: Bug
  • Component: javafx
  • Sub-Component: graphics
  • Affected Version: 8u40
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-10-23
  • Updated: 2015-06-12
  • Resolved: 2014-10-27
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
8u40Fixed
Related Reports
Duplicate :  
Relates :  
Relates :  
Description
In doing testing on the fix for RT-38948 under a variety of rotations I discovered a deficiency of the Shape node when dealing with 3D transforms.  It snapshots the scale of the first non-2D transform it encounters and caches the node at that scale and doesn't invalidate the cache until the geometry of the Shape node changes.  If the first 3D rotation it encounters is nearly perpendicular to the screen (Z=0 plane) then it will snapshot a very tiny scale for one or both axes.

I'm attaching Text3D.java and an example of the output it generates.  The UL text is being rotated in the 2D plane, the UR text is rotated about the X axis starting at 0 degrees, and the bottom 2 text objects are being rotated about the X and Y axes starting at close to 90 degrees where they snapshotted a very small X or Y scale.
Comments
Actually I had already introduced the comment for THRESHOLD that I added for RT-38948, but I forgot to regenerate the webrev. I also deleted the unused variables and ran the tests again to double check. The fix was pushed to the 8u-dev repo with the following changeset: changeset: 8264:830c7a20f2ad date: Mon Oct 27 15:19:25 2014 -0700 summary: Fix RT-39120: Blurry shapes in 3D scenes at some rotation angles http://hg.openjdk.java.net/openjfx/8u-dev/rt/rev/830c7a20f2ad
27-10-2014

+1. Looks good to me. I have 2 minor comments: 1) Remove unused members: private double cacheScaleX, cacheScaleY; 2) Add a comment to THRESHOLD as to why it is set to 1.0 / 256.0.
27-10-2014

New fix: http://cr.openjdk.java.net/~flar/RT-39120/webrev.01/ This one has more accurate placement of the texture in the call to drawTexture. It also gets rid of a problem where the source coordinates included texture.getContentX/Y(), but the drawTexture call itself is supposed to add those in...
24-10-2014

I'm going to revise that fix since it might suffer from the same (comparatively minor) blurriness problem that the fix for RT-38948 suffered from - the fact that the destination rectangle does not quite match the correct mapping of the 4 content corners of the temporary texture. It's a simple change, but I want to generate a new webrev for it...
24-10-2014

fix: http://cr.openjdk.java.net/~flar/RT-39120/webrev.00/
24-10-2014

Pulling this back into 8u40 since it might be fixed in conjunction with RT-38948. If not, then as a P4 it can be moved out to 9.
24-10-2014

Not a regression (as expected).
23-10-2014