|
Adam Ramona
Registered User
Join date: 5 Jan 2005
Posts: 56
|
01-11-2008 23:52
Is there a known formula for how far away an object can be seen based on its size? Empirically, with draw distance set to 512m, a cube of 0.5m will disappear at around 40m distant when going away from it and 20m distant when coming towards it. A cube of 1m doubles those figures, and so on. Is there a way to figure it out exactly, or is there a way to force it to be always seen, or a scriptable LOD function?
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-12-2008 00:12
That I know of, there's no way to affect it. One could probably look at the client code and at least get a good idea of the distance calculation (unless it is left completely up to the server, which IS possible). But I SUSPECT there is probably a minimum distance under which all prims render, then beyond that most likely it is a function of the maxiumum viewing angle the object would circumscribe.
My first hypothesis would be to take the largest component of the prim's scale (or object's geometric bounds), and guess a distance that is proportional to that length (for small angles, chord length is approximately the same as arc length) and proportional to the draw distance in the viewer preferences. With the right sample sizes and distances, I think you could figure out if a hypothesis is correct and then use it to nail down the distance accurately (for a given draw distance preference). I suspect it is a pretty simple formula.
Of course, I could be wrong. It might be worth a glance at the viewer source code, and a question to the Lindens about any server-side calculations that aren't obvious from that.
|
|
Hewee Zetkin
Registered User
Join date: 20 Jul 2006
Posts: 2,702
|
01-12-2008 00:14
Oh. Actually I just thought of a way you MIGHT be able to affect this. Link to the object a large transparent prim. This might fool the viewer and/or server into drawing it a long way off. 
|
|
Debbie Trilling
Our Lady of Peenemünde
Join date: 17 Oct 2006
Posts: 434
|
01-12-2008 02:09
From: Hewee Zetkin Link to the object a large transparent prim Yep, this is the solution we usually use. Make that prim phantom too. For the reactment of the meteror collision with Mars on 30th Jan 2008, it was the only way to create a massive particle explosion that can be reliably seen from a large distance away. We have also used the same solution for giraffe and chimpanzee heads, when the head itself is not linked to the body. Before doing this, due to LOD, from a distance some people were seeing a headless animal!
|
|
Qie Niangao
Coin-operated
Join date: 24 May 2006
Posts: 7,138
|
01-12-2008 19:23
LOD hides more than the prim itself: also suppressed are client effects from the undisplayed prim like sounds (as Ceera reported in a current thread) and particles (as Debbie mentioned). Not surprising when you think about what's happening, but can be pretty mystifying till you do.
|