Skip to main content

Real time Java 3D

13 replies [Last post]
jfelrod1960
Offline
Joined: 2003-11-01

Is there any research to see if Java 3D perform in a real time application? Or a subset of it?

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
herkules
Offline
Joined: 2003-06-12

> Java3D can't do the
> first one, but has no problems at all with 3D-games.

Ahem, NO problems is an euphemism.
I had/have HUGE problems esp. concerning the realtime aspect in www.flyingguns.com, just bc. frametimes are unpredictable. It's fast enough, but when frametime coherence is weak, smooth animations become a problem!

Alessandro Borges

Herkules,

Just curious...
What timer do you use in FG ? System.currentTimeMillis(), System.nanoTime(), J3DTimer ...
Alessandro

java3d-interest@javadesktop.org wrote:
> Java3D can't do the
> first one, but has no problems at all with 3D-games.

Ahem, NO problems is an euphemism.
I had/have HUGE problems esp. concerning the realtime aspect in www.flyingguns.com, just bc. frametimes are unpredictable. It's fast enough, but when frametime coherence is weak, smooth animations become a problem!
---
[Message sent by forum member 'Herkules' (Joerg Plewe)]

http://www.javadesktop.org/forums/thread.jspa?messageID=42680#42680;

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

__________________________________________________
Converse com seus amigos em tempo real com o Yahoo! Messenger
http://br.download.yahoo.com/messenger/
[att1.html]

herkules
Offline
Joined: 2003-06-12

No single answer ... varied over time, compile flags and runtime config.

Look up

drts\projects\util\java\de\hardcode\time

and

drts\projects\flyingguns\core\client\java\com\flyingguns\threed\TickingBehavior.java

The whole game is driven by a Java3D WakeupOnElapsedFrames(0,true). When framerate is limited due to the settings in the config dialog, combined with a setMinimumFrameTime(). Before 1.3.1, I used WakeupOnElapsedTime when framerate is limited, WakeupOnElapsedFrames when it is not (fps slider==100).

Time is in the first place measured with the J3DTimer (wrapped into a 'Clock' implementation). Bc. animation was so choppy, this is smoothed with the help of a SmoothedTicker.

Printing out dT in the Behavior reveals frame times varying in a wide range without coherence. Means the dT of the last frame does not give you any estimation about the dT in the next frame. This makes it impossible to have smooth motion.

Gilson Laurent

Hello

> I'm reading a lot of documentation on AI for gaming and I would like to
> write a simple real time animation that uses AI.

I don't see any problems with that. You can use AI in java. There is no
java-side limit holding you back....

There are 2 definitions of "real time". The definition used in
mission-critical, embeded systems (think cars, power plants, aircarft
controls,..) and the the definition used in 3D-games. Java3D can't do the
first one, but has no problems at all with 3D-games.

cu
[att1.dat]

paulby
Offline
Joined: 2003-06-13

There is a realtime spec for Java https://rtsj.dev.java.net/ and SunLabs have a realtime VM which I have seen controlling soft realtime hardware, Actually it was demoed at JavaOne this year.

There has been no work done todate on using Java 3D with this VM.

jfelrod1960
Offline
Joined: 2003-11-01

I guess Matthew I need to read more about the JVM. Basically, I like Java much better than C++ for a lot of reasons you probably already know. I have written several Java programs, but I am still a newbie.

I'm reading a lot of documentation on AI for gaming and I would like to write a simple real time animation that uses AI. But I may have to settle for C++.

What about AOT compilers for Java?

Matthew Hilliard

Hmm. I don't know if anyone is actively pursuing an AOT compiler for
Java. I think most embedded systems opted to use flash compilers instead
(my Motorola does, at least) I haven't payed it much attention in about a
year, and there may well be someone still looking into it. There is
certainly be some benefit to the market at large, but not as much to
companies selling embedded systems who have already developed flash
compilers in other languages.

There was also a GNU project (name escapes me) working on a native Java
compiler, which potentially could be ported to whatever platform you're
targeting.
The major issue with them was they had difficulty with large chunks of the API.

I wouldn't expect j3d in either of these places anytime soon though. :(

Matt

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

herkules
Offline
Joined: 2003-06-12

if you think of 'realtime' in the sense of computer games, I suggest looking up www.flyingguns.com.

If you mean realtime in the sense of realtime .... I'm afraid Java3D is on the opposite side of the universe

herkules
Offline
Joined: 2003-06-12

IIRC, besides OpenGL ES, there is a JSR dealing with a high-level scenegraph API similar to Jave3D

herkules
Offline
Joined: 2003-06-12
jfelrod1960
Offline
Joined: 2003-11-01

Thanks! For the JSR-184. I've seen it before and will look into this again.

Matthew Hilliard

I'd guess probably not as the JVM is generally not fault-tolerant, and
resides on an interrupt-driven Operating System with JNI bindings used by
j3d more than 99.999% of the time.

Or perhaps you mean something other than realtime?

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net

Matthew Hilliard

Having consumed some coffee, I'm second guessing myself and assuming you
mean an embedded system--again, I think currently the j3d releases are
targeted at interrupt-driven consumer Oses running OpenGL (or directx).

I believe there is a jsr (239) for OpenGL ES, but the details of it are
lost on me.

---------------------------------------------------------------------
To unsubscribe, e-mail: interest-unsubscribe@java3d.dev.java.net
For additional commands, e-mail: interest-help@java3d.dev.java.net