Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (714)
Games in Android Showcase (214)
games submitted by our members
Games in WIP (787)
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: Functional Background Node on: 2004-08-22 01:23:52

I have another question.
I use the classes :

Can you free them from 'Log4j.jar', so xith3d-user must not send this jar also with his examples?
(It's only 2 lines per class that have references to class 'org.apache.log4j.Category' from Log4j.jar )

2  Java Game APIs & Engines / Xith3D Forums / New xit3d -> HINT for textureloader on: 2004-08-21 19:47:10

Changing xith3d.jar from Xith3D_2004-05-03_cvs to
Xith3D_2004-07-28_cvs lets show my graphic a bit
There must be a change in the TextureLoader-class.

A call (in Xith3D_2004-05-03_cvs):

Texture2D tex = (Texture2D) bImage, "RGB", false, Texture.NICEST, Texture.NICEST, Texture.WRAP );

does not the same how in Xith3D_2004-07-28_cvs.
A change in the second parameter must be done,
to fix this problem :

Texture2D tex = (Texture2D) bImage, "RGBA", false, Texture.NICEST, Texture.NICEST, Texture.WRAP );

3  Java Game APIs & Engines / Xith3D Forums / Re: Functional Background Node on: 2004-08-21 18:13:44
Hello Will

Putting a geometry in a background node results in
some positions to a SingularMatrixException.
(I have bypassed this problem by creating a 'normal'
As far as i can overview, it comes from class 'View'.
If a geometry was added in a background node, with it's
method 'setGeometry', then automatically during
rendering there was a call to method
'getBackgroundTransform()' from class 'View',that
sometimes results in a SingularMatrixException.

(I don't understand, why in this method an inverted
matrix is required.)
Bye Adi

4  Java Game APIs & Engines / Xith3D Forums / Re: Effort to improve the Xith3D API documentation on: 2004-07-30 11:13:02

Can do a bit.

Bye Adi
5  Java Game APIs & Engines / Xith3D Forums / Re: What i have learned from Xith3D..... on: 2004-07-23 19:13:50
Hello Kev

Your Question :
<<"Why not seperate your visualisation from your simulation?">> i have tried, and it works.
Good, i have not an 1:1 representation between
simulation- and visualisation-datas, but it works.

However, i think it was not the worst, if someone
could compile xith3d for floats or doubles.
(It makes migration to xith faster, i think).

Thanks for your advice and also to all


6  Java Game APIs & Engines / Xith3D Forums / Re: java 1.5 on: 2004-07-23 00:18:09

Whats that?
I use build 1.5.0-beta-b32c and i have no
problems with xith3d in windowed mode
and full screen.
(OS is win XP)

Bye Adi
7  Java Game APIs & Engines / Xith3D Forums / Re: What i have learned from Xith3D..... on: 2004-07-22 22:43:10
Hello Kev

I think my card is ok.(I have a NVIDIA GeForce FX 5700 Ultra with 128 MB).

Alas, i already have minimized all my distances with
a scaled factor of 0.000016f .
(Because, alone the distance from sun to pluto is
in reality 5869660000.0 km (kilometers).)
This results in a distance, in my system, to
Now, when my (constant) speed is e.g. 1500.0f km/second (very fast), the way that i make in a second underlies also this scaled factor, so i got ~0.024 km in my system.
Further on, i must divide this value with my framerate
e.g 64. I got now 0.000375f km per frame.

Now, i have the problem to add 93914.0f + 0.000375f.
Adding this as double is simple, i always get the correct sum.
But this (double) sum i can't put as 93914.000375f in a float.
Also, i must work with a realistic acceleration, so it
takes a long time until i have reached such a speed,
that an addition takes effect.

Or have i overseen something??
What do you mean about that??

Bye Adi  

8  Java Game APIs & Engines / Xith3D Forums / What i have learned from Xith3D..... on: 2004-07-22 16:45:23
I have ported a bigger program from java3d to xith3d.
Almost what i can do in java3d, i can do with xith3d.
Absence behaviors in xith3d was not a trouble.
Working with overlays in java3d is a nightmare
(synchronisation problems), not in xith3d (mostly).
A bigger disadvantage in xith3d is the missing
'Text2D-' and 'Text3D-' classes in the core API.
But the main disadvantage from xith3d is, it is
complete useless for simulations. Why that???
Xith3d calculates all with floating points.
My program is a solar system simulator with real
datas that must calculate with big and small datas.
The precesion from floating points is to low for such
a program, i must say.
(Look at a sum from a floating point value greater than 2048.0f
and a floating point value lower than 0.0001f and you know what i mean.
In doubles, the sum is correct!).
My conclusion is, xith3d is a good API for games, but
a bootleneck for simulations.
That is, what a have learned.

Bye Adi      

9  Java Game APIs & Engines / Xith3D Forums / Re: Geometry and Light on: 2004-07-19 18:33:29
Hello Adenthar

I use my own primitives. Sphere with trianglegeometry
or sphere with quadarraygeometry.
I have no idea, how i can integrate an image here,
so i can show you an example.
Also you must do a correct setting for Textureattributes,
Light and Material (for your Appearance).

int features = ...............;

final int FLAGS               = GeometryArray.COORDINATES | (features&GeometryArray.NORMALS)
| (features&GeometryArray.TEXTURE_COORDINATE_2);
TriangleArray geom      = new TriangleArray( maxPoints, FLAGS );
geom.setCoordinates(0, vertex);
if ( (FLAGS&GeometryArray.NORMALS)!=0 )
geom.setNormals( 0, vertex );

Then all works fine in Xith.

Bye Adi

10  Java Game APIs & Engines / Xith3D Forums / Re: Problem with PointLight on: 2004-07-17 08:15:18

Many thanks for your help.
The 'shininess' was the problem.

Bye Adi
11  Java Game APIs & Engines / Xith3D Forums / Re: Geometry and Light on: 2004-07-17 08:12:32
Hello Adenthar

Have you set a material on your sphere?
Set 'shininess' to 0.0f, so your sphere is not
complete highlighted.

Bye Adi
12  Java Game APIs & Engines / Xith3D Forums / Re: Problem with PointLight on: 2004-07-15 18:39:11

Thanks for your help.

Normally, a SpotLight is good, but a sun in a solarsystem shines in all directions,
not in a specific one, how a SpotLight does.

If i have no light integrated, all is highlighted.
Normally, my textured planets cannot be seen, without a lightsource.

I only have one lightsource, (sitting in the center, the sun), but the lightsource is sitting on my position, i think.
When i change my lightsource to red, with a simple rotation, i can see that the color from the lightsource
changes from red to white, but i have only that
red color light.
What can it be???

Bye Adi
13  Java Game APIs & Engines / Xith3D Forums / Re: No, not so on: 2004-07-11 12:11:55

The light intensity must be grow weaker in the distance,
e.g. for (0.0f<=distance<=1.0f)
R = i*a.x + i*a.y*d + i*a.z*(d*d) is ok, but for
R = i*a.x + i*a.y/d + i*a.z/(d*d) is correct.

Also, there is a difference between 'java3d' and 'xith'
in 'setAttenuation(new Point3f(1f, 1f, 0f))'.
In 'java3d' you can set :
setAttenuation(new Point3f(1f, 0f, 0f)) or
setAttenuation(new Point3f(0f, 1f, 0f)) or
setAttenuation(new Point3f(0f, 0f, 1f))
but not 2 values concurrently, how
setAttenuation(new Point3f(1f, 1f, 0f))

A Problem what i have with a PointLight in xith
is. that i can't set it corretly.
Normally, under a pointlight, one half from a sphere must be highlighted and the other not.
(There a no reflections from a side, and the own
shininess from the sphere is very low)
My question is:
" How can i set a pointlight correct, so one half from
a sphere is highlighted and the other not?Huh"

Thanks Adi

14  Java Game APIs & Engines / Xith3D Forums / View and background (awfull crash) on: 2004-06-14 12:37:42

(Excuse me, my english are not the best.)
From class View, method getBackgroundTransform()
i always got a SingularMatrixException.
I only use orthogonal matrixes,  so that an
inverted matrix can't be singulär.
The exception occurs mostly, if a have rotated to
a angle of PI (3,14..).
On this angle (or nearby) also the 'FieldOfView' for the
background changes dramatically
The code (from Xiith3d) is:

Quat4f rot = new Quat4f();
Matrix4f translateMatrix = new Matrix4f();
Matrix4f rotMatrix = new Matrix4f();

public Transform3D getBackgroundTransform()

       // Why that?Huh?
       translateMatrix.set(new Vector3f(0, 4f, 0));

       // I know, if the determinant from rotMatrix
       // is zero, there is no inverted matrix from rotMatrix
       // If rotMatrix a product from 2 orthogonal
       // matrixes, how it is possible, that rotMatrix
       // can have a determinant that is zero???  
       return backgroundTransform;

Is there another solution for that problem???
What can i do?? Or have i overseen something??
That problem occurs only, if i use a background.

15  Java Game APIs & Engines / Xith3D Forums / Re: Visibility computing problem on: 2004-05-29 21:01:55

I also have had this problem.
Check your front clip distance by :


16  Java Game APIs & Engines / Xith3D Forums / D.Yazel@ Problem '' on: 2004-05-22 07:19:02
To use the class '', i must
create a '' -Object.
For that, i also must convert my Texture in a BufferedImage.
Now, many pictures and textures are from type
With that stored type under
'', the
ScribeInputStream fails, because BufferedImages
can not been created back with that type.

Another problem is the method close() (throws an exception) from class ''
after a read. I think there was a closed  stream,
before this method can do this.

Also a problem that occurs is , if i convert an BufferedImage to a texture, the complett texture
was flipped from Bottom to Top.

Before i write the datas to the ScribeOutputStream,
i must call  
I think, with converting the datas from a BufferedImage
to a Texture the used ImageComponent2D flips
the image from Bottom to Top.

// Read in from 'ScribeInputStream in'
int w   = in.readInt();
int h   = in.readInt();  
//Reading in datas, are correct.I have proofed this.  
int[] pixels  = in.readIntArray();
BufferedImage bImage = new BufferedImage( w, h, BufferedImage.TYPE_INT_ARGB );
bImage.setRGB(0, 0, w, h, pixels, 0, w );

Texture2D tex  = (Texture2D) bImage, "RGB", false, Texture.NICEST, Texture.NICEST, Texture.WRAP );

