Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Self Lit Prims!!!! The Way!

Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
12-09-2004 17:58
alright folks, I've posted on a few feature request threads now, requesting self lit prims. We have light prims but these have the pesky habit of actually radiating light. Well duh you might say, that's what you want them to do isn't it? NO! Self lit prims are prims that aren't effected by the surrounding light, lit from within, AND also do NOT cast light on things around them. That last part is useful for signs, are anything you want to be visible in the dark without it making things around it washout, or change color. And not least it also keeps mid range to slower video cards from dying with local lighting turned on.

So, here's the secret. The light that shines from an object is the color of side 0. so you can use every other side as long as you set side 0 to BLACK. because black turns off the light source. It will still be very visible in the dark, but it will no longer cast any light around it.

For example, the top of a cube is side 0, so set the top and bottom if you like to BLACK and you can put signs on the other four sides. Make the prim type light, and walla, a sign that's visible in the dark with none of the dissadvantages.

Another use for this is jewelery. I've seen many a diamond that's set to light so it shines at night. Looks wonderful but with local lighting on it also makes funny lights on your avatar, doing things like making the underside of your hair glow. Make side zero of the gemstone black and hide it in the setting, or in the middle of the gemstone if the stone is many prims. Now your gemstones shine in the dark without hurting anybody or making your av glow in strange places.

Please Please consider using this. It speeds up everyone who likes to have local lighting turned on, and lets things around them that are supposed to shine with light do so.

if you're not sure how to figure out which side is 0, create a new script and replace all the code in it with the following script:

CODE

default
{
state_entry()
{
llSetColor(ZERO_VECTOR, 0);
}
}


As soon as you save this script side 0 should turn black.

If you want to turn side 0 of EVERY prim in an object black use this code.

CODE

default
{
state_entry()
{
llSetLinkColor(ALL_SIDES, ZERO_VECTOR, 0);
}
}


Also remember that in things like jewelery things like the chain do not need to be light, and that you can set individual prims as light rather than the whole object.

Thanks :)
_____________________
Shack Dougall
self become: Object new
Join date: 9 Aug 2004
Posts: 1,028
12-10-2004 10:02
Excellent suggestion!

I'm working on something that needs this exactly. I want it to to be highly visible at night, but I don't care at all if actually radiates light.
_____________________
Prim Composer for 3dsMax
-- complete offline builder for prims and sculpties in 3ds Max
http://liferain.com/downloads/primcomposer/

Hierarchical Prim Archive (HPA)
-- HPA is is a fully-documented, platform-independent specification for storing and transferring builds between Second Life-compatible platforms and tools.
https://liferain.com/projects/hpa
Elle Pollack
Takes internets seriously
Join date: 12 Oct 2004
Posts: 796
12-10-2004 20:49
This is also great for things like animated fire: you want it to cast orange light but you don't want to tint the prim completely orange.
Goodwrench Grayson
Classic Gaming Nut
Join date: 18 Jun 2004
Posts: 223
12-11-2004 10:04
This is great stuff. I look forward to incorporating this technique. :)
_____________________
We used to remember our Roots at The Mushroom Kingdom - memorial can be found at Davenport 200, 150
Section 8 Server - my home on the web
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
12-11-2004 10:20
Rick, once again I am humbled before your genius. Great suggestion!
_____________________
.

Land now available for rent in Indigo. Low rates. Quiet, low-lag mainland sim with good neighbors. IM me in-world if you're interested.
Alicia Eldritch
the greatest newbie ever.
Join date: 13 Nov 2004
Posts: 267
12-11-2004 15:05
farking hell that's a great trick.

ty ty ty!
Malachi Petunia
Gentle Miscreant
Join date: 21 Sep 2003
Posts: 3,414
12-11-2004 15:20
/me claps.
_____________________
Milo Bukowski
Lag-induced oversteer
Join date: 23 Dec 2003
Posts: 305
12-11-2004 15:20
Thanks!
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
12-12-2004 09:45
Aw, we vixens get no respect... :p ;)
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Trifen Fairplay
Officially Unofficial
Join date: 19 Jul 2004
Posts: 321
12-12-2004 10:23
WTG Cross good job I didnt see yours!

also thanks for this thread keep the free flow of information!
Cross Lament
Loose-brained Vixen
Join date: 20 Mar 2004
Posts: 1,115
12-12-2004 15:55
*giggle* Rickard's much better at explaining ideas sensibly than I am. :o
_____________________
- Making everyone's day just a little more surreal -

Teeple Linden: "OK, where did the tentacled thing go while I was playing with my face?"
Chromal Brodsky
ExperimentalMetaphysicist
Join date: 24 Feb 2004
Posts: 243
12-12-2004 16:54
Very nice. I'm curious if this still requires some CPU time in the client, even though the effective light cast distance is nothing. Very nice observation, either way!
Cubey Terra
Aircraft Builder
Join date: 6 Sep 2003
Posts: 1,725
12-12-2004 21:06
Cool. I'll put this to use in my new vendor right away.
_____________________
C U B E Y · T E R R A
planes · helicopters · blimps · balloons · skydiving · submarines
Available at Abbotts Aerodrome and XstreetSL.com

Tiger Crossing
The Prim Maker
Join date: 18 Aug 2003
Posts: 1,560
12-13-2004 14:26
While it's a good hack, we STILL need to separate light emittance and bright apearance. This trick is useless on shapes where side 0 must be visible, such as spheres and tori.
_____________________
~ Tiger Crossing
~ (Nonsanity)
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
12-13-2004 20:25
From: Chromal Brodsky
Very nice. I'm curious if this still requires some CPU time in the client, even though the effective light cast distance is nothing. Very nice observation, either way!


I tested it, at my house with 16 lit boxes. With the trick it was about 4fps faster than without the trick. So I think it helps. Not a huge difference, but there wasn't much around to actually light either.
_____________________
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
12-13-2004 20:26
From: Tiger Crossing
While it's a good hack, we STILL need to separate light emittance and bright apearance. This trick is useless on shapes where side 0 must be visible, such as spheres and tori.


cutting causes one face exposed by the cut to be side 0, so if you can hide the cut it works for spheres and tori.
_____________________
Rickard Roentgen
Renaissance Punk
Join date: 4 Apr 2004
Posts: 1,869
12-13-2004 20:27
but you're right we still need an official way rather than a hack :).
_____________________
Prokofy Neva
Virtualtor
Join date: 28 Sep 2004
Posts: 3,698
12-14-2004 15:27
OK I like that but could you explain in little baby steps again now to do that.

Or sell me one.