Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
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] 2
1  Java Game APIs & Engines / Xith3D Forums / Re: Problems with ATI Catalyst 4.8-4.9 on 9800pro on: 2004-10-05 14:23:06
Having similar problems here with the new ATI drivers. Our software (which includes a Xith/JOGL canvas embedded in a swing UI) worked fine previously, but now the canvas seems to lock up upon initialization. Moreover, it seems to lock the entire OS UI, making it difficult to even exit the application.

The examples all seem to work fine.
2  Java Game APIs & Engines / Xith3D Forums / Re: Run-time Error with Recent Xith3D/JOGL on: 2004-07-13 19:59:07
Quote
Picking error is definitely caused by outdated JOGL version. Please triple check if you don't have old jogl.jar somewhere (i.e. in lib/ext).

Yuri

Once again, I fell to this user error. I swear, it's jar hell over here. Everything is working now. Successful upgrade!

1  
for file in `find / -name jogl.jar`; do rm $file; done;
3  Java Game APIs & Engines / Xith3D Forums / Run-time Error with Recent Xith3D/JOGL on: 2004-07-12 14:10:32
Hello all.

I recently upgraded to the most recent builds of Xith3D and JOGL. Compilation performs without error, but I now get an error at run-time.

This error is encountered when the canvas first pulls up in my own project, using the most recent build of Xith3D (2004-05-03) and both the most recent build of JOGL (1.1b03 - April 29) and it's nightly (jogl-1.1.0-b04-bin-linux.tar.gz).

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
libGL error: drmMap of framebuffer failed
java.lang.NoSuchMethodError: net.java.games.jogl.GL.glSelectBuffer(I[I)V
      at com.xith3d.render.jogl.CanvasPeerImpl.renderStart(CanvasPeerImpl.java:303)
      at com.xith3d.render.jogl.CanvasPeerImpl.display(CanvasPeerImpl.java:824)
      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:940)
      at com.xith3d.scenegraph.View.pick(View.java:751)
      at ...
Exception in thread "main" java.lang.Error: java.lang.NoSuchMethodError: net.java.games.jogl.GL.glSelectBuffer(I[I)V
      at com.xith3d.render.jogl.CanvasPeerImpl.display(CanvasPeerImpl.java:879)
      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:940)
      at com.xith3d.scenegraph.View.pick(View.java:751)
      at ...
