
Important Update 03.04.17 - XGLTool is now JObjectTool
JObjectTool is now available:
http://x-sky.net/site/xsky/jobjecttool/
Please see the news page on that site for changes / updates.
I will be moving and updating the examples and documentation there, so please bear with me as I get to this.
Thanks,
Dave :-)
In order to support VRML generated by applications in addition to Lightwave3D, I have had to make changes to XGL and upped the version number to 6.
This means any of the native tools, the XGLTester plugin, etc. will not work with XGL/XPXGL files created by the current XGLTool.
I have also posted a new more complete set of examples, including OBJv7 files created by XGLTool.
http://dspotts.com/downloads/030410_xgltool_examples.zip
At the moment my priorities are to support as much VRML as possible, and to create a stand-alone java tool for converting VRML to OBJv7. This tool will probably NOT require GL4Java as it will not have a viewer incorporated in it initially.
The intention of the tool will be to do the entire conversion process from VRML (with or without an HTML image map), possibly to intermediate XPXGL and then to OBJv7.
While I am working on this, please keep this important news in mind as you peruse any of the other documents here until I have time to update them.
XGLTool is a Java Application that is primarily used to "compile" 3D objects from VRML (currently LightWave3D generated VRML is all we support, we are working on others) into the XGL 3D format for use/intermediate use in X-Plane and other X-Products.
It now includes the ability to convert XPXGL files to OBJv7.
It now includes all of the features (and more) of the individual Mac OS X console (terminal) tools mentioned in the old XGLTools User's Guide, and no longer requires using the terminal.
These tools currently include:
- Viewing VRML (wrl) and XGL (xgl, xpxgl) files
- Compiling VRML (wrl) into X-Plane XGL (.xpxgl) with automatic texture merging
- Compiling VRML (wrl) into X-Plane XGL (.xpxgl) using an industry-standard html image map where the artist has complete freedom to combine and place textures into a single bitmap file for maximum performance and frame-rate in X-Products
- Compiling VRML (wrl) into standard XGL (.xgl), maintaining separate texture files and without adding X-Plane specific support
- XGLTester Support
- Converting XPXGL (.xpxgl) files to OBJv7 (.obj)
The application, as well as this user's guide is a work-in-progress, so while I continue to refine both, please refer to the XGL Page for the most up-to-date information.
Table Of Contents (toc)
News
Credits
Requirements - VERY IMPORTANT!
Sample Files
QuickStart/WebStart
TroubleShooting WebStart
TroubleShooting XGLTool
Converting XPXGL to OBJv7
Using XGLTool
Lexington Example Tutorial
News
03.04.09 - XGLTool can now convert XPXGL files to OBJv7 format.
03.04.02 - Added the new TroubleShooting XGLTool section...
03.03.23 - XGLTool now incorporates support for the XGLTester Plugin, which allows you to add, remove, or modify XGL-based objects that are drawn in X-Plane on-the-fly without having to wait all that time to restart X-Plane!
03.03.16 - Uploaded a couple of native command lines tools which may be useful - see the TroubleShooting WebStart section for details...
03.03.10 - First public release!
toc
Credits, Legal
XGLTool is copyright © 2002-2003 David Spotts, All Rights Reserved
This software is provided "AS IS". Developer disclaims all warranties, including but not limited to, all express or implied warranties of merchant-ability and fitness for a particular purpose.
The Statue of Liberty and all associated textures are copyright © 2003 by Anthony Booher
toc
Requirements - VERY IMPORTANT!
XGLTool is a Java WebStart Application for Mac OS X and Windows that requires Java 1.3+ installed on your system.
You must install the GL4Java library, available for Mac OS X and Windows.
WebStart allows me to add features and improvements to the application and if you have an internet connection, you will automatically get these enhancements the next time you launch the application.
WebStart requires code to be signed (which I do), but at the moment I can't justify an "official" code-signing certificate, so you will get a rather ominous WebStart warning message the first time you launch the program.
Please review my Java Web Start Tutorial regarding this topic before continuing.
You have my personal and professional assurance that this program is virus-free and will not intentionally harm your system. As with *any* software, bugs are always a possibility, so it's always a good idea to have good backups of your important data. I have been using and developing with this software for man-months and it has never damaged any of my data.
Mac OS X Users
If you are running Mac OS X, java is already installed, but you need Jaguar and the 10.2.4 update in order to use the viewer.
You may also need a fairly current video card. The viewer does not currently run on my older 2.5 year old tibook400 with 8MB video card, but runs fine on a 3+ year old Win2K PC with an 8MB video card as well as my 1-year-old tibook800 with 32MB video card.
If you are having troubles with the viewer, I also have a Mac OS X XGL console viewer (see here), but it runs only from the terminal and may not be maintained.
Mac OS X users can get GL4Java from several sources, but I would recommend my repackaged version from this URL (it has a single simple install.sh file):
http://jfoto.net/xplane/GL4Java.sit
You may also choose to get it from the author's site:
http://homepage.mac.com/gziemski/projects/
or find it via the jausoft page:
http://www.jausoft.com/gl4java/
VERY IMPORTANT NOTE:
Apple just released Java 1.41 available via Software Update. Although XGLTool will work with either, it requires that GL4Java be installed in the Java that it runs under.
For compatibility with both Mac and Windows, XGLTool indicates that it will run with either (1.31+, 1.41+).
If you have 1.41, it will be the current java, which you can verify via the terminal (Applications/Utilities/Terminal):
[tib400:~] dspotts% java -version
java version "1.4.1_01"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_01-39)
Java HotSpot(TM) Client VM (build 1.4.1_01-14, mixed mode)
If you have the default 1.31, you will see this
[tib800:~] dspotts% java -version
java version "1.3.1"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1-root_1.3.1_020714-12:46)
Java HotSpot(TM) Client VM (build 1.3.1_03-69, mixed mode)
Anyway, GL4Java is required in whichever Java is running XGLTool.
Unfortunately Apple's WebStart implementation initially launches it under 1.41 (if you have it), but then offers to save it as an application.
If you do this, the application then runs under 1.31, which may not have GL4Java.
SOLUTION: When asked about whether to create an application for it, just say no :-)
Just keep the WebStart file (XGLTool.jnlp):
http://jqkserv2.net/xgltool/XGLTool.jnlp
on your desktop or in the dock and use that to launch the application. That way you will always get the latest version.
Windows Users
You need at least Sun's Java 1.3+. I would highly recommend you download and install the latest current version from Sun (currently 1.41_02) from this URL:
http://java.sun.com/getjava/download.html
After you have installed Java, you need to install GL4Java.
You can get my repackaged version from this URL (with a readme and simple install script):
http://jfoto.net/xplane/GL4JavaWin282.zip
or from jausoft's site:
Sample Files
Before starting the application, you'll want to download some sample files in order to view XGL files, compile VRML (wrl) files, etc.
You can download some samples from this url:
http://dspotts.com/downloads/
Please see the lexington_example_tutorial fora step-by-step explanation
toc
QuickStart
- Review the requirements, install GL4Java, and review my WebStart Tutorial
- Download the sample files and unzip them
- WebStart the Application from Internet Explorer
- When you get the "ominous warning" in WebStart, choose "Start" - you will not have to worry about this for future launches
- Choose "View 3D File...", navigate to the "xgltool_samples" folder you downloaded an unzipped from above, and select "liberty6.xpxgl" inside the "liberty6" folder
You should then see a window like the following appear (you will need to zoom in and rotate via +/- and arrow keys to get this view):
Click on the window, then use the following keys for navigation:
- + (plus) ... zoom in
- - (minus) ... zoom out
- <left arrow>, <right arrow> - rotate about the y axis
- <up arrow>, <down arrow> - rotate about the x axis
toc
TroubleShooting WebStart
If you encounter any difficulties with the application launching when you clicked the link above, be sure you have followed the requirements section, then you may have to download the small WebStart file from above or from this URL:
http://jqkserv2.net/xgltool/XGLTool.jnlp
To do this on Windows IE, right-click on the link and choose "Save Target As..."
On Mac IE or Safari, control-click on the link and choose "Download link to disk"
Also please see here
After downloading the file, simply locate it (XGLTool.jnlp) and double-click it to launch WebStart which will then download and start the application.
If you are having trouble viewing, it is most likely due to a lack of video ram on your Mac. You can download a console-based tool (xglview) for viewing (OS X only), and a console based-tool (xglinfo - both platforms) for analyzing xgl files from the file 0303xgltoolsnative.zip, which you can find in my downloads directory...
toc
TroubleShooting XGLTool
If you experience any problems with XGLTool, the best way to find out what may be going wrong is to enable the Java Console.
You do this by running Java WebStart (on Mac OS X this is in Applications/Utilities/Java), and choosing Preferences from the File menu...
Windows users should find an alias (shortcut) on their desktop to Java WebStart...
The preferences dialog looks like the following, with the Show Java Console item checked...
Once you have the Java Console enabled, the next time you start XGLTool, you should see a window titled Java Console, and you will see (some :-) interesting information there as you do things in XGLTool.
I have found that some VRML exporters generate "invalid" VRML as far as the current VRML parser we are using.
One example of this is the Wings3D program which seems to generate some numbers in the VRML file of the form 0.0000e0 - This currently causes XGLTool to exit abnormally.
A simple solution for the moment is to use a text editor like BBEdit to find/replace the "e0" with nothing....
Here's a sample of the console output regarding this problem:
CyberVRML97 warning : Loading Error (ParseException) = java.io.InputStreamReader@39f6f1
Encountered "e" at line 7, column 18.
Was expecting one of:
[NUMBER] ...
[FLOAT_NUMBER] ...
Starting parse of: /v2/applications/wings3d/test/test4.wrl
Total parsing time was: 249 ms
load failure, setting flag
This technique can be very helpful in finding VRML issues....
toc
Converting XPXGL to OBJv7
XGLTool now has the ability to convert XPXGL files (.xpxgl) to OBJv7.
You will notice a new menu item "View/Convert xpxgl to OBJv7..."
Although you can also do this with my xgl2obj command-line tools, I have included it in XGLTool for those not familiar with the command line - XGLTool (or a replacement) will be where increased support for VRML created by other applications will be added.
You must already have a single texture xpxgl file created, which at the moment is only possible for people using LightWave.
Simply choose the xpxgl file to view/convert (for example lexington_example.xpxgl), and XGLTool will create lexington_example.obj in the same directory.
Known Issues:
- None of the special x-plane types are output at this time (hard, smoke, light). They are output as regular quads or triangles.
- Any polygons that are materials only will be skipped
toc
|