Well, I _know_ I have 3d hardware acceleration working.  Next, yes, I do
see a terrible frame rate... but frame rate depends on several things.
First, of course, is having 3d acceleration, but second is what you as a
programmer do _between_ frames.  If you do tons of operations between
frames, it's going to slow things down.

For example, I noticed that even if I was just rotating to look around
(which doesn't change my location), you were calling
"DoomWalker.transformChanged" in "doRotateY".  It looks to me like this
function will keep the viewpoint above the ground as you move about.
Since I am not moving about, just rotating my viewpoint, I commented out
the "transformChanged()" call in "DoomWalker.doRotateY()" and WALLA,
rotation is now up-to-speed.

Bottom line: the problem is not 3d acceleration, it's your algorithm.
You don't need to check for "terrain skimming" if you are just rotating.
Second, your terrain skimming algo needs to be optimized.  Looks to me
like it's just a linear search.  You probably need to do some regioning
of some sort.

Didn't look into your clipping problem...

How many points do I get?  Hope this helps.  ;)

-Lee
J. Lee Dixon
Software Engineer
SAIC - Celebration, FL
[EMAIL PROTECTED]


-----Original Message-----
From: Bobby Martin [mailto:[EMAIL PROTECTED]]
Sent: Thursday, August 17, 2000 11:55 AM
To: [EMAIL PROTECTED]
Subject: [JAVA3D] Terrible frame rates


I put up some questions here a couple of weeks ago about terrible frame
rates I'm getting.  Many people seem to have hardware acceleration up
and
going with no problems.  Since this demo has failed to run at acceptable
speeds on so many different PCs, I'd like to get someone who's sure that
they have hardware acceleration to run the demo and tell me if they get
the
terrible frame rates (~2 frames a second, at best!) that I'm getting.

Also, it does a few of the things that people have been requesting; i.e.
the
viewpoint maintains a set height over rough terrain as you move, and I
calculate correct texture coordinates for tiling an image over the
terrain
surface.

Also, it appears that my viewing distance is about 50 meters, even
though I
have added a ClipLeaf centered at the origin, with a bounds of 1000
meters,
and a back clip of 1000 meters.  Bonus brownie points to anyone who can
tell
me why my clipping is wrong :)

I have included all source, and you are welcome to use it however you
like.
If you fix bugs, please let me know.

To run the demo, unjar it somewhere innocuous.  From that somewhere, run
"java com.navtools.cosmdemo.single.BrowseTerrain".  (You have to unjar
it to
put the images somewhere it can find them.)

You can use the number pad controls as in Doom (make sure the numlock is
on).  You can also use page down/page up to rotate the view by 90
degrees
down/up around the x axis.  You can hop up/down 10 meters by pressing
the
u/d key.  If you try to move while in the air, you will be popped back
down
to the terrain surface.

One more thing: it takes a little while (less than a minute, though) to
come
up since it randomly generates terrain every time.  It's supposed to
load
the previous terrain when you run it after the first time, but that bugs
out
(I think due to an error in JDK1.3 serialization).  You _must delete
HeightField.dat_ before each run of the demo after the first.

Oh yeah, and my apologies for the crappy sky background.  I have a
better
one, but it's 16 times as big and I figured I'd save some bytes.

Anyway, as I said above: if anyone can confirm that this runs
quickly/slowly
on a hardware accelerated machine (bonus points for telling me why), or
can
tell me what I'm doing wrong with my clipping, I would be very grateful.

Thanks in advance,
Bobby

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to