//The next  can flip the Image from Top to Bottom
tex.setImage(0, new ImageComponent2D(ImageComponent.FORMAT_RGBA, w, h, bImage));

Beside that, it is good component !!

17  Java Game APIs & Engines / Xith3D Forums / Re: Need help with texture! on: 2004-05-13 01:05:50
18  Java Game APIs & Engines / Xith3D Forums / Need help with texture! on: 2004-05-11 17:34:07

I have a sphere class (not indexed) that gives me
back a Shape3D-Object.
Now with

TexCoordGeneration texGen =  
new TexCoordGeneration( TexCoordGeneration.SPHERE_MAP, TexCoordGeneration.TEXTURE_COORDINATE_2 );    

i apply it to the used Appearance and all works
fine. I see my sphere with the right texture.

The problem is, i rotate the sphere but the texture
stands still and does not follow the rotation from
my generated Shape3D.

What can it be?
I'm very happy for a hint to this problem.
Pages: [1]
CopyableCougar4 (98 views)
2017-03-24 15:39:42

theagentd (81 views)
2017-03-24 15:32:08

Rule (142 views)
2017-03-19 12:43:22

Rule (129 views)
2017-03-19 12:42:17

Rule (134 views)
2017-03-19 12:36:21

theagentd (146 views)
2017-03-16 05:07:07

theagentd (144 views)
2017-03-15 22:37:06

theagentd (125 views)
2017-03-15 22:32:18

theagentd (119 views)
2017-03-15 22:31:11

ral0r2 (153 views)
2017-03-03 11:52:41
List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05

SF/X Libraries
by SkyAphid
2017-03-02 06:38:56

SF/X Libraries
by SkyAphid
2017-03-02 06:38:32

SF/X Libraries
by SkyAphid
2017-03-02 06:38:05

SF/X Libraries
by SkyAphid
2017-03-02 06:37:51 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‑
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!