Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Accuracy of llGround

Kayaker Magic
low carbonated footprint
Join date: 11 Sep 2008
Posts: 109
10-18-2009 17:03
I working on an application that depends on accurately placing objects on the ground. Unfortunately, I have found that llGround sometimes reports values that are 10 cm different from the visible ground surface! (Especially in areas with large curvature). I'm using the standard viewer, so you would think it could get the same answer that the server gets. Has anyone else noticed this? Is my application doomed for lack of accurate data?
Kaluura Boa
Polygon Project
Join date: 27 Mar 2007
Posts: 194
10-18-2009 23:52
Short answer: You are doomed.

Long answer: Somewhere, deep in SL system, there is an approximation of the ground made of triangles: the terrain mesh. That's what the clients see. The clients have a long row a teeth that will chew this terrain mesh and spit out a visual approximation which is more or less smoothened depending on their graphics settings. So llGround() may give you a very precise value but this is definitely not what you will see. You are doomed to a total inaccuracy.
ed44 Gupte
Explorer (Retired)
Join date: 7 Oct 2005
Posts: 638
10-19-2009 04:16
Just a little reminder that you need llGround( <0.0, 0.0, 0.0> ) to get the ground level beneath your feet. Also, your measuring stick center is at the z coord, and height is only set every meter, then extrapolated. So many traps!
Jesse Barnett
500,000 scoville units
Join date: 21 May 2006
Posts: 4,160
10-19-2009 08:14
No you are not doomed, you just need to be creative!

What about setting the object, turning it physical so that it will settle,turning back to non physical. Alternatively you could use a flat temporary object and the physical trick to determine the correct heights.
_____________________
I (who is a she not a he) reserve the right to exercise selective comprehension of the OP's question at anytime.
From: someone
I am still around, just no longer here. See you across the aisle. Hope LL burns in hell for archiving this forum
Hooten Haller
Wonder and Joy
Join date: 5 Feb 2007
Posts: 45
10-20-2009 04:12
If the ground is steep enough a physical object will slide. The OP is doomed.

The Landmap device cannot even cover ground perfectly.
Kayaker Magic
low carbonated footprint
Join date: 11 Sep 2008
Posts: 109
11-01-2009 01:44
Bob grant me Slack, I still have hope... I'm not giving into doom yet...
I built a triangle mesh out of 200 triangles that fit themselves to the land under them, according to llGround. (An interesting project, each triangle is actually a very thin box tapered down at one end to make it into a triangle, sized and rotated to fit). Then I look at this mesh in wireframe mode and visually compare it to the viewer ground. I see some interesting effects. The llGround triangle mesh has some ugly pointy facets where the rectangular land grid is folded into triangles. The viewer ground does not have these ugly points. Somebody filtered the ground ON PURPOSE to get rid of this effect! I could reverse engineer the filtering algorithm and apply it to the llGround data! It looks like it is not a simple 3x3 filter... Perhaps there is a SIGGRAPH article somewhere on this subject... Or there could be comments in the open source viewer code that explain the filtering algorithm... Or there could be someone out there who already knows how the ground is filtered?