Jump to content

Force viewer to sort alpha textures?


phaedra Exonar
 Share

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

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

Recommended Posts

If you are trying to defeat the "automatic alpha mask" feature, the last line ought to be enough, but should only be used if the texdture on every face actually has an alpha channel. You can do this in the SL editor, just set transparency on that face to 1%; a script for this seems odd.

This trick does hurt viewer performance, so I hope you are only using it where it's really necessary.

Link to comment
Share on other sites


Cerise Sorbet wrote:

If you are trying to defeat the "automatic alpha mask" feature, the last line ought to be enough, but should only be used if the texdture on every face actually has an alpha channel. You can do this in the SL editor, just set transparency on that face to 1%; a script for this seems odd.

This trick does hurt viewer performance, so I hope you are only using it where it's really necessary.

Thanks Cerise

I working with a silhouette dance ball effect and need to force viewers to resort alpha textures when the object first rezzes.  The silhouette doesn't look right until some one changes their camera view ether by moving or zooming in and out, this only happens when the object is first rezzed. 

So I managed to force it with the script I posted.  I've tried several variation so far and only this combination so far works,  just using the last line would set the effect on the prim, but dosent trigger the viewer seeing it, untill some one moves. 

Sense an avatar moving has the same effect as the script I posted above, I thought may be to script the object to change position back and forth instead of changing size might work but haven't had time to do so yet.  Would that be easer on the viewer?  All so thought of for the avatar sitting on the object I could script a change in camera view, but that wouldn't effect avatars near by looking at the object.

Link to comment
Share on other sites


phaedra Exonar wrote:

I'm using a twisted sphere.  The effect works fine , just not when it's first rezzed untill I ether toch it or move away from it.  I think the size change is working because the size changes forces the LOD distance for the object to change? 

Not quite.

 

What you're doing is prioritizing a task within the avatar's interest list by changing a property of the object. Within an object's property list, a change in size (its scale) is considered one of the most important/major (as is orientation and position) and is placed at the head of the queue of update packets to be sent to the viewer (which is constantly being throttled by priority). Along with this change in scale, the packet will also carry texture information for that task as well.

 

So, basically, your alpha sorting is being "piggy backed" to the viewer on top of the scale change.

 

See (among others, too numerous to list!) for further reading in this fascinating subject:

https://wiki.secondlife.com/wiki/Culling

https://wiki.secondlife.com/wiki/Packet_Accounting

https://wiki.secondlife.com/wiki/Interest_List_test

 

[some phrases edited for clarity.]

Link to comment
Share on other sites

I've a product that includes silhouette dancing feature as well and still have the same problem: a twisted sphere doesn't come up right on rez unless camera is moved. I tried scale change, though not as drastic as to 64 meters :) and it does seem to help but only if the viewing avatar's camera is positioned close to the sphere. If a camera is positioned farther away maybe 20 m or so, the scale change doesn't help any longer. I guess the server considers an objects farther away less interesting.

Link to comment
Share on other sites


Ela Talaj wrote:

I've a product that includes silhouette dancing feature as well and still have the same problem: a twisted sphere doesn't come up right on rez unless camera is moved. I tried scale change, though not as drastic as to 64 meters
:)
and it does seem to help but only if the viewing avatar's camera is positioned close to the sphere. If a camera is positioned farther away maybe 20 m or so, the scale change doesn't help any longer. I guess the server considers an objects farther away less interesting.

I found that the version Innula posted works better then the single prim twist version, not a 100% but better. 

http://community.secondlife.com/t5/LSL-Scripting/What-is-wrong-with-this-script/td-p/2360753/page/2

Haven't time to tried it combined with the scaling on rez yet to see how that works.  Thought he scaling was triggering because of changes in the objects LOD but looks like its related to the interest list,(see LepreKhaun comment a few above this one)  so some of the other things that might trigger it are right clicking on the object, rotation, and movement. My next experiment is going to be trying the on rez script changing rotation and or position, and less drastic scaling :)

 

 

 

 

 

Link to comment
Share on other sites

You are about to reply to a thread that has been inactive for 3784 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...