Go with the flow, more people are using VRML for visualizations and games than any other format, there are programs, experts, examples using VRML than anything else.
Sun developed some very good VRML Loaders and a nice FlyThough demo that will load VRML on the fly, and position it, and add lights for your viewing convience. The Source code is available, a new book includes the Sun VRML Loaders in it's examples ( source code available ). VRML Viewing with Sun Vrml Loaders, nice FlyThru demo --------------------------- & Java 1.1 Vrml Viewer http://www.frontiernet.net/~imaging/games_with_java3d.html http://www.frontiernet.net/~imaging/java3d_and_vrml.html http://www.frontiernet.net/~imaging/java3dviewer.html x3d loaders, for loading xml-ised Vrml -------------------------------------- http://www.web3d.org/TaskGroups/source/xj3d.html http://www.geocrawler.com/lists/3/Web/297/0/8029996/ Yumetech U Penn people may attack you if you say good things about the Sun code, so be carefull. F�bio Magalh�es wrote: > > is This code correct ? Because, in my pc the app with > it , don't show the cube file. Anyone know why ? > > Thanks, Fabio. > > > > private BranchGroup constructContentBranch() > { > ObjectFile myOBJ = new ObjectFile(); > Scene myOBJScene = null; > > //Attempt to load in the OBJ content using > ObjectFile. > try { > myOBJScene = myOBJ.load(".\\cube.obj"); > } > catch (Exception e) > { > System.out.println("Could not open OBJ > file...exiting"); > //System.exit(1); > } > > //Construct and return branch group containing > our OBJ scene. > BranchGroup contentBranchGroup = new > BranchGroup(); > > contentBranchGroup.addChild(myOBJScene.getSceneGroup()); > return(contentBranchGroup); > > } > Try loading with the Sun Loaders and if you have any problems, ask again. But if you load VRML with the Sun VRML Loaders you probably won't have any problems. Start with the Sun Java3d FlyThrough Demo. I don't mean to 'not answer the question', but really there is a problem with the question. Start with loading vrml, it's the best way to start: use the best established practices & methods, what other people have used successfully. The nice people at Sun created it for your viewing convenience, and to give you a gentle, problem free introduction to portable 3d rendering. With the Sun VRML Loaders you can animate your VRML worlds in a browser, or out, on Windows, Linux, HP-UX, SGI, IBM-AIX, etc. as I have done, merrily, merrily, merrily. -- 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".
