Jump to content

Secondlife fixed openGl bug for alpha texture


You are about to reply to a thread that has been inactive for 3796 days.

Please take a moment to consider if this thread is worth bumping.

Recommended Posts

Hello folks.

I don't know if you've experienced this yet, but for sure you've got to know to deal and fight with the hated openGl alpha bug.

What I found out playing with texture settings and the new features introduced in the new V3 viewer is that finally Lindenlab fixed the openGL alpha BUG.

The classic way that SL sees alpha texture is blending mode, but if you switchto mask mode with some tweak on cut off you can defeat that bad bug. I show you below the pictures.

In photos you'll see my avatar without shoes (that's not a bug): I forgot to wear my stiletto when I was testing alpha masks:P

Texture used in this experiment

Window---Pewter-2.png

 

Here you can see what happens with the famous alpha bug with alpha channel on blending mode

alpha-mask-error_001.png

 

Here you can see how the new Alpha mask mode fixes the alpha bug on textures

alpha-mask-fixed_001.png

Link to comment
Share on other sites

Yes, though in the interests of being pedantic (sorry...), its not actually a bug so much as a rendering limitation called 'Alpha Sorting'. Basically the renderer gets confused by multiple transparent surfaces and doesn't know which one is in front. Alpha masking is a simpler way of rendering transparency because it only needs to tell a pixel if its transparent or not without having to deal with semi transparency. Its a yes/no calculation.

This is a limitation in its own right however, as it will not handle an alpha channel which has a gradiated change from opaque to transparent. This is what the cut-off value is: telling it at what value transparency kicks in.


Apologies again for being pedantic :)

Link to comment
Share on other sites

One thing to keep in mind is that switching from the default of alpha-blending to alpha-masking is considered* a use of the "Materials" feature, and that triggers the Land Impact of such objects to be calculated using Mesh physics. That can cause some prim-based builds to skyrocket in Land Impact. (Even a single prim can have a Land Impact in the hundreds or thousands.) Sculpties, too, generally double in LI with Mesh physics. And an entire object is either Mesh physics or it's not, so setting alpha-masking on just one face of a single prim will flip the LI calculation for its entire linkset.

______

* I have no idea why alpha-masking is considered a "Materials" thing. Cussedness, as far as I can tell.

Link to comment
Share on other sites

Maestro said at one the his meetings, when the question came up, why prims switch to meshy accounting with materials:

[2013/11/14 15:52]  Mæstro Linden (maestro.linden): also, 
we don't want people to make new content with terrible physics shapes,
and anything that has a material is definitely 'new'

I would say, the alpha masking modes fall under the same rule, since they are definitely 'new' as well.

Link to comment
Share on other sites


arton Rotaru wrote:

Maestro said at one the his meetings, when the question came up, why prims switch to meshy accounting with materials:
[2013/11/14 15:52]  Mæstro Linden (maestro.linden): also, 

we don't want people to make new content with terrible physics shapes,

and anything that has a material is definitely 'new'

I would say, the alpha masking modes fall under the same rule, since they are definitely 'new' as well.

I am myself really wondering how much people will be able to use Materials anyways because of the way it affects accounting.

If adding a dimple to a prim sends the accounting through the roof, isn't what Oz is describing as "efficient use" really limited use?

https://jira.secondlife.com/browse/MATBUG-217

"We are well aware that the LI calculation produces very different results. The results it produces are much more representative of the true cost an object imposes on the server (meaning how badly it affects server lag for everyone).

Using carefully chosen collision volumes allows you to make good tradeoffs between the LI effect and other factors.

The legacy prim-counting cost method was a very very poor way to account for the true costs. The only reason we didn't just replace it completely is that it would have damaged far too much content, so we left it in place for existing things.

The choice to have Materials properties and other new features change to the LI accounting was deliberate - we did it knowing that it would cause exactly the difficulties you are having, but also that it would encourage more efficient building where that can be done, so we think that on balance it's a good thing.

In case I'm not being obvious enough above: this issue is closed. We will not be changing the accounting for this."

