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 / Java 3D / Re: ZoomIn function on: 2006-10-27 08:11:53
Adjustıng fıeld of vıew is doing, what i exactly want. Moving viewing platform is not a solution to my problem because, if i move the platform than i am looking into mountains as if i am a ghost. If there is a wall, i cannot look behind the wall with a binocular. Thanks for help. The link provided in the previous messages helped so much.
2  Java Game APIs & Engines / Java 3D / Re: ZoomIn function on: 2006-10-20 11:28:24
But moving the parent transform will put the camera forward which i dont want. I dont want to get into mountains while zooming in.It should be as if i am just looking from a binoculars. Any idea ? It should be very easy in opengl for orhographic projection, just setting the deminsions  of the projection to a smaller value. But i am stuck with the Java3d and perspective view, i dont know how to do it here.
3  Java Game APIs & Engines / Java 3D / ZoomIn function on: 2006-10-19 14:43:22
I am trying find out how i can implement a zoom in operation. I dont want to put the camera position to a far point to have the zooming effect. In opengl, I think i can do this by adjusting the  projection parameters. How can i change the projection parameters of Java3D and/or handle zoomin effect.
Thanks for the answers.
4  Java Game APIs & Engines / Java 3D / Re: Constant frame rate problem on: 2006-06-14 13:55:34
Are you saying that an exception in EDT causes the Canvas to freeze ? That shouldn't really happen with Java 3D 1.4.0 and later. If you're using a pre-1.4.0 version, I've a workaround here:

yes what i am saying is that. I am using Java3d version '1.4.0-build5-experimental  24 Jun 2005'
Andi got this exception:
Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException
        at Source)
        at java.util.Arrays.mergeSort(Unknown Source)

After this exception, Java3d rendering freezes.

5  Java Game APIs & Engines / Java 3D / Re: Constant frame rate problem on: 2006-06-12 13:35:56
Then dont use Java3D.  Sorry, but this is not at all what J3D is desigend to do.  J3D is an execution framework, your app code should be executing as behaviors (typically as WakeOnFrame(0) behaviors.)
I hope you are not speaking for Java3D developers, becouse i cannot understand why Java3D restricts itself just to be only module in an application. Anyway i used lots of 3d engine and i did not see such a case in others. And i believe that what you say is not right.
6  Java Game APIs & Engines / Java 3D / Re: Constant frame rate problem on: 2006-06-09 11:48:39
I am always updating scenegraph in a behaviour class, so i guess this is not a problem, but i was thinking that Java3D was handling all things in a thread safe way.
From what i undersand from the answers, if canvas3d crashes becouse of an Awt Event Queue Thread exception, this means some code updates scene graph other than behaviour classes. Is this what you are saying? In that case, i will recheck all the code for this case. Although i am almost sure that all the updates in the scene graph are from the behaviour classes.

Only place that i didnot use behavour is when a new object should be added to the scene graph. In that case, i am creating the 3d object in  another thread and adding it directly to scene graph. Is this a wrong implementation. Do i need to store the commands to be handled in a behaviour class later?
7  Java Game APIs & Engines / Java 3D / Re: Constant frame rate problem on: 2006-06-09 09:35:24
Thanks for fixing my mistake about frame rate.  Anyway, iin the thread priority topic i think, i could not make myself clear about how i used Java3D. In my application Java3D is not  a main part, it is only one of 4 main parts, so i dont want it to get all the process power selfishly, and enable other parts to do their jobs. So implementing things in behaviour classes is not an option.(Ofcourse i am doing Java3D related tasks in behaviour classes).

I used canvas3d.getView().setMinimumFrameCycleTime(cycleTime:). and VirtualUniverse.setJ3DThreadPriority(4) to make its thread not important and to let it render as performance lets it.
In that case, not only Java3d thread priority is set, but also Awt Thread is made slow too much. I  gues Java3d is somehow related to Awt Event Thread.
And after i looked at the source code of Java3D, i realized that it also changes the priority of the current thread that is calling it. The current thread is Awt Event Queue Thread.

So to fix this, after setting the priority of the Java3D thread, i called this line.

Is this approach the right approach?

Second, sometimes application gets an exception (from Awt Event Queue Thread), and Java3D crashes. Canvas3D does not render anything after this point. Is this a bug of Java3D. Becouse exception and Java3D are not related to each other.

Although I am not very sure if it is beacouse of Java3D but , i started to believe that Java3D threads are not working well with the other threads in the application.
8  Java Game APIs & Engines / Java 3D / Re: Constant frame rate problem on: 2006-06-08 10:43:52
works fine and frame rate is almost constant. However, now other threads in my application cannot have enough time to process their tasks. Even i set the priority of my other thread to max priority, it still cannot have enough time. Is there a way to restrict the priority of Java3D thread.
9  Java Game APIs & Engines / Java 3D / Horizontal span in 2 monitors on: 2006-06-07 11:19:42
In horizontal span mode of 2 monitors (in which resolution is 2048X768), java 3d panel, shows a black hole, as if ,after some distance, it cannot render anything. Becouse of this, there was a black hole in the sky.
Does anyone knows why this problem exist.
This problem is not encountered in dual view mode or in one monitor.
10  Java Game APIs & Engines / Java 3D / Constant frame rate problem on: 2006-06-07 10:55:39
I am restricting the frame rate of  Java3d thread, by calling

