Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (108)
games submitted by our members
Games in WIP (536)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / Xith3D Forums / Re: Material loading with the ASE loader on: 2004-08-26 19:46:39
Okay thanks.  Smiley
2  Java Game APIs & Engines / Xith3D Forums / Material loading with the ASE loader on: 2004-08-24 19:39:23
I'm using the ASE loader for Xith, and everything works as expected for geometry that uses bitmap textures, but geomtry that uses materials that don't use a bitmap diffuse map show up in Xith as white filled outlines.

Here's a screenshot:



The white sphere at the top of the big cube is supposed to be blue (blue diffuse color and everything in 3ds max, and I checked the ASE file too), but it shows up completely white.  Applying a blue, light-affected material to it and then adding lights (in Xith) makes it display nicely, but is there a way to make it display like how it's supposed to, based on the ASE file, and not an artificial Material added using Xith?  Apparently, the ASE loader only loads bitmaps for textures??

Here's the material list in the ASE file:

*MATERIAL_LIST {
     *MATERIAL_COUNT 2
     *MATERIAL 0 {
           *MATERIAL_NAME "matBox"
           *MATERIAL_CLASS "Standard"
           *MATERIAL_AMBIENT 1.0000      0.0000      0.0000
           *MATERIAL_DIFFUSE 1.0000      0.0000      0.0000
           *MATERIAL_SPECULAR 1.0000      1.0000      1.0000
           *MATERIAL_SHINE 0.1000
           *MATERIAL_SHINESTRENGTH 0.0000
           *MATERIAL_TRANSPARENCY 0.0000
           *MATERIAL_WIRESIZE 1.0000
           *MATERIAL_SHADING Blinn
           *MATERIAL_XP_FALLOFF 0.0000
           *MATERIAL_SELFILLUM 0.0000
           *MATERIAL_FALLOFF In
           *MATERIAL_XP_TYPE Filter
           *MAP_DIFFUSE {
                 *MAP_NAME "mapBox"
                 *MAP_CLASS "Bitmap"
                 *MAP_SUBNO 1
                 *MAP_AMOUNT 1.0000
                 *BITMAP "C:\java\projects\Xith3DTest\MtlPlat2.jpg"
                 *MAP_TYPE Screen
                 *UVW_U_OFFSET 0.0000
                 *UVW_V_OFFSET 0.0000
                 *UVW_U_TILING 1.0000
                 *UVW_V_TILING 1.0000
                 *UVW_ANGLE 0.0000
                 *UVW_BLUR 1.0000
                 *UVW_BLUR_OFFSET 0.0000
                 *UVW_NOUSE_AMT 1.0000
                 *UVW_NOISE_SIZE 1.0000
                 *UVW_NOISE_LEVEL 1
                 *UVW_NOISE_PHASE 0.0000
                 *BITMAP_FILTER Pyramidal
           }
     }
     *MATERIAL 1 {
           *MATERIAL_NAME "matSphere"
           *MATERIAL_CLASS "Standard"
           *MATERIAL_AMBIENT 0.0000      0.0000      1.0000
           *MATERIAL_DIFFUSE 0.0000      0.0000      1.0000
           *MATERIAL_SPECULAR 1.0000      1.0000      1.0000
           *MATERIAL_SHINE 0.2500
           *MATERIAL_SHINESTRENGTH 1.0000
           *MATERIAL_TRANSPARENCY 0.0000
           *MATERIAL_WIRESIZE 1.0000
           *MATERIAL_SHADING Blinn
           *MATERIAL_XP_FALLOFF 0.0000
           *MATERIAL_SELFILLUM 0.0000
           *MATERIAL_FALLOFF In
           *MATERIAL_XP_TYPE Filter
     }


And the code fragment that loads up the sphere and cube:

           AseFile af = new AseFile();
           AseReader r = null;
           try {
                 r = new AseReader(new BufferedReader(new FileReader("BoxSphereTest.ase")));
           }
           catch(IOException e) {
                 System.out.println("Error reading ASE file.");
           }
           af.parse(r);
           TransformGroup boxSphereTG = new TransformGroup();
           Transform3D trans = new Transform3D();
           trans.setScale(0.1f);
           boxSphereTG.setTransform(trans);
           objRotate.addChild(boxSphereTG);
           boxSphereTG.addChild(af.getModel());
3  Java Game APIs & Engines / Xith3D Forums / Re: Effort to improve the Xith3D API documentation on: 2004-08-24 18:37:47
Quote
+1
Maybe yes, if I find the time to do it !

It's sure that the documentation is'nt complete at all !
For exemple : how should I detect collision between two geometry objects ?



Uh yea... I just realized that there is no explicit support of collision detection or avoidance in the "Xith3D Features" thread.. I guess you have to do that yourself?

Okay nevermind, I just looked in the Javadoc and there are a bunch of classes to support collisions -- must have just been left out of the Features thread accidentally.
4  Java Game APIs & Engines / Xith3D Forums / Re: A lot of these methods aren't implemented... on: 2004-08-22 07:32:52
Quote
 Maybe we need to do something similar to the LWJGL Mac donation drive and get a donation pool going?


Heh, yeah let's see if Xith gets a grand.  Tongue
5  Java Game APIs & Engines / Xith3D Forums / A lot of these methods aren't implemented... on: 2004-08-21 22:53:04
Looking through the source, I notice a lot of the methods everywhere (in GeomContainer for example) are completely empty and some just throw an unsupported function error.  I checked to see if any of these dummy methods are implemented in subclasses of GeomContainer but from what I can see, that's all they are -- dummy methods.  I don't see how this is supposed to be beneficial.  Wouldn't it be better just to delete those lines so that the error would show up as a compile error (method isn't there)?  That would be a lot better than having a bunch of useless methods taking up space in the API and confusing newbies like me.  At one point I was trying to use one of these dummy methods for about and hour or two before checking the Xith source to realize the method was completely empty.  It's hard to figure out which method to use because there are so many versions of similarly named methods, and yet many of them have absolutely no use whatsoever, except to confuse.  They should simply be added in when they are implemented.  Or is there some fundamental API design issue I have overlooked...?

