|
Zaphod Zepp
Registered User
Join date: 13 Jan 2009
Posts: 38
|
01-20-2009 16:41
Surely I'm not the only one who's notice that a glow of about .5 is glaringly bright at midday, but barely visible at midnight - and a glow of .7 or .8, needed if you want a decent amount of glow at midnight, is beyond crazy at midday. In RL the glow of any artificial light is usually the other way around - hardly visible at midday and quite noticeable at midnight!
Question is, how hard is it to dynamic adjust the glow factor based on the time of day setting? I tried sitting in a timer loop watching llGetSunDireciton() but it doesn't seem to work - I change my Environment Settings and see no discernible switch in angle (though the angle does change slightly every so often - is this actually the sun moving through the sky?)
|
|
Zaphod Zepp
Registered User
Join date: 13 Jan 2009
Posts: 38
|
01-20-2009 16:47
...thinking about that some more I guess that's obvious that llGetSunDirection() must be based on the real sun position rather than the viewer override, because the script runs at the server and everyone gets the same glow value. Oh well.
|
|
Zaphod Zepp
Registered User
Join date: 13 Jan 2009
Posts: 38
|
01-20-2009 17:13
FWIW, this seems to work OK, but I haven't found anywhere to test it at Sunrise yet:
adjustGlow() { vector v = llGetSunDirection(); if (v.z > 0) llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, .1]); else if (v.z > -.1) llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, .5]); else llSetPrimitiveParams([PRIM_GLOW, ALL_SIDES, 1]); }
default { state_entry() { adjustGlow(); llSetTimerEvent(30); } on_rez(integer param) { adjustGlow(); }
timer() { adjustGlow(); } }
...of course that's the easy bit. What I actually want is to create a light show...
|