[x3d-public] Think I may have finally fixed the Aviatrix3D Text2D node for BEGIN, MIDDLE and END vertical Justification

Don Brutzman brutzman at nps.edu
Thu Jan 8 08:01:06 PST 2015

Terry congratulations on a major improvement, getting FontStyle vertical justification fixed!  Great insight that the layout problem didn't originate within Xj3D proper, but rather had to do with spatial constraints imposed by the incorrect computation of a bounding box.

Your approach certainly shows why co-development between aviatrix3d and Xj3D is essential.  Looking forward to Justin's review and feedback on your changes, I hope that he finds them useful too.

For the attached aviatrix test-case snapshot, i'd expect that the numerals mesh needs convex=false (meaning concave polygons = true) to avoid filling character holes.  Not sure of the JOGL or aviatrix invocation for that, can help track it down for the aviatrix unit test code if you like.

The ConformanceNist interactive test for FontStyle settings is excellent.  Perhaps another scene or two similar to your unit-test screenshot will help, will look at that further.


I am re-running all of the screen snapshots for all of the scenes in the X3D Example Archives to good effect.  One or two archives each day, seven total.

I searched for "<Text " in these archives.  That node is used 3621 times in 737 files (20% of total).  Further, we tend to only use Text for user interface (labeling or selection), and improper positioning often put user directions off screen or out of place.  So this is a major improvement in X3D usability within Xj3D.

Not least of which is that, after all these many years, the most visible Xj3D error when rendering HelloWorld.x3d is now fixed!


Viewpoint image snapshots:


Viewpoint snapshot comparison:

TortoiseSVN subversion tool also has an excellent diff capability for images which includes alpha blend that lets you see the exact difference in pixels.  Pretty dramatic actually.  Two examples attached.

So it certainly appears that the image captures are indeed providing excellent unit tests, one per each Viewpoint per each scene.  Hmm let's see/search, that is... 7431 Viewpoints in 2102 files, plus default viewpoints in 3854 total scenes... uh, that is a lot of unit tests, over 10,000!  All in version control to enable long-term review of progress and also help avoid inadvertent introduction of new errors.

Thanks again for the prerequisite DeathTimer updates a few weeks ago which now permits all of these image-capture tasks to run to completion in a headless mode.  Swift silent thorough.

The code changes all look good so far so it seems OK to apply the updated Xj3D jars in our other applications which embed it.  When done with this set of Xj3D regression tests, will announce an updated X3D-Edit release.

Have fun with Xj3D!

On 1/5/2015 5:41 PM, Norbraten, Terry (CIV) wrote:
> Not sure what’s up with the rendering of the numerals 4 and 7, however, BEGIN, MIDDLE and END vJustification from left to right.  It had to do with not using the vertical limits of the surrounding bounding box internal to Aviatrix3D.  Justin’s GitHub version still produces the old rendering the looked like END no matter what you did.

On 1/6/2015 11:59 AM, Repository Xj3D code wrote:
> [Terry N.] Partial fix to long standing issue with
> org.j3d.renderer.aviatrix3d.geom.Text2D not handling Appearance FontStyle
> justify for both horizontal (major) and verical (minor) attributes. The issue
> being that JUSTIFY_END for the major was not correct and JUSTIFY_BEGIN, FIRST &
> MIDDLE for the minor was not correct (defaulted to END no matter the setting).
> Horizontal TRUE works pretty close now, but was some hacks. Horizontal FALSE is
> not quite so good, but better than it was. Basically, the bounding box for the
> character data was not being employed correctly to the GLContext for character
> drawing and still needs some tweaking to meet the spec.
> Update version of J3D http://sourceforge.net/p/xj3d/code/12095/ <http://sourceforge.net/p/xj3d/code/12095>
> ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/xj3d/code/ <https://sourceforge.net/p/xj3d/code>
> To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/ <https://sourceforge.net/auth/subscriptions>

all the best, Don
Don Brutzman  Naval Postgraduate School, Code USW/Br       brutzman at nps.edu
Watkins 270,  MOVES Institute, Monterey CA 93943-5000 USA   +1.831.656.2149
X3D graphics, virtual worlds, navy robotics http://faculty.nps.edu/brutzman
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2015-01-05 at 5.36.23 PM.png
Type: image/png
Size: 58654 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20150108/01cdab34/attachment-0003.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TortoiseSvnImageDiff1.png
Type: image/png
Size: 51772 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20150108/01cdab34/attachment-0004.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: TortoiseSvnImageDiff2.png
Type: image/png
Size: 161918 bytes
Desc: not available
URL: <http://web3d.org/pipermail/x3d-public_web3d.org/attachments/20150108/01cdab34/attachment-0005.png>

More information about the x3d-public mailing list