Aminlove Faulkes Posted January 9, 2016 Share Posted January 9, 2016 Hello LSL masters,So I'm trying to create a mesh animated object. The most common way to make this is to use llSetLinkAlpha and to switch from 0/100 visibility etc. The problem is that llSetLinkAlpha is using 'alpha blending' even if it's set to 100% invisible. This makes viewer to still try to sort the alphas and kills the framerate. So my plan was to use PRIM_ALPHA_MODE_MASK which must switch to 'alpha testing' mode and it should ease the rendering.my code:llSetLinkPrimitiveParamsFast(LINK_THIS,[PRIM_TEXTURE, face-1, TEXTURE_TRANSPARENT, <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0,PRIM_ALPHA_MODE, face-1, PRIM_ALPHA_MODE_MASK, 255,PRIM_TEXTURE, face , "some non alpha texture uuid", <1.0, 1.0, 0.0>, ZERO_VECTOR, 0.0,PRIM_ALPHA_MODE, face, PRIM_ALPHA_MODE_NONE, 0]);As you can see I'm animating texture faces instead of objects.If I use llSetLinkAlpha everything works and It's very reliable.But if use the code above a random face decide not to change parameters or PRIM_ALPHA_MODE is not changed at all.It's very weird and I'm just not sure if it's a bug or I'm doing something wrong? Is there a clever workaround this ?Thank you very much for spending time reading this.Regards Link to comment Share on other sites More sharing options...
Rolig Loon Posted January 9, 2016 Share Posted January 9, 2016 I've never had a reason to try this, but your solution looks like it ought to work. I assume that you have tried breaking your SLPPF statement into two separate function calls, one for each face. That shouldn't make any difference, in theory, but sometimes practice doesn't know about theory. Link to comment Share on other sites More sharing options...
Aminlove Faulkes Posted January 10, 2016 Author Share Posted January 10, 2016 Hello Rolig, Thank you for your answer. I tried breaking the SLPPF but it didn't help with the bug. Actually the animation became slower (if the timer event is super fast for ex.). I'm assuming this is a viewer bug because I don't see a problem with Firestorm, only with the official viewer Link to comment Share on other sites More sharing options...
steph Arnott Posted January 10, 2016 Share Posted January 10, 2016 I get the feeling that most people with a common spec laptop would not see it any way. SL official veiwer practicaly burns up laptop graphics chips which is why a lot use firestorm and they struggle even then. Not sure what you call super fast but there is a threshold limit that you probably far exceeded any way. Link to comment Share on other sites More sharing options...
Aminlove Faulkes Posted January 10, 2016 Author Share Posted January 10, 2016 Hello Steph, Thank you for responding. The speed of the timer was just for testing purposes. I believe it's a bug in the official viewer. Repo: 1. make a box with the official viewer 2. set all sides to the default transparent texture (blending mode is set to alpha blending automatically) 3. make a new script with following code: default { state_entry() { llSetPrimitiveParams([PRIM_ALPHA_MODE, ALL_SIDES, PRIM_ALPHA_MODE_MASK,255]); } } Result: alpha mode is not changed at all with the official viewer but with firestorm it's set to mask mode with cutout 255 I'm planning to submit jira, but my low render cost idea just fell down. I tried lots of stuff to workaround it, but no luck Regards Link to comment Share on other sites More sharing options...
steph Arnott Posted January 10, 2016 Share Posted January 10, 2016 Did you test with a different graphics card/chip? Link to comment Share on other sites More sharing options...
arton Rotaru Posted January 10, 2016 Share Posted January 10, 2016 I guess it's related to: https://jira.secondlife.com/browse/BUG-10601 Which is fixed in the Maintenance RC Viewer. Which is this one: http://wiki.secondlife.com/wiki/Release_Notes/Second_Life_Release/4.0.1.309460 Link to comment Share on other sites More sharing options...
Aminlove Faulkes Posted January 10, 2016 Author Share Posted January 10, 2016 @steph Yes. A friend of mine with different GPU sees the same @arton Thank you! I beleive it's the same problem. Tested the RC viewer and it works as expected! Yay Thanks all for the help ! Link to comment Share on other sites More sharing options...
Recommended Posts
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