Wednesday, December 29, 2010

Home Improvements: Random Prim Drift in a Large Build

Inner Wall Linkset
Location: Caulking Seams

It's ironic that I talk about this on a day when, in real life, I need to caulk a seam between our house and a not-so-well-made addition. The building settles unevenly, and mortar joints love to crack. Good-quality exterior masonry caulk stops those cold drafts.

But there's no HGTV for avatars (though Prim Perfect comes closest). Even that fine magazine focuses more on style and design and not repair and renovation.

Renovation? In a fake building? Should be as simple as deleting prims or moving them, right?

Viv Trafalgar and I were touring the Second Life House of Usher in the guise of Madeline and Roderick, in order to shoot Viv's machinima I featured here a few weeks ago. I noted a rather large gap in a wall, and Viv, ever the master builder, noted that large builds do that. Elements creep apart over time. I don't know the reason; perhaps it's an infinitesimal rounding up or down when linked prims overlap ever so slightly. There's a JIRA at the Linden Lab Web site about this.

Torley Linden, who cares and knows a lot about technical issues in the code, asked a resident to give examples or reproduce the problem so Linden Lab could investigate. Here's a technical but vexing reply from Khamon Fate:

 It's a floating point error that is seen nearly every time one edits a prim's location, rotation, cut et al by the numbers. Type 35 degrees Y rotation into a prim and watch it magically adjust itself to 34.97 degrees. Doesn't seem like much really, but when that same calculating error occurs as the sim places, and replaces prims, they seem to drift. Those same miscalculations cause textures to be suddenly offset. The list goes on to include misplaced telepoints, odd ground configurations and really just anything the server has to manage mathematically.

It's a deep, fundamental problem in the server code and really must be fixed for these types of problems to be resolved.


I have not noticed the math error in our SL or Jokaydia Grid build, but I'll try an experiment of noting the position of some prims and then checking with my next log in. And, yes, it happened at Jokaydia Grid too. I found that a linked set of prims for Usher's interior walls had crept away slightly from some unlinked parts, including doors and "headers" over them.  Fixing that was easy--I had to realign the doors' headers and match the texture to the main wall's settings. Then I linked them.

As I did this, I was reminded of another "101" lesson: don't link scripted items to the linkset. I know that when I blogged about making a fireplace; the scripted prim needs to be the root. So I left doors and chimneys unlinked and floating free, as the rest of the House drifts.

My fix is to link the entire House in a few segments: roof, interior walls, exterior walls, crypt. I can then tweak each one a few hundredths of a meter to re-align the ancient manse.  If only it worked so well, on a cold December day, on a brick-and-mortar home!

My posts on building in virtual worlds are aggregated here. Happy home improvements!

5 comments:

Tateru said...

There's an additional cause. If you move a prim a small amount (below a certain threshold, which I remember being 0.005) then the new position of the prim is not sent to the simulator. The viewer shows the prim as if it had moved and it will continue to appear to be there, until you come back some other time.

Cumulative, tiny position adjustments like that can add up in the viewer - not sent to the server - and when you log in next, everything seems weirdly out of position.

Known bug. It got spotted the day after the release of the viewer source-code, back when.

Iggy O said...

Thanks for that note, Tateru. I need to check positioning for these prims.

I never size anything below .01 meters and rarely move things manually.

Viv said to me once "trust the numbers and not the eyes" so when orienting something on any of the three axes, I tend to use the up or down arrows. I think that they only move stuff by hundredths of meters with each click.

Elaine said...

Wow! I never take building that seriously. Should I?

Tara Maya said...

I really wish I could fix my house on the computer and then just upload the repairs to my real house. Of course, it would suck if I did something wrong and accidently deleted my house.

Iggy O said...

Elaine, how seriously you take building depends on your personality.

I'm a fuss budget about RL building after working long enough with a talented craftsman-mentor. SL turned out not to be all that different, given my sensibilities.

Tara, yeah, you could delete a house IRL; just do enough poor wiring and "poof" it will go in less time than you'd imagine :)