https://jira.secondlife.com/browse/MATBUG-217

 

Link to comment
Share on other sites

Hi Quie

I agree with your point of view . I tested it also on sculpties and well the physics gets doubled as the LI.

Example 1 sculpt with alpha blending will have LI =2


10 sculpties in a linkset with alpha masking will have LI= 20

 

It's not that great thing

 

But I found out this fix  playing with a window and its" buggy" texture. As I showed it was a secndlife primitive with alpha masking with LI = 1 and the physics still the 0.5 both either in alpha blending or in alpha masking


I see this as possible application to simple structures of whole building (maybe not linkedglasses or walls,where you want to cut on prims with some illusionist texture.

 

Example with secondlife primitive object

1) alpha blending mode

The land impact = 1

physics= 0.1

alpha-blending-LI.png

2) alpha blending mode

Land impact = 1

Physics =0.1

alpha mask LI.png

Alpha blending nd alpha mask applied on sculpties

As you said it would make the LI higher  the double of the prims rezzed or the prims in your link set. I agree that it would take too many resources if we leave thigs as they are.

alpha-blending-sculpt.png

here we can see how the alpha maskmode applied on a single sculpt prim gives doubled Land impact and doubled physics

alpha-mask-sculpt.png

Here the worst situation to deal with: 10 sculpties linked with alpha mask

according with what Quie introduced before the Land impact in this case would be really high and about the physics we'd get a big value too (22)

11-objects-alpha-mask.png

 last case 10 sculpties with physics set to null and linked to a cube primitive that would be the root prim and the physic shape of the whole linkset

Here a little Cheat to fix that situation above

This is a better situation cause we have 11 primitives linked together with a land impact =22 and what is interesting the physic is much lower cause we're using the cube physic in this case the physic is 0,1

10-sculpts-linked-to-1-prim-physic.png

 

I am not sayng that I would love to abuse of this, not thinking of using this feature on big linkset of sculpt primitives even if this cheat would be nice.

My idea and that's why I propose and I hope It will help someone else is to fix some old textures on old buildings.

If I have a window  not linked or maybe linked but with proper cheat to make the physics lower, as shown above,that has th give me that bad artifact, I would cheat a bit in this way playing with alpha mask and get 1 simple secondlife primitive rezzed and till good Land impact physics and look

In my specific case in the photo: I was trying to make a one prim wall cage that should rezz around the people walking on that mat having some alpha around like trees or other stuff would have bugged my "mat cage" in this way I fixed the look and the LI and phyiscs are still nice as they were without this trick.

Link to comment
Share on other sites


Perrie Juran wrote:


arton Rotaru wrote:

Maestro said at one the his meetings, when the question came up, why prims switch to meshy accounting with materials:
[2013/11/14 15:52]  Mæstro Linden (maestro.linden): also, 

we don't want people to make new content with terrible physics shapes,

and anything that has a material is definitely 'new'

I would say, the alpha masking modes fall under the same rule, since they are definitely 'new' as well.

I am myself really wondering how much people will be able to use Materials anyways because of the way it affects accounting.

If adding a dimple to a prim sends the accounting through the roof, isn't what Oz is describing as "efficient use" really limited use?

"We are well aware that the LI calculation produces very different results. The results it produces are much more representative of the true cost an object imposes on the server (meaning how badly it affects server lag for everyone).

Using carefully chosen collision volumes allows you to make good tradeoffs between the LI effect and other factors.

The legacy prim-counting cost method was a very very poor way to account for the true costs. The only reason we didn't just replace it completely is that it would have damaged far too much content, so we left it in place for existing things.

The choice to have Materials properties and other new features change to the LI accounting was deliberate - we did it knowing that it would cause exactly the difficulties you are having, but also that it would encourage more efficient building where that can be done, so we think that on balance it's a good thing.

In case I'm not being obvious enough above: this issue is closed. We will not be changing the accounting for this."

 

