Mesh Glitches and the Panel Dress

Some time ago one of my customers reported to me that her copy of the Kcreations Panel Dress was not appearing correctly – sometimes it would glitch out and throw triangles all over the screen. She didn’t see it herself, but others had reported it to her since its gymnastics were causing some havoc among folks nearby.

Later someone else reported the same problem. It only seemed to happen with the Panel Dress, not any of my other meshes.

Since then, with some help from the people who reported the issue, I’ve been trying to track down the exact circumstances of this bug so that I can fix the Panel Dress and make sure that any new meshes I make won’t do the same thing. I’m happy to report that I’m pretty sure I’ve figured it out, and that avoiding the problem is fairly easy.

For anyone who’s into following this kind of thing the particular issue is VWR-29396 in the SL Bug Tracker. I’ve been in touch with Dan Linden with all my findings, so hopefully it’ll help the developers finish this problem off entirely some time in the not-too-distant future.

Mesh glitching

Mesh glitching

In the course of running this one down I’ve made close to a hundred different rigged mesh files, uploaded dozens, tried different versions of Blender and Lightwave, and even written my own DAE file parser to check for errors and problems. In the end, though, none of that helped much, but I feel it’s important you know how hard I’ve worked to figure this out 😉

The problem occurs when you enable OpenGL Vertex Buffer Objects (VBOs) in the graphics hardware settings in the viewer. In Firestorm the settings need to be VBOs and either Hardware Skinning or Streamed VBOs.

The glitching occurs when you meet the following criteria:

  • You’re viewing a rigged mesh on another avatar (the glitch never affects a mesh that your own avatar is wearing)
  • There’s at least one other avatar in your view that is wearing a rigged mesh (can be your own avatar or anyone else)
  • A camera move causes the problem mesh to change between LODs. You can also move the object detail slider in the graphics settings up and down to trigger a LOD change.

The pivotal property of what makes a mesh glitch or not seems to be entirely down to the materials assigned to it. Specifically, the number of non-transparent materials.

If the mesh has only one material (i.e. it only has one “face” for applying textures to) it will glitch. If it has more than one face, but all of the faces except one have a non-zero transparency setting applied to them, it will glitch.

This means it’s fairly easy to avoid the problem – just make sure you don’t upload meshes with only a single material and be careful with applying transparency to meshes with more.

One material vs two materials. Two's better than one!

One material vs two materials. Two’s better than one!

The Panel Dress mesh that started all this only had one material, and so it fell victim to the problem. I’ve made new meshes now that have more than one material, and I’ve verified that they no longer have this problem, so an update should be available in the next few days for anyone who’s already purchased it.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s