[Opensim-dev] A modest proposal

Stefan Andersson stefan at tribalmedia.se
Sat Sep 22 08:24:47 UTC 2007


I think these questions are pivotal on how we move forward:
 
  * Is the 'child agent' position the camera position?
  * Is the 'camera agent' position always the same globally, but recalculated for each agent locally? (Or does different camera agents have different global positions?)
  * Is there an 'avatar agent' AND an 'camera agent' in the region the avatar is in?
  * How is the camera position communicated?
  * Is the avatar position communicated form the client, or is it server generated?
  * How much of the routing work is done by the viewer? (For example, is chat close to borders sent to all regions within range?)
  * How is a udp 'connection' teared down orderly?
 
My guess right now (what makes the most sense to me) is that it works something like this:
 
 * The viewer communicates a change event (move forward, left, up etc)
 * The server recalculates avatar position and sends it to the client
 * The viewer moves avatar object and recalculates camera angle and position
 * The viewer communicates this camera angle and position to relevant regions
 * These regions update their camera angle and position, and communicates relevant scene changes based on that
 
If this is correct, the 'agents' are homogenous and decoupled from the avatar on the server side, the 'root agent' being calculated from avatar position.
 
/Stefan
 


Date: Fri, 21 Sep 2007 14:17:04 +0100From: michaelwri22 at yahoo.co.ukSubject: Re: [Opensim-dev] A modest proposalTo: stefan at tribalmedia.seCC: opensim-dev at lists.berlios.deHere is my first quick initial thoughs (bit pressed for time right now).The idea of childagents not getting a Scenepresence is okay I guess if we didn't want to do any sort of management of what prims/avatars a client is informed/updated about, in a region. But I think we do, certainly for child agents. It might be okay to just do a blanket broadcast in a users main region (ie everything happening in that region gets sent to every Avatar) but doing that with childagents is going to be a big issue I feel. The way LL do it is that childagents have a position and the region processes update each other about the position of childagents, so a child agent will have the same global position as the main avatar (so in its local region a childagent will actually (I believe) have a position outside the regions 256X256 area. Then it is possible to only send updates related to that position (ie when it gets near the border it will get more info sent to the child agent). We do don't updating of postion between regions for childagents, but I think it is something we most likely will have to do.Trying to do blanket broadcasting for all the child agents would lead to all events in 9 regions (if the main region has all 8 neighbours) getting sent, this I think will be a major bandwidth issue ,if nothing else.A lot of people have noticed in the current code that you don't see prims in a neighbouring region until you have visited it at least once. This isn't really so much a bug as that I left it like that so that we don't get the problem of 9 regions always sending all their updates to a user.I also think that by not having the childagents as part of scene in some way, that it makes things more complicated. A childagent is really like a ghost entity, it sees what is going on in a scene/region, just can't be seen itself. So I think if we stop using the idea of ScenePresence (which was named that way to show that it was a presence in a scene, but not always a Avatar, so may or may not have a body), then we need to add some other concept to Scene, like Observer?Stefan Andersson <stefan at tribalmedia.se> wrote:


After rummaging thru the Connectivity/Scene/Agent/InterRegion code, I have a proposal for a restructuring. Of course, it's quite core, but feel free to comment anyway. I propose that we leave the if( ChildAgent ) model and split the whole core into a Scene and a Region layer, right thru the Agent. The 'Region' layer will be responsible for low-level agent administration; instead of a 'child agent', every agent has a number of 'RegionPresence's - these have no local coord, but merely indicates that certain region-wide operations will be echoed to the RegionPresences corresponding IClientAPI. The 'Scene' layer will handle objects (prims and avatars) and for every connected Viewer, there is a 'ScenePresence' which in turn has one SceneObject, the Avatar - the ScenePresence has two local coords, the Avatar and the Camera and these are used to discern what operations are echoed to the ScenePrescenses corresponding IClientAPI. On every connect, there would be created a RegionPresence but only on MoveAvatarIntoRegion would it get a ScenePresence. That ScenePresence would simply be handed over to another Scene if a regioncrossing occurs within the instance. So, we have two quite different areas of functionality; the Region layer that will organize stuff like region crossing, and the Scene Layer that will handle stuff like physics. The RegionManager administrates all regions within the instance, and the SceneManager all the Scenes. When we're at it, introducing one global PhysicsScene will probably make physics somewhat more cooperative; The mapping back and forth would be fairly straightforward, and it would mean that the creation and destruction of PhysActors would be less cumbersome. This would play well with the notion of a SceneManager. These two restructurings will probably smooth out quite a lot of the bushiness in the code as it stands today. /Stefan  _______________________________________________Opensim-dev mailing listOpensim-dev at lists.berlios.dehttps://lists.berlios.de/mailman/listinfo/opensim-dev


Yahoo! Answers - Get better answers from someone who knows. Try it now.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20070922/5875945c/attachment-0001.html>


More information about the Opensim-dev mailing list