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