in each frame render inside a Behaviour instance.

1)Is this the right way for not allowing Java3d to use all the processing power.

2) When i call Thread.sleep which thread sleeps. Becouse if i increase the sleep time, some operations (which are not related to Java3d) becomes slow, as if their threads are sleeping too.

3) Is there method or way in Java3D , like setFrameRate(30);
4) Is there a mthod or way in Java3D, like


11  Java Game APIs & Engines / Java 3D / Re: Fogging problem with sea on: 2006-06-01 06:38:25
Thanks for the answers, the problem is solved by generating 2 sea quads. one is a close sea quad, which is divided into sub quads so that fog colors are scattered much more realistic, and the orher is far sea quad geometry which is needed only for when there is less fog in the scene.
12  Java Game APIs & Engines / Java 3D / Fogging problem with sea on: 2006-05-31 05:43:08
I am developing a 3d environment, which have terrain, sky dome, sea and other ships. I need to simulate the visibiliy of the camera (in terms of visibility parameter in meters). To do that i am using Linear fog.
Here is the fogging parameters
setVisibility(double distance)
       linearFog.setColor(new Color3f(05f,05f,05f);

The problem with this is, although it works with terrain, ships etc., it does  not work with sea as i expected. All the sea gets fogged, without any interpolation.
I implemented sea as a bid quad covering all the sea area with a sea texture and i gave motion effect by just changing texture position of the sea continuesly.
Can the problem be related to how i implemented the sea (one big quad), do i need to partition the sea into smal quads (which i dont prefer ), or is there any other
paramter that i should think about.
13  Game Development / Shared Code / Re: Fogging problem with sea on: 2006-05-30 11:55:00
Sorry for the empty message, my computer crashed when i was writing message, and this empty message came.I will post the correct version of the question in Java3d forum.
14  Game Development / Shared Code / Fogging problem with sea on: 2006-05-30 08:49:08
Hi ,
15  Java Game APIs & Engines / Java 3D / Java3D Sound on: 2005-10-20 14:33:53
I have 2 questions regarding to Java3D Sound API.

1)  I am trying to implement a ship horn sound. All I want to do is to play the sound while a button is pressed and stop when button is released. But the problem is I want the sound to loop in the specified intervals.
 For example my sound is 1000 msec and I want the loop interval to be 300 and 700 msec portions of the sound sample. As far as I see, there is no capability in the Sound class or  its parents for this capability, however in the source code of JSSample class there are variables for attack and release to define the loop parameters (They are not modifiable) How can I set the loop parameters.

2)  Can Java3D Sound API and JavaSound can work together in the same application.

16  Java Game APIs & Engines / Java 3D / Re: Lighting problem on: 2005-10-12 07:55:25
Directional light is changing with the day/night ratio  However I can find a way to solve the problem with changing the shiness value of Material properties of the terrain.
17  Java Game APIs & Engines / Java 3D / Re: Scaling x axis causes normal problems on: 2005-10-12 07:53:31
I was able to understand the problem. Problem was when scaling an object (terrain, 3d model etc) with Vector3f(-1,1,1), vertices become clockwise to counter clockwise so that their normals become weird. To fix that I added Polygon attributes to all of them and enable CULL_FRONT from CULL_BACK. That fixed the problem. Thank you for responding.
18  Java Game APIs & Engines / Java 3D / Lighting problem on: 2005-10-11 06:22:41
I have a problem with lightining of the scene. The problem appears when I rotate the camera and it appears only in exactly same interval. It seems that about the same degree with directional light of the scene. In this interval, all the objects in the scene changes the colors they have and when I cont,nue to rotate they take the normal colors.
19  Java Game APIs & Engines / Java 3D / Scaling x axis causes normal problems on: 2005-10-11 06:18:57
I have a problem in converting the axis of Java3d so that all the x axis should be -x. For this purpose, I am adding all the nodes under a TransformGroup node and scale the transform group with (-1,1,1). I was hoping that this would cause all the x parts of the positions to be multiplied by -1 and so that axis problem would be fixed. However problem is that all data seems to be reversed. For exampleI I can only see the terrain from bottom. The first impression was I have to multiple y axis with -1 too with the scale vector (-1,-1,1), but it does not affect how I see the terrain. It seems that normals are corrupted by the scaling matrix too. Is there a way to change the axis of java3d, or what is the problem with my solution.
Thanks for the helps.
Pages: [1]
Rule (80 views)
2017-03-19 12:43:22

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

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

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

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

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

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

ral0r2 (136 views)
2017-03-03 11:52:41

ral0r2 (134 views)
2017-03-03 11:42:24

Archive (316 views)
2017-02-27 19:41:49
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!