From: broehl@sunee.waterloo.edu (Bernie Roehl)
Subject: Re: TECH: My standard is better than your standard.
Date: Tue, 7 Jul 1992 14:43:03 GMT
Message-ID: <Br0wvs.1Gw@watserv1.waterloo.edu>
Organization: University of Waterloo


In article <1992Jul7.011446.12963@u.washington.edu> snowdond@cs.man.ac.uk (Dave Snowdon) writes:
>The second god (Environment Database - EDB - yes I know krap name :-) ) is
>really an optimisation to allow for faster collision detection. For each
>object it stores a bounding volume and the object's id.

I'm not so sure that's an optimization.

The centralization of coarse collision detection would be a massive load
on somebody's processor, since it would have to check every possible pair
of objects for intersection.

I propose that we skip the coarse collision detection step, and just have
every object do its own checking.

Consider the typical case: a region of virtual space containing a number
of objects.  Most of these objects don't move at all during a given system
"tick time", but of course some do.

Now, in order to minimize traffic, it makes sense for every VR "station" to
cache the appearance of all the objects in the immediate surroundings; that
way you can turn your head around and even move a little without incurring
any network activity (other than sending out your location/orientation update
information).  It must also cache their location.

Whenever an object moves, it must inform you of that fact so that you
can update its position in your local database.  When an object changes
shape (or appearance in general), it also sends out update information
for you to cache.

When you receive information that an object has moved or changed shape or
size, you do a quick check to see if it's entered your bounding volume; if
it has, you do a more thorough check to see if it's actually made contact
with you.  The quick check is cheap, and you only have to it once for each
time an object moves. The second, harder test is one you'd have to do anyway,
even if you had a central coarse-collision checker.

True, things get more expensive when it's *you* that's moving; however, it's
still more effiecient (and reliable!) than relying on some central process.
You'd have to check yourself against all the objects in your
surroundings; that's still only order N.  This seems better to me than
foisting off an N^2 problem on some poor, overworked collision server.

(An aside: when you determine you've collided with something, you should
send it a message giving your idea of the coordinates (including time!) of
that collision; it will do the same to you, and the two of you come to an
agreement as to exactly what happened and when).

>Also objects can ask to EDB to send them a list of the ids of any objects in
>a given volume of space.

This is a very good idea, but I suspect it's best done by your first god
(which has to keep information about what's in the environment anyway).

I guess I'm proposing a "monotheistic" system.  Heaven knows we don't need
a pantheon!  (Let's see... a god of inanimate objects, a god of light, a
god of time...)

>A note about objects - Objects cannot manipulate the internals of other
>objects. The only way an object can view/manipulate the attributes of
>another is to send it a message. This allows objects to store attributes
>internally in an arbitrary format and to decide whether they will act on a
>message sent by another.

Yes!!!

-- 
	Bernie Roehl, University of Waterloo Electrical Engineering Dept
	Mail: broehl@sunee.waterloo.edu OR broehl@sunee.UWaterloo.ca
	BangPath: uunet!watmath!sunee!broehl
	Voice:  (519) 885-1211 x 2607 [work]
