[sldev] Why does the simulator do object culling for clients?
Dale Glass
dale at daleglass.net
Wed Jul 18 04:37:20 PDT 2007
On Wed, Jul 18, 2007 at 03:54:42AM -0700, John Hurliman wrote:
> As you move around in a simulator, the sim is constantly sending
> ObjectUpdate* packets for objects that become within range or have
> moved, and it sends ObjectKill packets for things that go outside of
> your vision. Then when you move back to that area it sends the
> ObjectUpdate* packets for those objects again. Is there a reason this
> culling is done across the network by sending ObjectKill packets for
> things that are not actually leaving the simulator?
My guess:
Suppose the sim didn't do that. In that case, the viewer would never
know when the sim decided the object is too far away. So you'd need to
have the viewer perform its own culling, or you'd have extra objects
hanging around.
If the culling on the viewer and sim didn't match, you'd end up with
updates being sent for objects the viewer won't show, or the viewer
showing objects for which the sim isn't sending updates.
And since the sim determines which objects are near enough to notify you
about their existence, it's only logical that it'd do the kill
notification as well. Less error prone, and avoids duplicating code.
Sim needs to know which objects are far enough anyway, as it has to
decide when to stop sending updates.
Note: This is only a rather uninformed guess, as I can't look at the
source ATM.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.secondlife.com/pipermail/sldev/attachments/20070718/1b0c57cc/attachment.pgp
More information about the SLDev
mailing list