Oh yea, and personally I think the most important thing to improve on in Xith right now is the Javadoc.  It's practically non-existant right now..

Another oh yea... Does anybody know of any good Xith guides besides the one on the offical xith.org site?  Didn't find any with Google..
6  Java Game APIs & Engines / Xith3D Forums / Re: Array index exception caused by TextureUnitSta on: 2004-08-20 02:36:57
Yay thanks.  What I did was I just copied the createCubeViaTriangles() used in one of the official test classes and pasted it into my source and used that local one instead of the createCubeViaTriangles() in the Cube class.  It then worked for whatever reason.  But your way of doing it is the proper way Cheesy.  It should be added to the guide, which I find often leaves out a lot...
7  Java Game APIs & Engines / Xith3D Forums / Array index exception caused by TextureUnitState?? on: 2004-08-18 05:24:12
I'm following the getting started guide (my code isn't exactly what is shown in the guide though) and I have a little program that uses all the functions taught up until multitexturing, but when I added multitexturing with the TextureUnitState[] array (it's the only array I explicitly use in the program), the program fails to run, giving an ArrayIndexOutOfBoundsException.  I've tried increasing the TextureUnitState[] array size by one during initalization and then adding a dummy TextureUnitState, but that doesn't work either.  Even though there are 2 or 3 objects in the array, index 1 is considered out of bounds.  This to me is very odd, and I don't know what I have done wrong.  Could someone please tell me what this is caused by?  Thanks.

Here is the Xith3DTest constructor, where the problem should lie.  At the very end is the exception I get from the program.

     public Xith3DTest() {
         VirtualUniverse universe = new VirtualUniverse();

         View view = new View();
         universe.addView(view);

         Locale locale = new Locale();
         universe.addLocale(locale);

         BranchGroup scene = new BranchGroup();
         locale.addBranchGraph(scene);

         translate = new Transform3D();
         objTranslate = new TransformGroup(translate);
         scene.addChild(objTranslate);

         rotate = new Transform3D();
         objRotate = new TransformGroup(rotate);
         objTranslate.addChild(objRotate);

         Texture2D textureCube1, textureCube2 = null;
         TextureLoader tl = new TextureLoader();
         tl.registerPath(".");
         TextureUnitState[] textures = new TextureUnitState[2];
         textures[0] = new TextureUnitState((Texture2D)tl.getMinMapTexture("wormhole1.gif"), null, null);
         textures[1] = new TextureUnitState((Texture2D)tl.getMinMapTexture("wormhole2.gif"), null, null);
         
         Geometry g = Cube.createCubeViaTriangles(0, 0, 0, 1, false);
         Appearance a = new Appearance();
         a.setTextureUnitState(textures);
         Shape3D sh0 = new Shape3D(g, a);
         objRotate.addChild(sh0);
   
         Shape3D sh1 = new Shape3D(createTriangle());
         scene.addChild(sh1);

         Shape3D sh2 = new Shape3D(createCross());
         scene.addChild(sh2);

         Shape3D sh3 = new Shape3D(createXPoints());
         scene.addChild(sh3);

         Shape3D sh4 = new Shape3D(createQuad());
         objRotate.addChild(sh4);

         scene.compile();

         RenderPeer rp = new RenderPeerImpl();
         CanvasPeer cp = rp.makeCanvas(null, 800, 600, 32, false);
         Canvas3D canvas = new Canvas3D();
         canvas.set3DPeer(cp);
         cp.getComponent().addKeyListener(new KeyAdapter() {
             public void keyPressed(KeyEvent e) {
                 switch(e.getKeyCode()) {
                       case KeyEvent.VK_UP            :      rotXtemp += 0.05;
                                                                 isRotationScheduled = true;
                                                                 break;
                       case KeyEvent.VK_DOWN      :      rotXtemp -= 0.05;
                                                                       isRotationScheduled = true;
                                                                       break;
                       case KeyEvent.VK_LEFT      :      rotYtemp += 0.05;
                                                                       isRotationScheduled = true;
                                                                       break;
                       case KeyEvent.VK_RIGHT      :      rotYtemp -= 0.05;
                                                                       isRotationScheduled = true;
                                                                       break;
                 }
             }
             
             public void keyReleased(KeyEvent e) {
                   int key = e.getKeyCode();
                   if(            key == KeyEvent.VK_UP
                             ||       key == KeyEvent.VK_RIGHT
                             ||      key == KeyEvent.VK_DOWN
                             ||      key == KeyEvent.VK_LEFT) {
                         rotX = rotXtemp;
                         rotY = rotYtemp;
                   }
             }

             public void keyTyped(KeyEvent e) {
                 switch(e.getKeyCode()) {
                       case KeyEvent.VK_ESCAPE      :      System.exit(0); break;
                 }
             }
         });
         Toolkit.getDefaultToolkit().addAWTEventListener(new EventListener(),      AWTEvent.KEY_EVENT_MASK
                                                                                                                     | AWTEvent.MOUSE_EVENT_MASK
                                                                                                                       | AWTEvent.MOUSE_MOTION_EVENT_MASK);

         view.addCanvas3D(canvas);
         view.getTransform().lookAt(
                 new Vector3f(0,0,2f),
                 new Vector3f(0,0,0),
                 new Vector3f(0,1,0));
         view.startView();

         while(true) {
               if(isRotationScheduled) {
                     performRotation();
               }
               
             view.renderOnce();
         }
     }

---------------------------------------------------------------


java.lang.ArrayIndexOutOfBoundsException: 1
     at com.xith3d.scenegraph.GeometryArray.getTexCoordData(GeometryArray.java:107)
     at com.xith3d.render.jogl.ShapeAtomPeer.setupTextureCoords(ShapeAtomPeer.java:114)
     at com.xith3d.render.jogl.ShapeAtomPeer.setupTextureUnit(ShapeAtomPeer.java:592)
     at com.xith3d.render.jogl.ShapeAtomPeer.renderAtom(ShapeAtomPeer.java:698)
     at com.xith3d.render.CanvasPeerBase.render(CanvasPeerBase.java:102)
     at com.xith3d.render.jogl.CanvasPeerImpl.drawBin(CanvasPeerImpl.java:760)
     at com.xith3d.render.jogl.CanvasPeerImpl.display(CanvasPeerImpl.java:1008)
     at net.java.games.jogl.impl.GLDrawableHelper.display(GLDrawableHelper.java:74)
     at net.java.games.jogl.GLCanvas$DisplayAction.run(GLCanvas.java:198)
     at net.java.games.jogl.impl.GLContext.invokeGL(GLContext.java:239)
     at net.java.games.jogl.GLCanvas.displayImpl(GLCanvas.java:186)
     at net.java.games.jogl.GLCanvas.display(GLCanvas.java:74)
     at com.xith3d.render.jogl.CanvasPeerImpl.render(CanvasPeerImpl.java:1109)
     at com.xith3d.scenegraph.View.renderOnce(View.java:756)
     at com.xith3d.scenegraph.View.renderOnce(View.java:689)
     at Xith3DTest.<init>(Xith3DTest.java:153)
     at Xith3DTest.main(Xith3DTest.java:48)
8  Java Game APIs & Engines / Xith3D Forums / Re: Xith3D dead since David left? on: 2004-08-18 05:11:22
Quote
Elias will be working on it properly very soon, we've got over $1,000 in donations to get the Mac I think.

Cas Smiley



wow. i wonder if a thousand people donated a dollar each, or one person donated a thousand dollars.... or someting in between.. either way that's a pretty good sign people aren't giving up on xith  Cheesy
9  Java Game APIs & Engines / Xith3D Forums / Re: Xith3D dead since David left? on: 2004-08-16 19:17:43
Oh man Mark Powell has basically left jME as well, for the most part:
http://www.mojomonkeycoding.com/index.php?option=content&task=view&id=24&Itemid=48

:-/..I'd better stick with xith..
10  Java Game APIs & Engines / Xith3D Forums / Re: Xith3D dead since David left? on: 2004-08-16 18:19:57
Huh!! does this mean jME will grow to be much better than Xith3D in the long run? It still has Mojomonkey.  Tongue
11  Java Game APIs & Engines / Xith3D Forums / Re: Installation doesn't work.. on: 2004-08-14 00:03:00
holy crud. it still doesn't work with eclipse. omg. k the installation tutorial doesn't really work.. for some people at least..
12  Java Game APIs & Engines / Xith3D Forums / Re: Installation doesn't work.. on: 2004-08-13 23:49:43
HOLY ****** FINALLY GOT IT!!! AWWHOWOOOOOOOOOO HAHHAHAHAH!!!!!!! OMGOMG HOLY CRRRRRRRROOOOOOPPPPPPPMOOOOOOOOOOOOSSSSSSSSSSSSS YYYAAAAAAAAYYYYYYYYYY hhhhhhaaaaaOOOOHHHH!!!!!! !!!!!!!!!!!!!!:D:D:D:D YYYAAAhhhoooo!!!!!!!

i think xith3d really needs an installer... there are somehow 2 seperate versions of jogl.jar... one is smaller by about a dozen kb (i dont' remember how much cuz i overwrote the larger one.. i don't know how i could have gotten two versions of the same file though because i've only been downloading from the "latest" folder or the complete third party files archive.... yea anyways..... k... finally.. whew... woohooo.... time to actually get something done.. wow...when that beautiful multicolored box appeared... wow...

Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin Grin
13  Java Game APIs & Engines / Xith3D Forums / Re: Installation doesn't work.. on: 2004-08-13 23:39:35
ok i have just randomly placed copies of the lib files everywhere and now it will run, but the window is still white, and i get a ............................


java.lang.UnsatisfiedLinkError: CreateDummyWindow
       at net.java.games.jogl.impl.windows.WGL.CreateDummyWindow(Native Method)

       at net.java.games.jogl.impl.windows.WindowsGLContextFactory$NativeWindow
Thread.run(WindowsGLContextFactory.java:260)

..............AAAAAAAAAAAAAAAAAAAAAAHHHH
14  Java Game APIs & Engines / Xith3D Forums / Re: Installation doesn't work.. on: 2004-08-13 23:26:28
o yea, and when i get the white screen, it's because of a "UnsatisfiedLinkError" with some native openGL stuff... this makes no sense. i updated my graphics card driver to...
15  Java Game APIs & Engines / Xith3D Forums / Installation doesn't work.. on: 2004-08-13 23:19:06
I keep getting a NoClassDefFoundError for the a GLEventListener when I try to run the sample box tutorial thing... It works off JWS, but it won't work through the command line, and when I execute it through Eclipse, the window pops up, but I just get a white screen...

I have all the Xith, JOGL, JOAL and even Vecmath and Misc jar files in my classpath system variable, and I even restarted my computer after copying all the required DLLs into the jre/bin as well as windows/system32 AND windows/system.... So I have no idea why it doesn't work.... JARs are in jre/lib/ext, dlls are EVERYWHERE, I have classpaths going, made sure the jre java.exe came before the jdk java.exe in my PATH, etc... this is really wierd.

Can someone please tell me what the heck is wrong?
I'm running the 1.4.2 sdk and jre, on windows xp.. used to have the 1.5 beta, but uninstalled it so now I only have ONE version of java... so that shouldn't bethe problem.
16  Java Game APIs & Engines / Java 3D / Re: Xith3D vs. jME? on: 2004-08-13 16:53:58
Haha trust Mojomonkey himself to give an unbiased answer..  Grin But yea, thanks, I'll try out both to test them out a bit.

I'm basically just doing this as a hobby, but in a couple of years I hope to have something quite exceptional that might be able get me some money  Wink.  Timewise.. several hours a day right now... but in a couple of week's time probably closer to an hour a day on average?

Danke sirs. Smiley
17  Java Game APIs & Engines / Java 3D / Xith3D vs. jME? on: 2004-08-13 02:48:41
Hey! My first post.  Grin

Could someone please explain to me which one is more suitable for what?  They both look very full featured and have good support.  It seems that Xith3D is more standard/official since it has a spot in the java-gaming.org forums... but jME has a bunch of cool features missing from Xith3D such as lens flares and prebuilt particle systems...

Right now, I'm basically deciding which one I should devote my time to learning, and I am leaning towards Xith3D because it seems more standard and shares many commonalities with Java3D, which means time spent learning Xith3D is transferrable in case I ever decide to use the Java3D standard.

I realize that "which one is better" is probably a dumb question, but could somebody who has actually used both please compare the two and help me decide which one to learn?  I don't want to "waste" time with an API that will just fade away in a couple of years or that won't provide the functionality I will need eventually to make my supergame once I am uberjavaman.  Thanks.  Cheesy

BTW, I've already done a lot of research and have basically narrowed it down to these two.  And yes, I have tried to look for a good comparison of the two, but so far nobody has really done a good, unbiased job of that.   :-/
Pages: [1]
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

CogWheelz (16 views)
2014-07-30 21:08:39

Riven (23 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (12 views)
2014-07-29 10:59:34

E.R. Fleming (33 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (43 views)
2014-07-24 01:59:36

Riven (42 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 13:54:12

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!