Caused by: java.lang.NoSuchMethodError: net.java.games.jogl.GL.glSelectBuffer(I[I)V
      at com.xith3d.render.jogl.CanvasPeerImpl.renderStart(CanvasPeerImpl.java:303)
      at com.xith3d.render.jogl.CanvasPeerImpl.display(CanvasPeerImpl.java:824)
      ... 13 more


This would appear to be two seperate problems:  a libGL error (drmMap of framebuffer failed) and a picking error that appears to be in JOGL.

The libGL error rears its head after certain parts of my scene render. For example, my canvas comes up with some items rendered. The terrain, the UI overlays, a cube, a line, etc. But, my textured and lit terrain is all black.

The picking error occurs as soon as I click anywhere in the window.

Any thoughts?
4  Java Game APIs & Engines / Xith3D Forums / Re: Compilation Problems? on: 2004-07-08 19:46:57
Quote
<snip>
That said, in your post you mentioned you are upgrading from an older version of Xith3D (and therefore most likely jogl).  It is quite likely that you have and old version of jogl around (maybe the dll's or jar's in some obscure location) which is buggering it all up.  If after hunting for old versions you can't find any, I suggest trying on a fresh PC if you have one handy.
</snip>


Good call. I had a rogue jogl library in a system directory. No worries now. All is well.  Cool
5  Java Game APIs & Engines / Xith3D Forums / Re: Compilation Problems? on: 2004-07-07 17:42:46
Quote
Well like I said it is just a guess. The errors all seem to indicate that the classes are found but:

1> the method signatures don't match
2> the methods aren't there

sounds like a wrong version to me.

If this is indeed the case, what version of JOGL should I be using for the latest build of Xith3D? I assumed that I should have used the JOGL that ships in the third-party directory in Xith's CVS repository, but that appears not to be the case.
6  Java Game APIs & Engines / Xith3D Forums / Re: Compilation Problems? on: 2004-07-07 16:37:03
Quote
Just a guess but it looks like you might have the wrong version of the JOGL library.

I have trouble believing this. The third-party directory that is being used came straight from CVS along with the source for Xith. The .so files for joal, jogl, lwjgl, and openal have all been copied to the correct location.
7  Java Game APIs & Engines / Xith3D Forums / Re: Picking: geometry intersection on: 2004-07-01 13:08:15
^^ bump!  Grin ^^

I'm really interested to see how people accomplish this. I have found lots of information on how to determine if a ray intersects a shape, but not where.
8  Java Game APIs & Engines / Xith3D Forums / Re: Directional Lighting Fun on: 2004-06-17 21:39:57
Quote
Looks like specular material.
Check your material settings.


Is there a default specular color? As you can see from the code sample, I'm not setting a specular component on the material.

It looks like, however, if I set specular color to black, it works as expected. Any thoughts? Should I have to set spec to black to get the expected results?
9  Java Game APIs & Engines / Xith3D Forums / Directional Lighting Fun on: 2004-06-17 16:17:49
I'm having some issues with DirectionalLight and I'm not sure if it's the light or my normal generation that's the problem. I generate a normal for each vetex based on 8 surrounding points. I have the following code for generating a normal for each vertex:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
99  
100  
101  
102  
103  
104  
105  
106  
107  
108  
109  
110  
111  
112  
113  
      public Vector3f calculateNormal(float x, float y, float z) {
            // We'll add/subtract this to/from x and z to find our surrounding 8 points
           int vectorCalcRadius = scale;

            // Points
           Point3f a = new Point3f(x, y, z),
                  b =
                        new Point3f(
                              x,
                              terrain.getY(x, (z + vectorCalcRadius)),
                              z + vectorCalcRadius),
                  c =
                        new Point3f(
                              x + vectorCalcRadius,
                              terrain.getY(
                                    (x + vectorCalcRadius),
                                    (z + vectorCalcRadius)),
                              z + vectorCalcRadius),
                  d =
                        new Point3f(
                              x + vectorCalcRadius,
                              terrain.getY((x + vectorCalcRadius), z),
                              z),
                  e =
                        new Point3f(
                              x + vectorCalcRadius,
                              terrain.getY(
                                    (x + vectorCalcRadius),
                                    (z - vectorCalcRadius)),
                              z - vectorCalcRadius),
                  f =
                        new Point3f(
                              x,
                              terrain.getY(x, (z - vectorCalcRadius)),
                              z - vectorCalcRadius),
                  g =
                        new Point3f(
                              x - vectorCalcRadius,
                              terrain.getY(
                                    (x - vectorCalcRadius),
                                    (z - vectorCalcRadius)),
                              z - vectorCalcRadius),
                  h =
                        new Point3f(
                              x - vectorCalcRadius,
                              terrain.getY((x - vectorCalcRadius), z),
                              z),
                  i =
                        new Point3f(
                              x - vectorCalcRadius,
                              terrain.getY(
                                    (x - vectorCalcRadius),
                                    (z + vectorCalcRadius)),
                              z + vectorCalcRadius);

            // Co-planar vectors
           Vector3f ab = new Vector3f(),
                  ac = new Vector3f(),
                  ad = new Vector3f(),
                  ae = new Vector3f(),
                  af = new Vector3f(),
                  ag = new Vector3f(),
                  ah = new Vector3f(),
                  ai = new Vector3f();
            ab.sub(a, b);
            ac.sub(a, c);
            ad.sub(a, d);
            ae.sub(a, e);
            af.sub(a, f);
            ag.sub(a, g);
            ah.sub(a, h);
            ai.sub(a, i);

            // Surface normal vectors
           Vector3f bc = new Vector3f(),
                  cd = new Vector3f(),
                  de = new Vector3f(),
                  ef = new Vector3f(),
                  fg = new Vector3f(),
                  gh = new Vector3f(),
                  hi = new Vector3f(),
                  ib = new Vector3f();
            bc.cross(ab, ac);
            cd.cross(ac, ad);
            de.cross(ad, ae);
            ef.cross(ae, af);
            fg.cross(af, ag);
            gh.cross(ag, ah);
            hi.cross(ah, ai);
            ib.cross(ai, ab);
            bc.normalize();
            cd.normalize();
            de.normalize();
            ef.normalize();
            fg.normalize();
            gh.normalize();
            hi.normalize();
            ib.normalize();

            // Normalized sum of vectors
           Vector3f n = new Vector3f();
            n.add(bc);
            n.add(cd);
            n.add(de);
            n.add(ef);
            n.add(fg);
            n.add(gh);
            n.add(hi);
            n.add(ib);
            n.normalize();

            return n;
      }


as for the light...
1  
2  
            DirectionalLight dlight = new DirectionalLight();
            dlight.setDirection(new Vector3f(1.f, -1.f, 1.f));


and as for the material on the object...
1  
2  
3  
4  
            Material mat = new Material();
            mat.setDiffuseColor(1.f, 1.f, 1.f);
            mat.setAmbientColor(0.7f, 0.7f, 0.7f);
            mat.setLightingEnable(true);


The result is *close* but as you'll see there are some issues. Notice the big white splotches on certain points in the terrain? What's up with that?

See the white on the mountain in the foreground and the chain in the background.


Closeup on the chain...


Any thoughts?
10  Java Game APIs & Engines / Xith3D Forums / Re: Texture tiles on: 2004-06-01 21:04:38
Emil,

You would need some way to extract x,y,z values from the picture. Once you're able to, for example, get the height for a given x,z coordinate, you should be able to modify the inside class "TerrainGenerator" in the demo to use your terrain instead of generating the random terrain that it does currently. Take a look at the method declaration:
1  
2  
3  
public float sample(int x, int z) {
  return (float)(perlin.value((float)x/1400f,(float)z/1400f)+1f)*MAX_HEIGHT;
}

All you would have to do is replace that return statement with a statement that returns a valid height for a given x,z in your heightmap image. The implementation of reading the terrain file is entirely up to you.

Hope this helps.

-M

Quote
Thank you very much!  Cheesy

Now I can navigate through the terrain and everything is fine.

But how do I load the terrain from a file,
e.g: a grey-scale picture (heightmap) ?

Thanks for the help  Smiley

Emil Alonzo

11  Java Game APIs & Engines / Xith3D Forums / Re: Texture tiles on: 2004-05-28 18:55:03
Emil,

Take a look at this post:

http://www.java-gaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=xith3d;action=display;num=1075920495

I re-wrote the terrain demo a while back and tiled a texture on the terrain. The web start, jar, and full source are available if you visit that thread.

Let us know how it goes.
12  Java Game APIs & Engines / Xith3D Forums / RenderBin Exception on: 2004-05-13 15:14:14
I'm getting an exception when trying to push a relatively large quantity of data to the Xith renderer. The error is:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
Exception in thread "main" java.lang.NullPointerException
      at com.xith3d.render.RenderBin.addAtom(RenderBin.java:87)
      at com.xith3d.render.Renderer.addAtom(Renderer.java:163)
      at com.xith3d.scenegraph.View.renderNode(View.java:1088)
      at com.xith3d.scenegraph.View.renderNode(View.java:1015)
      at com.xith3d.scenegraph.View.renderNode(View.java:968)
      at com.xith3d.scenegraph.View.renderNode(View.java:1015)
      at com.xith3d.scenegraph.View.renderNode(View.java:1015)
      at com.xith3d.scenegraph.View.renderNode(View.java:1015)
      at com.xith3d.scenegraph.View.renderNode(View.java:1015)
      at com.xith3d.scenegraph.View.renderNode(View.java:1015)
      at com.xith3d.scenegraph.View.renderNode(View.java:1015)
      at com.xith3d.scenegraph.View.renderNode(View.java:1015)
      at com.xith3d.scenegraph.View.getRenderFrame(View.java:824)
      at com.xith3d.scenegraph.View.renderOnce(View.java:717)
      at com.xith3d.scenegraph.View.renderOnce(View.java:655)
      at com.janusresearch.commsplanner.ui.openGL.RenderedCanvas.start(Unknown Source)
      at com.janusresearch.commsplanner.ui.CommsPlannerGUI.init(Unknown Source)
      at com.janusresearch.commsplanner.ui.CommsPlannerGUI.<init>(Unknown Source)
      at com.janusresearch.commsplanner.ui.CommsPlannerGUI.main(Unknown Source)


What I see in RenderBin.java is:
1  
2  
      final static int START_SIZE = 3000;
      final static int EXT_SIZE = 200;

and
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
      public RenderBin(StatePriorities priorities) {
            buckets = new RenderBucket[START_SIZE];
            for (int i = 0; i < START_SIZE; i++)
                  buckets[i] = new RenderBucket();
            maxSize = START_SIZE;
            curSize = 0;
            this.priorities = priorities;
      }

      public void addAtom(RenderAtom atom) {
            if (curSize == buckets.length) {
                  RenderBucket[] newBuckets =
                        new RenderBucket[buckets.length + EXT_SIZE];
                  System.arraycopy(buckets, 0, newBuckets, 0, buckets.length);
                  buckets = newBuckets;
            }
            buckets[curSize++].setAtom(atom);
      }


What I'm wondering is, why the limits on the bucket? Who says someone won't have massive hardware capable of rendering many more atoms? Any thoughts?
13  Java Game APIs & Engines / Xith3D Forums / Re: New Xith3DTerrainTest Demo WITH TEXTURES! on: 2004-04-07 13:16:37
Yesterday my nameservers couldn't find users.xith.org. Today, they can, but I still can't get to JCD's or my own demos on that site. I tried both /userx and /~userx.
14  Java Game APIs & Engines / Xith3D Forums / Re: New Xith3DTerrainTest Demo WITH TEXTURES! on: 2004-04-06 18:57:34
Quote
wrightmf,

where does your terrain demo live now?

thanks!


Ummm ... looks like users.xith.org is down. JCD's demos aren't working either.

/me looks around at xith.org maintainers
15  Java Game APIs & Engines / Xith3D Forums / Re: Problem loading a Jpeg as texture on: 2004-02-27 22:27:44
Quote

Many thanks for testing it.

So how does Kev manage to use this method in his 3dsloader...?

Thanks a lot. It's a good workaround. Still do we have to worry why it doesn't work with the original method?


/me looks around at Xith developers

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
    public static BufferedImage flipImageVertical(BufferedImage bi)
    {

        AffineTransform tx = AffineTransform.getScaleInstance(1, -1);
          tx.translate(0, -bi.getHeight(null));
          AffineTransformOp op = new AffineTransformOp(tx, AffineTransformOp.TYPE_NEAREST_NEIGHBOR);

          BufferedImage bi2;
          if (bi.getColorModel().hasAlpha()) bi2= DirectBufferedImage.getDirectImageRGBA(bi.getWidth(),bi.getHeight());
          else bi2 = DirectBufferedImage.getDirectImageRGB(bi.getWidth(),bi.getHeight());

          op.filter(bi, bi2);
          return bi2;

    }
16  Java Game APIs & Engines / Xith3D Forums / Re: Problem loading a Jpeg as texture on: 2004-02-25 18:47:35
To answer your question, no I can't run your code. I get the same error:

Quote
Exception in thread "main" java.awt.image.ImagingOpException: Unable to transform src image
       at java.awt.image.AffineTransformOp.filter(AffineTransformOp.java:263)
       at com.xith3d.loaders.texture.TextureLoader.flipImageVertical(TextureLoader.java:431)
       at com.xith3d.loaders.texture.TextureLoader.constructTexture(TextureLoader.java:481)
       at com.xith3d.loaders.texture.TextureLoader.loadTexture(TextureLoader.java:361)
       at testTex.doTest(testTex.java:53)
       at testTex.main(testTex.java:24)


To get this working in my own code, I had to use DirectBufferedImage.make().

Try this in place of your code:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
import com.xith3d.loaders.texture.*;
import com.xith3d.image.*;

BufferedImage texImage = <whatever you do to make your image>;
Texture2D texture = (Texture2D)TextureLoader.tf.loadTexture(
  DirectBufferedImage.make(texImage),
  "RGB",
  true,
  Texture.NICEST,
  Texture.NICEST,
  Texture.WRAP
);
17  Java Game APIs & Engines / Xith3D Forums / Re: Problem loading a Jpeg as texture on: 2004-02-25 17:58:10
Just out of curiosity, why aren't you using the built-in get* functions from the TextureLoader?
1  
TextureLoader.tf.getTextureWrap("Pic.jpg");
18  Java Game APIs & Engines / Xith3D Forums / Re: ASE loader and massive console output on: 2004-02-14 00:25:27
Quote
I agree, I'll put it on my todo list.  Feel free to file an issue so we can keep track of it Smiley

Will.


Fair enough:
https://xith3d.dev.java.net/issues/show_bug.cgi?id=63

Patch included. Used cvs diff to generate it. Hope this helps.
19  Java Game APIs & Engines / Xith3D Forums / ASE loader and massive console output on: 2004-02-13 15:27:09
I like the ASE loader as it does exactly what it claims to do. However, it prints out an ungodly amount of information when it is used. Could we fix this so that it uses Xith3D's logger instead? It would fit better with existing practices in the rest of Xith3D's source and would just plain be prettier. Smiley
20  Java Game APIs & Engines / Xith3D Forums / Re: Where can I upload the OSX information? on: 2004-02-10 13:11:26
fhmiv, which web start demo are you referring to? If you are referring to the skybox/terrain demo, then that error is due to the image being located in a subdirectory of the jar file. If you were to download the jar and build it, it should work as expected. The problem with OSX's jar texture loader is being looked into.

Have you tried the most recent (as of 5:48am thanks to Will) CVS of Xith3D and the third-party libraries? Some are claiming good results from that.
21  Java Game APIs & Engines / Xith3D Forums / Re: Texture Unit 2 & 3 bug on: 2004-02-10 12:28:50
That seems very odd to me. I'm just happy to have multi-texturing working the way I want it now. Cheesy
22  Java Game APIs & Engines / Xith3D Forums / Re: Sky generation on: 2004-02-09 17:50:51
Quote

We really need a central place to put working stable builds of these frameworks for WebStart users to reference as an extension or somthing.

Agreed. Of course, I don't think this would have run on your machine anyway as I use a textures subdirectory inside the jar and I have seen problems with this from Mac users where I work. I guess I should move the textures to the root of the jar to be more flexible.
23  Java Game APIs & Engines / Xith3D Forums / Re: Sky generation on: 2004-02-09 13:11:41
swpalmer, can you run other Xith demos or is mine the only one that is problematic on your system?
24  Java Game APIs & Engines / Xith3D Forums / Re: Texture Unit 2 & 3 bug on: 2004-02-09 12:29:13
Sorry, I know it's not quite first thing, but here goes. Keep in mind, I'm not *real* sure what parts of my code are required and what parts are just me searching for something that works (in terms of transparency attributes and texture attributes). All I know is that this code allowed me to have 5 textures applied to the shape3d at one time and I'm happy. Cheesy

Geometry generation:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
    geo = new IndexedTriangleArray(
                    MAX_VERTICES,
                    GeometryArray.COORDINATES |
                      GeometryArray.NORMALS |
                      GeometryArray.COLOR_3 |
                      GeometryArray.TEXTURE_COORDINATE_2 |
                      GeometryArray.BY_REFERENCE,
                    5,
                    new int[5],
                    MAX_INDICES);


Texture attributes:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
    TextureAttributes[] textureAttrs = new TextureAttributes[5];
    textureAttrs[0] = new TextureAttributes();
    textureAttrs[0].setTextureMode(TextureAttributes.NICEST);
    textureAttrs[1] = new TextureAttributes();
    textureAttrs[1].setTextureMode(TextureAttributes.NICEST);
    textureAttrs[2] = new TextureAttributes();
    textureAttrs[2].setTextureMode(TextureAttributes.NICEST);
    textureAttrs[3] = new TextureAttributes();
    textureAttrs[3].setTextureMode(TextureAttributes.NICEST);
    textureAttrs[4] = new TextureAttributes();
    textureAttrs[4].setTextureMode(TextureAttributes.NICEST);


Texture unit state:
1  
2  
3  
4  
5  
6  
    TextureUnitState[] texUnitState = new TextureUnitState[5];
    texUnitState[0] = new TextureUnitState(detailTexture, textureAttrs[0], null);
    texUnitState[1] = new TextureUnitState(oceanTexture, textureAttrs[1], null);
    texUnitState[2] = new TextureUnitState(roadTexture, textureAttrs[2], null);
    texUnitState[3] = new TextureUnitState(contourTexture, textureAttrs[3], null);
    texUnitState[4] = new TextureUnitState(inlandWaterTexture, textureAttrs[4], null);


Transparency attributes:
1  
2  
3  
    TransparencyAttributes transAttr = new TransparencyAttributes();
    transAttr.setMode(TransparencyAttributes.BLENDED);
    transAttr.setTransparency(0.3f);


Appearance:
1  
2  
3  
4  
5  
    Appearance a = new Appearance();
    pa = new PolygonAttributes(PolygonAttributes.POLYGON_FILL,PolygonAttributes.CULL_BACK,0);
    a.setPolygonAttributes(pa);
    a.setTransparencyAttributes(transAttr);
    a.setTextureUnitState(texUnitState);


Shape:
1  
    shape = new Shape3D(geo,a);


Coordinate generation:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
  public void initVert(int i, float x, float y, float z) {
    if(totalVerts>=MAX_VERTICES) return;
    // Gots ta' generate our texture coordinates
   int DetailTexScale=32;
    int VPFTexScale=1;
    float texCoordx, texCoordz;
                                                                                                                                                                 
    texCoordx = x / (terrain.getWidth()/DetailTexScale);
    texCoordz = z / (terrain.getWidth()/DetailTexScale);
    TexCoord2f DetailTexCoord = new TexCoord2f(texCoordz, texCoordx);
                                                                                                                                                             
    texCoordx = x / (terrain.getWidth()/VPFTexScale);
    texCoordz = z / (terrain.getWidth()/VPFTexScale);
    TexCoord2f VPFTexCoord = new TexCoord2f(texCoordz, texCoordx);
                                                                                                                                                             
    geo.newVertex();
    geo.setCoordinate(x,y,z);
    geo.setTextureCoordinate(0, totalVerts, DetailTexCoord);
    geo.setTextureCoordinate(1, totalVerts, VPFTexCoord);
    geo.setTextureCoordinate(2, totalVerts, VPFTexCoord);
    geo.setTextureCoordinate(3, totalVerts, VPFTexCoord);
    geo.setTextureCoordinate(4, totalVerts, VPFTexCoord);
                                                                                                                                                                 
    float c = y/(MAX_HEIGHT);
    geo.setColor(0.66f+c,0.66f+c,0.57f+c);
    vertexMap[i] = totalVerts++;
  }
25  Java Game APIs & Engines / Xith3D Forums / Re: Sky generation on: 2004-02-09 10:02:25
swpalmer, have you tried downloading the jar and compiling/running it manually? The bundled MacOSX libraries worked for the guys at the office (except for texture handling from the jar subdirectory, which shouldn't be an issue if you compile/run manually). Please give it a try and let me know.
26  Java Game APIs & Engines / Xith3D Forums / Re: Texture Unit 2 & 3 bug on: 2004-02-08 20:39:48
Offhand, I would say your code looks much like what I have at the office, although I know I played around with transparency attributes, etc. I'll post code first thing tomorrow morning (Eastern Standard Time).
27  Java Game APIs & Engines / Xith3D Forums / Re: Texture Unit 2 & 3 bug on: 2004-02-08 18:17:45
Yes, currently in my project for work, I have 4 textures loaded onto the terrain. One, being tiled across 16 per side, and 3 others stretched all the way across. I'm at home today but when I get to the office tomorrow, I'll send you sample code.

The only thing I'm having trouble with is getting large textures working. I know my card supports very large textures (Radeon 9800 pro) but the largest I can get to show up in Xith is 2048. I *know* I had 4096 (and beyond) working in gl4java. I think, to get the resolution I need, I'm going to have to cut up the textures and tile them.
28  Java Game APIs & Engines / Xith3D Forums / Re: Texture Unit 2 & 3 bug on: 2004-02-08 17:38:49
JCD, try setting the number of texture sets to whatever number you desire in the creation of your geometry object. I have sample code for you at my office if you need it. I can hook you up with it tomorrow.  Grin

What worked for me was something along the lines of:
1  
2  
3  
4  
5  
6  
  IndexedTriangleArray myGreatBigArray(
    bigNumber,
    GeometryArray.COORDINATES | GeometryArray.TEXTURE_COORDINATE_2,
    4,
    new int[] {0,0,0,0},
    someOtherBigNumber);


Once you have the geo array setup right, then setting up the textureCoordinates should work as expected.
29  Java Game APIs & Engines / Xith3D Forums / Re: New Xith3DTerrainTest Demo WITH TEXTURES! on: 2004-02-08 17:21:42
/me runs off to look at background nodes in Xith
30  Java Game APIs & Engines / Xith3D Forums / Re: Sky generation on: 2004-02-08 17:16:05
Quote
Looks nice, but you've got the texture seams visible along the edges of the skybox - does Xith have a CLAMP_TO_EDGE texture mode yet...?


The answer is yes, but the idiot who wrote the demo forgot to put it in there. That guy should be strung up Wink

Anyway, it's fixed now. Download is still in the same place.

Pages: [1] 2
 

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

The first screenshot will be displayed as a thumbnail.

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

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

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

Riven (12 views)
2014-07-23 20:56:16

ctomni231 (42 views)
2014-07-18 06:55:21

Zero Volt (38 views)
2014-07-17 23:47:54

danieldean (32 views)
2014-07-17 23:41:23

MustardPeter (34 views)
2014-07-16 23:30:00

Cero (49 views)
2014-07-16 00:42:17

Riven (50 views)
2014-07-14 18:02:53
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

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!