You can save your Java3d scenegraph to a ".j3f" file ---------------------------------------------------- as demonstrated by Sun's Java3d Scenegraph Editor.
You can use Sun's Scenegraph Editor directly or adopt it as you prefer ( the source is available for free ).
I've done it, I know it works, at least for some of the simple stuff I tried it on ( see below ).
More info is available in pevious posts to Java3d-interest:
Save Your Java3d Scenegraph to a File
File __ Save __, Load, Edit, View : ----------------------------------
Sun's Java3d Scenegraph Editor works with Sun's VRML Loaders ------------------------------------------------------------ | | | | The Scenegraph is core tool within Java3d, | | you can traverse it, modify it, view it, and __ STORE __ it | or at least a representation of it, with | | Sun's Java Scenegraph Editor. | | | Java3d Scenegraph Editor: Save, View, Load, Edit your scenegraph | ---------------------------------------------------------------- | | Sun's 3d Scenegraph Editor Load & Renders Nasa VRML models | ---------------------------------------------------------- | http://java3d.netbeans.org/j3deditor_intro.html http://www.frontiernet.net/~imaging/sc_java3d_editor.jpg
http://www.frontiernet.net/~imaging/Nasa_3d_animation.html#Scenegraph_Editor http://www.frontiernet.net/~imaging/Nasa_3d_animation.html | http://www.mail-archive.com/java3d-interest%40java.sun.com/msg25156.html | http://www.mail-archive.com/java3d-interest%40java.sun.com/msg26288.html
http://archives.java.sun.com/cgi-bin/wa?A2=ind0311&L=java3d-interest&P=810
Ben Logan wrote: > > Exporting from Java3D > --------------------- > > Ok, there is a lot of talk about importing various > file formats etc etc into Java3D, > > what about the other way round ? > > My program loads a variety of 3DS shapes > and then allows the user to construct a scene > with them, > > what I need to know is how to then output > the scene when the user has finished as > a single 3DS (or other) file. > > Is this possible or will I have to manually > traverse the scene graph and print the > geometry data to a file and then write > my own loader all over again. > > Thanks ... > > Ben Logan - Graduate Software Engineer > | http://archives.java.sun.com/cgi-bin/wa?A2=ind0311&L=java3d-interest&P=19399
Alessandro borges wrote in reply: | | You can export/import a complete scene to a Java3D | proprietary format by using | | com.sun.j3d.utils.scenegraph.io package. | | Read the Javadocs about it. | | I guess there are more ways to it, but I am not | skilled enough to talk about. | | Alessandro |
http://archives.java.sun.com/cgi-bin/wa?A2=ind0311&L=java3d-interest&P=19500
Right, it exports to a file with the suffix: .j3f
It's also the default format of Sun's Java3d Fly Through Demo.
Hierarchy For Package com.sun.j3d.utils.scenegraph.io ----------------------------------------------------- | | class com.sun.j3d.utils.scenegraph.io.SceneGraphFileWriter |
http://www.cise.ufl.edu/help/software/java3d/com/sun/j3d/utils/scenegraph/io/package-tree.html
The __ VRML __ file format seems to be very popular for Java3d:
Alessandro borges wrote previously: | | I am using a Poser model exported to ___ vrml ___ format, | and I load the model using SUN's vrml loader. | | I am not using vrml features, just the geometry data. | I split the model, and put each part in TG, ... | | I have a running demo. | | Introducing Ana Botafogo : | http://geocities.yahoo.com.br/alessandroborges/ana/ana01.jpg http://geocities.yahoo.com.br/alessandroborges/ana/ana02.jpg http://geocities.yahoo.com.br/alessandroborges/ana/ana03.jpg | | | Alessandro Borges | | --- zch <[EMAIL PROTECTED]> escreveu: > Hi, | > http://www.frontiernet.net/~imaging is a very | > good site and I learned a lot from it and also | > downloaded lots of VRML files : ). | | http://archives.java.sun.com/cgi-bin/wa?A2=ind0309&L=java3d-interest&P=R32764
Realtime Flexing Seamless Human Animation with -------------------------- conformant Cloth Simulation | | I'm [ announcing ] a cloth simulation applet. | http://vr.kaist.ac.kr/~redmong/research.htm) | | And I'll open a ___ VRML ___ Loader which can | | load animation infomation and can be used for | the skinning animation. | | [ Note: source code for these vrml loaders is available ] | http://archives.java.sun.com/cgi-bin/wa?A2=ind0308&L=java3d-interest&P=R11004 | http://archives.java.sun.com/cgi-bin/wa?A2=ind0310&L=java3d-interest&P=R1217
JavaGaming.org:
| Human Animation with Java3d and the Sun VRML Loaders | ---------------------------------------------------- | | can animate NSF Funded Finger Spelling Animations | | -- in a web browser -- | | -- on Windows, Linux, Solaris, SGI workstations --- | | -- without installation of packages --- | | other than Java, Java3d, and the DirectX or OpenGL layer | | -- with mouse events triggering "Gesture Animations" -- | | -- using Web3d.org's VRML based H-Anim Human Models -- | http://www.javagaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=3D;action=display;num=1060641747 | http://www.mail-archive.com/java3d-interest%40java.sun.com/msg25976.html
Using Sun's Java3d Scenegraph Editor and Sun's VRML Loaders ------------------------------------
I loaded several VRML files and saved them as ".j3d" files:
36k darts_game_animation.wrl 296k darts_game.j3f 96k earth_moon_orbiting.j3f 16k earth_moon_orbiting.wrl 96k earth_moon_static.j3f 16k earth_moon_static.wrl 108k earth-topo.png 1.3M earth.wrl 136k helloworld.j3f 4.0k HelloWorld.wrl 884k rover_complex.j3f 540k rover_complex.wrl
If you want to Traverse the Scenegraph try the program from Selman's Java3d book: VRML Picking Demo:
Traverse the Java3d Scenegraph you loaded from VRML --------------------------------------------------- | The program reads a 3d scene as a simple VRML | text file, and displays the Java3d Scene Graph | ( which is interactive, you can expand and collapse | the branches of the scenegraph and examine the contents | of the nodes ), it renders the 3d scene, and when | you click on an object it tells you what you clicked on. | | You can see ( and download ) the Java Source code of | the operative file: VrmlPickingTest.java | http://www.frontiernet.net/~imaging/sourcecode/VrmlPickingTest.java http://www.frontiernet.net/~imaging/sourcecode | http://www.frontiernet.net/~imaging/games_with_java3d.html
VRML & Java3d has been widely used including Nasa staff:
Nasa's Patti Koenig wrote: | | | I wanted to write the interest group because | | I added a cool example applet ... to the web site. | | | It ... loads ___ VRML ___ 97 files | ------------------------------------- | | | into a FastScript3D Java3D applet using the X3D vrml loader. | | | [ VRML is a free and open standard for defining 3d objects | -------------------------------------------------------- | | | so you can render 3d objects moving in your web browser. ] | | | ... All source code is included. [ at this web address : ] | | | http://fastscript3d.jpl.nasa.gov | | | Thanx ! Please send me your feedback ! | | | Patti Koenig [ Nasa, Jet Propulsion Laboratories, Staff Engineer ] | ------------ [ Dec 4, 2002 to Java3d-interest list ] | http://archives.java.sun.com/cgi-bin/wa?A2=ind0212&L=java3d-interest&P=R5653 | http://www.mail-archive.com/java3d-interest%40java.sun.com/msg26435.html http://archives.java.sun.com/cgi-bin/wa?A2=ind0311&L=java3d-interest&P=18369
Please disregard the
False and Criminaly Fraudulent lies of Nasa and Yumetech.com staff ------------------------------------------------------------------ to the contrary in the above post.
Justin Couch has continued the criminally fraudulent ------------ lies and criminally libelous and vulgar attacks on the Sun VRML Loaders and the people who have used them succesfully: Their fraud harms Java3d & all web users.
Nasa uses Java3d & VRML for 3d Animation ---------------------------------------- http://www.frontiernet.net/~imaging/Nasa_3d_animation.html
Java3d & VRML Render Human Animation in a Web Browser ----------------------------------------------------- http://www.frontiernet.net/~imaging/vrml_loaders_working.html
Ben, why load "obj" files when VRML ( .wrl ) are more feature rich and more widely used and better supported by many tools including Great Free tools from Sun.
-- Paul, Java Developer & Web Animator -------------------------------------- Imaging the Imagined: Modeling with Math & a Keyboard
=========================================================================== To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff JAVA3D-INTEREST". For general help, send email to [EMAIL PROTECTED] and include in the body of the message "help".