Well, I don't have much to add to Oz comment, because I think he is right. Forcing prims to new accounting, will force people to set the physics shape type to None, or Convex Hull as well, to prevent the physics weight going through the roof. If you need accurate collision shapes on tortured prims, you are kind off out of luck. Or you have to link in some simple invisible prims as the collision shapes.

However, since the numbers go through the roof, it means that these prims are really hard on the physics engine. They have always been, but nobody noticed, because there were no numbers shown in the past.

To correct that somehow for future builds, LL introduced the new accounting along with mesh. And enforcing it with new features, makes sense to me. I myself did not like it much in the beginning, because we all want to rez as much as we can on our expensive land. Though, over time I realized that it doesn't make sense to rez a couple of thousand prims in my house. Because the performance would suffer too much anyway.

If these prims with skyrocket physics numbers, are really this bad, may be questionable. Though, I'm sure Falcon Linden did some excessive research before he came up with the physics weight calculation algorithm.

Link to comment
Share on other sites

"I'm sure Falcon Linden did some excessive research before he came up with the physics weight calculation algorithm."

I'm not so sure, Arton. Have you forgotten my threads on triangle-based physics weights? Especially episodes three and four.  The observations there are that the order of triangles in the collada file, and even the order of vertices within the triangles, can drastically and unpredictably affect the physics weight for identical geometries. I suppose the triangle and vertex order could drastically affect the work needed by the engine, so that the numbers do indeed reflect that, but if that is the case then either the SL server or the engine should optimise the order before using the shapes!

Link to comment
Share on other sites


arton Rotaru wrote:

Well, I don't have much to add to Oz comment, because I think he is right. Forcing prims to new accounting, will force people to set the physics shape type to None, or Convex Hull as well, to prevent the physics weight going through the roof. 

I have several problems with that Linden Logic, but the worst is that the disincentive will work entirely the opposite of how it's intended, and instead of encouraging retro-fitting of old builds to be more efficient, it will rather discourage folks from using the new features on those old builds -- and in the case of alpha-masking, it's my understanding that it dramatically reduces rendering time for those surfaces. It it works as I think it does, then, adopting a Land Impact calculation that punishes use of this new feature results in less efficient content than would otherwise populate the grid.

Incidentally, I've been willing to pay the LI penalty for some alpha-masked sculpties (Convex Hull or None physics, of course, but still the LI download doubling), specifically in the case of legacy plants. Alpha-flipping on (non-Linden) trees and vegetation has always been a massive immersion-killer for me, so as I come across them, I've been converting old mod perm sculpty plants and even old prim-plane plants. The LI inflation gets painful, but sometimes it's worth it.

Link to comment
Share on other sites

Yep, I agree about the efficiency with alpha masking. However, if LL wouldn't enforce the new accounting with new features, also bad physics prims will be kept alive forever. And special case some prims and some not would make the whole accounting even more complicated, than it already is. So I think drawing a line at some point is still the right decision, even if it has drawbacks in some cases.

Link to comment
Share on other sites

server3.JPG

 


Qie Niangao wrote:


arton Rotaru wrote:

Well, I don't have much to add to Oz comment, because I think he is right. Forcing prims to new accounting, will force people to set the physics shape type to None, or Convex Hull as well, to prevent the physics weight going through the roof. 

I have several problems with that Linden Logic, but the worst is that the disincentive will work entirely the opposite of how it's intended, and instead of encouraging retro-fitting of old builds to be more efficient, it will rather discourage folks from using the new features on those old builds -- and in the case of alpha-masking, it's my understanding that it dramatically reduces rendering time for those surfaces. It it works as I think it does, then, adopting a Land Impact calculation that punishes use of this new feature results in
less
efficient content than would otherwise populate the grid.

Incidentally, I've been willing to pay the LI penalty for some alpha-masked sculpties (Convex Hull or None physics, of course, but still the LI download doubling), specifically in the case of legacy plants. Alpha-flipping on (non-Linden) trees and vegetation has always been a massive immersion-killer for me, so as I come across them, I've been converting old mod perm sculpty plants and even old prim-plane plants. The LI inflation gets painful, but sometimes it's worth it.

