Jump to content

Detecting Size Change without Timers? Light-Prims


Macrocosm Draegonne
 Share

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

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

Recommended Posts

I have an idea for a lighting project, not really for something to sell, but rather (potentially) for something to be included in the viewer as an additional prim type.  I figure its best to make it first before requesting.  The inspiration is Sansars lights, they're freaking awesome!

So, when I do lighting, I often use specific shapes/colors so I know what im looking at whilst they're still visible and in adjustment mode.  I can even have the script change the prim to the color of the light cast, or direction its pointing etc.  What I would like to do is detect when they've changed shape, when the user stretches a cone longer or wider.  What Im keen to do is have script detect that and adjust the values of the light accordingly.  So stretch long and change focus for example. 

Below are the questions/points that seem relevant.  I'm in no rush for this as ill just make it for myself at first.  Later I may compile my own viewer so I can test having these actually be additional tools added to the viewer called "Light Prims", I think its best to just have one that can change its form/type/color/behavior via scripted menu.  I am going to be in the same area when I test making Occlusion Prims too, so, why not Light Prims also lol?

How many of the light features can we access and tweak via scripts?
Can this be done without timers?  Something fast and super efficient would be best, this is why im thinking it should be an actual viewer feature and not just a regular object.

I do not intend that any of the previous lighting functionality goes away, so anything can be made a light etc, but rather to add an additional prim type, would be nice if the accounting and other features of it could be unique to the type as well.

I just wanted to share another wild idea and create the space for feedback, and where I will share my findings and hopefully what ive created. >8)

Edited by Macrocosm Draegonne
Link to comment
Share on other sites

30 minutes ago, Wulfie Reanimator said:

CHANGED_SCALE? Works even if the script is in the root of a linkset and a link changes scale.

PRIM_POINT_LIGHT is the prim parameter scripts can use.

Thanks Wulfie, I can see there is a lot we can do, but I read in the caveats " There are no LSL functions that allow you to set projector values (texture, FOV, focus, and ambiance). " :(  its ok really as I suspected this might need to be an actual prim-type to be best performing, and give LL ways to put rules/restrictions on it more easily.  Plus the prim-type could have widgets on it to rotate, scale, slide, for all the effects lights can do, and to toggle between area/projector as well, with their own set of option levels and adjustments.  I suppose there isnt an intense need to set the texture from a diolog, when it can be easily done in the prim edit pop-up, but controlling the FOV, Focus, Ambiance, etc, is the main thing id like from the object instead of pop-up.

I will tinker and make whats possible with LSL then when I start compiling my own viewer to test making unique prim types ill have all that in mind from testing whats possible now.

When you think about it what im planing is super simple, all the functionalities are already coded, im simply making a prim with widgets on it to alter those settings in the Prim-Edit screen already, but real-time in world tinkering instead.  This is so much easier than my idea for Occlusion Prims, so I will probably do this first before that to get my feet wet in the viewer code lol!  Im sure its a beast of complexity and brilliance in there!

Thanks for the pointers, I had not found changed_scale or even changed_anything yet, and indeed it appears it will work without a timer, which is cool!

Edited by Macrocosm Draegonne
Link to comment
Share on other sites

On 11/4/2018 at 8:44 PM, ellestones said:

if you were to surface all the prim properties in the design time Build/Edit property dialog then pretty much everyone would kiss you up your face. Stuff like omega and texture motion surfaced as design-time properties would be really good 

So more than lights tweakability?  There are many prim properties already accessible via script, with few exceptions, notably around lighting, but UI stuff doesnt require in-world scripting so its potentially easier on everything. 

?Ahhh... I see what you're saying, oooh that is interesting!  More than just scale widgets on a prim, you could tweak the textures, etc.  A lot could be done in the prim properties dialogue itself to improve things, but that alone would still not be as cool as more design-time widgets!  I must add another vault to my mental imagineering temple of computation and consideration.  Im sure ill have a minor multi-week freak out once I get the viewer code to read and compile lmao....  im still keeping myself away from that rabbit hole for a little while longer while I collect all the relevant info and finish some other things.

Link to comment
Share on other sites

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