Well... its true that I actually do have the heightmap available to me, and
for the first few months I used that with some code to calculate where the
person's feet would be in mid-triangle.

Then I started auto-optimizing my terrain from a regular grid to an
irregular grid using edge collapsing.  This introduces changes to the
topology of the terrain, but necessary to reduce the amount of geometry I
was shoving into the card.  This resulted in people's feet alternatly
sinking into the ground or hovering above the ground.  I am not using
geometry by reference for terrain, so I am basically loading the geometry
arrays for each terrain quad patch directly from our own file formats and
handing them off to Java3d to manage.  So I am not sure what the right
solution would be.

Soon we will be supporting layered terrain, like caves, overhangs, etc, so
moving away from actual picking will start causing some real problems.

My real concern is more with collision detection.... I can't very well move
every single structure, tree, rock, avatar, wall, stair, etc into
by-reference geometry so I can search it myself.  The frame rates would
plummet.  And bounds checking is no good since we collapse localized
geometry sharing the same brush into one geometry array for speed of
rendering., so conceivably you could be in a room surrounded by a geometry
contained in a single geometry array.

I am a little disheartened by this information.  Version 1.4 is like 18
months at least right?  Thats a really long time to wait.

And its a shame that by-ref geometry automatically causes it to be sent
every frame. Since we have to use the GeometryUpdater to make changes to it
I would think that Java3d could allow you to flag geometry as
by-ref-but-will-be-rarely-changed, and then treat it as retained geometry
unless the geometry is updated with the GeometryUpdater.  This would
certainly allow us to manage memory and at the same time have read access to
the geometry directly.

Dave Yazel
www.cosm-game.com



----- Original Message -----
From: Justin Couch <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 16, 2001 8:41 PM
Subject: Re: [JAVA3D] ANN: Collision Detection/Terrain tutorial


John Wright wrote:
>
> Some readers here might get the wrong idea from your blunt comments
> Justin.  I believe both Dave Yazel (Cosm) and myself (Pernica) run
> collision detection and terrain following (via the Picking utilities) in
> fairly large worlds at frame rates running up to 100 fps.  So Sun's
> routines might be "poor" but they do function.  The memory burn is
> rather ugly though.

Of course they function, they just are not designed for realtime. Take a
look inside the code - every frame you are generating four arrays of
just the projected u,v coordinates for each polygon. The only reason you
are getting those speeds is due to shear brute force. I do not classify
as realtime-capable something that generates 2 megs of garbage a second
for no reason. In an ideal RT system there should be zero garbage
collection. Just think of what extra capability you could have with say
10% extra clock cycles - more characters or more textures or better AI.

I would certainly disuade anyone from using the picking utils for this
sort of work. There are even better ways to do it - fixed data sets
means you don't even need to go to the geometry - less cap bits set etc.
You are no-doubt already generating the datasets internally for the
terrain so why not keep them about and do your own picking based on that
(have I got some tools for you :). You'd lose almost all of that GC
thrashing and as a bonus allow customers with lower-end machines to use
your software, or provide greater levels of detail/realism/game play.

--
Justin Couch                         http://www.vlc.com.au/~justin/
Freelance Java Consultant                  http://www.yumetech.com/
Author, Java 3D FAQ Maintainer                  http://www.j3d.org/
-------------------------------------------------------------------
"Humanism is dead. Animals think, feel; so do machines now.
Neither man nor woman is the measure of all things. Every organism
processes data according to its domain, its environment; you, with
all your brains, would be useless in a mouse's universe..."
                                              - Greg Bear, Slant
-------------------------------------------------------------------

===========================================================================
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".

===========================================================================
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