I know I'm threadjacking a little.  But this all gets to be a bit of an exercise in frustration.

Again, quoting Oz,

"The results it produces are much more representative of the true cost an object imposes on the server (meaning how badly it affects server lag for everyone)."

That rezzed objects (buildings, plants, etc) on a SIM do affect server performance, I do get this.  And maybe the lag meter isn't set up to measure it for Server Lag, but I've never seen it say, "too many crappy textures" or "two many wierdly shaped prims."

In the above screen shot I can tell you exactly what tripped the lag meter.  It was each time a new person arrived at the SIM (Japan Tempura).  After about two or three seconds it would be back to normal.

Which brings us back to the most frustrating and the most dificult thing to control, what we ourselves as Avatars are wearing and the people who make and sell unoptimzed clothes and other accessories.

I'd be curious to see what a piece of Jewelry made with a dozen dimpled prims with materials does to Avater Render Weight.  If the AWR doesn't take into account these things then is all we are really doing is going around in circles? 

Or am making no sense at all?

  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...


Qie Niangao wrote:


arton Rotaru wrote:

Well, I don't have much to add to Oz comment, because I think he is right. Forcing prims to new accounting, will force people to set the physics shape type to None, or Convex Hull as well, to prevent the physics weight going through the roof. 

I have several problems with that Linden Logic, but the worst is that the disincentive will work entirely the opposite of how it's intended, and instead of encouraging retro-fitting of old builds to be more efficient, it will rather discourage folks from using the new features on those old builds -- and in the case of alpha-masking, it's my understanding that it dramatically reduces rendering time for those surfaces. It it works as I think it does, then, adopting a Land Impact calculation that punishes use of this new feature results in
less
efficient content than would otherwise populate the grid.

Incidentally, I've been willing to pay the LI penalty for some alpha-masked sculpties (Convex Hull or None physics, of course, but still the LI download doubling), specifically in the case of legacy plants. Alpha-flipping on (non-Linden) trees and vegetation has always been a massive immersion-killer for me, so as I come across them, I've been converting old mod perm sculpty plants and even old prim-plane plants. The LI inflation gets painful, but sometimes it's worth it.

Honestly, and this might be a bit cold, but I think LL should aim to phase out the old "prim limit" calculations entirely. Give people a date, put it a year or so in the future and say "that's when we convert everything to the new costs" Meanwhile, the land impact calculations should be plainly visible on objects still using the old calculations.

 

 When the date finally arrives, rezzed content that exceeds the parcel land impact limits won't be returned, but nothing new can be rezzed on that land until the LI use is brought under the limits. This will preserve "historical" builds, such as those created by people with lifetime accounts who are no longer active in SL, while forcing everyone over to the new limits if they want to change existing builds.

 Really the old system was a misstep that is the source of a lot of SL's performance woes, so bringing everything into the new system will help SL to run more smoothly for everyone.

 

 Because, as it stands, you're right. This will prevent people from making use of alpha masking, which both solves an age old problem AND results in content that is easier to render.

Link to comment
Share on other sites

 I'm not sure LL understands the issues of resource use that plague SL.

The biggest source of lag, poor framerates, and other performance issues crippling SL is textures.

Even the improved "Land Impact" cost calculations don't take texture use into consideration. And with mesh you can create many more unique surfaces to slather on 1024x1024 textures. And people do exactly that, which is why so many believe mesh is "laggy". It's not the mesh models, it's the obscene amount of texture memory those mesh models are using.

 

Oddly enough, Avatar Draw Weight does take texture use into consideration, but unlike land impact costs, draw weight isn't used for any practical restrictions. You can load up the draw weight of your avatar as much as you like. LL won't stop you. And you're right, that is a huge problem.

 

 You can have the most efficiently made sim in SL, but it doesn't matter too much when it's filled with a dozen avatars each with more polygons and texture maps than an entire level map from a modern videogame.

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3796 days.

Please take a moment to consider if this thread is worth bumping.

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
 Share

×
×
  • Create New...