Windows Open/Shut/ Question(s)
|
|
Morgaine Christensen
Empress of the Universe
Join date: 31 Dec 2005
Posts: 319
|
06-02-2008 10:38
I am just learning to build mostly through trial and error LOL. I have a question on windows as I was pondering some of my builds.
I been using alpha textures for windows on both sides of a single prim. Looks more consistent and less primmy. But, the one problem is the window is always open on both sides (open meaning you can see in and out of the wind) Is there way to "close" the windows on both side (closed meaning you cannot see in out of the window)? Is this done by using both an "open" and "closed" alphas texture somehow placed in the prim with a script? My thoughts run to a touch texture cycler sort of thing, but not sure.
Am I on the right/wrong track? Can anyone offer some insight here? Thanks!
|
|
Zen Zeddmore
3dprinter Enthusiast
Join date: 31 Jul 2006
Posts: 604
|
06-02-2008 11:21
That's certainly one way to do it. You could also use curtains or blinds. Myself I like a laser cannon that burns out the eyeballs of anyone trying to sneek a peek.
_____________________
A kilogram of programmable nanobots can lower the certainty of both death AND taxes.
|
|
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
|
06-02-2008 11:24
From: Morgaine Christensen I am just learning to build mostly through trial and error LOL. I have a question on windows as I was pondering some of my builds.
I been using alpha textures for windows on both sides of a single prim. Looks more consistent and less primmy. But, the one problem is the window is always open on both sides (open meaning you can see in and out of the wind) Is there way to "close" the windows on both side (closed meaning you cannot see in out of the window)? Is this done by using both an "open" and "closed" alphas texture somehow placed in the prim with a script? My thoughts run to a touch texture cycler sort of thing, but not sure.
Am I on the right/wrong track? Can anyone offer some insight here? Thanks! I do this all the time. the prim has 4 textures for it : Inside open, inside closed, outside open, outside closed. I reference the textures by their key, so I don't have to include copies of the textures in the contents of each window. The window is operated by a script that is touch-activated, that toggles the textures between the open and closed states on the respective faces. The trick is to use commands that replace the texture on a specific face of the cube prim. What I usually do is change the textures on faces 1 and 3, as I recall, then I apply that script to a default cube prim. Once I see which faces changed, I resize and orient the prim as needed to be the window, and keep a copy of that window prim for later use. The folks on the scripting forum can probably give you several variations on texture switching scripts to start from. As for curtains/blinds - be aware that you can NOT use alpha textures on both the curtains and the blinds and expect to get consistent results. The best trick there is to use prims for the curtains that have a script that changes their size/position, and that also changes the texture from 'wavy' to 'pleated' versions. The textures uses are all 24-bit, so they won't fight with the window pane texture. Contact me in-world, and I can show you examples of both techniques.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
|
|
Morgaine Christensen
Empress of the Universe
Join date: 31 Dec 2005
Posts: 319
|
06-02-2008 13:33
From: Ceera Murakami I do this all the time. the prim has 4 textures for it : Inside open, inside closed, outside open, outside closed. I reference the textures by their key, so I don't have to include copies of the textures in the contents of each window. The window is operated by a script that is touch-activated, that toggles the textures between the open and closed states on the respective faces.
The trick is to use commands that replace the texture on a specific face of the cube prim. What I usually do is change the textures on faces 1 and 3, as I recall, then I apply that script to a default cube prim. Once I see which faces changed, I resize and orient the prim as needed to be the window, and keep a copy of that window prim for later use.
The folks on the scripting forum can probably give you several variations on texture switching scripts to start from.
As for curtains/blinds - be aware that you can NOT use alpha textures on both the curtains and the blinds and expect to get consistent results. The best trick there is to use prims for the curtains that have a script that changes their size/position, and that also changes the texture from 'wavy' to 'pleated' versions. The textures uses are all 24-bit, so they won't fight with the window pane texture.
Contact me in-world, and I can show you examples of both techniques. Wow! This sounds complicated. LOL. But at least I am on track is sounds like. Is there a good script for this that I can buy inworld? I will try to contact you a bit later when I am in-game. Thanks!
|
|
Morgaine Christensen
Empress of the Universe
Join date: 31 Dec 2005
Posts: 319
|
06-02-2008 13:38
From: Zen Zeddmore That's certainly one way to do it. You could also use curtains or blinds. Myself I like a laser cannon that burns out the eyeballs of anyone trying to sneek a peek. Yes, curtains and blinds would work on the inside, but they would increase the prim size. Two alphas don't mix well. Learned that decorating homes I have bought from other builders. So, the blinds and curtains would need to be non-alpha textures. Even then, there are still odd viewer issues sometimes when you place curtains. Also, you have to watch how the non-alpha textured prim is aligned with the window. I figured the best solution would be open and closed windows of some sort. Thanks for the infor.
|
|
VonGklugelstein Alter
Bedah Profeshinal Tekstur
Join date: 22 Dec 2007
Posts: 808
|
06-03-2008 06:31
I have a script that will let you put a shade texture on the window and then adjust the transparency via menu contoller. IM me in world and I will hook you up
|
|
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
|
06-03-2008 07:58
Here is a very simple script to demonstarate the idea, the textures aren't very good. Works for a cube flattened on the x-axis. Just touch it to change the textures.
integer INSIDE = 2; integer OUTSIDE = 4;
integer is_open;
key inside_closed = "73f666c9-2d7f-4c44-4035-fb8dd44f6cf7"; key inside_open = "9e5daebc-a1f6-17d1-c601-c617a4cab7b0"; key outside_closed ="73f666c9-2d7f-4c44-4035-fb8dd44f6cf7"; key outside_open = "9e5daebc-a1f6-17d1-c601-c617a4cab7b0";
open() { llSetTexture(inside_open, INSIDE); llSetTexture(outside_open, OUTSIDE); is_open = TRUE; }
close() { llSetTexture(inside_closed, INSIDE); llSetTexture(outside_closed, OUTSIDE); is_open = FALSE; } default { state_entry() { open(); }
touch_start(integer total_number) { if(is_open) { close(); } else { open(); } } }
You can of course use the texture names if you want, but then the textures have to be in the prim.
|
|
Chosen Few
Alpha Channel Slave
Join date: 16 Jan 2004
Posts: 7,496
|
06-03-2008 08:23
Rather than using four separate textures, I'd suggest using just one texture with four panels in it, and then simply offset it on command via script, to show just one quadrant at at time on each side of the window. This will yield two advantages. First, it will cut down on network traffic, since only one asset needs to be delivered instead of four. Second, you'll never have to worry about any particular window state taking longer to load than any other. Since they're all on the same image, they all load at once.
_____________________
.
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.
|
|
Cristalle Karami
Lady of the House
Join date: 4 Dec 2006
Posts: 6,222
|
06-03-2008 08:38
Now to get texture artists to make this kind of window...!
_____________________
Affordable & beautiful apartments & homes starting at 150L/wk! Waterfront homes, 575L/wk & 300 prims! House of Cristalle low prim prefabs: secondlife://Cristalle/111/60http://cristalleproperties.info http://careeningcristalle.blogspot.com - Careening, A SL Sailing Blog
|
|
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
|
06-03-2008 09:27
From: Cristalle Karami Now to get texture artists to make this kind of window...! *smiles* I already do! My "TRU-CM Greek Windows" include all the variations needed for this, in several frame colors. When I complete my next building project, I'll try to make time to make more window textures that offer curtains like these do, and some with venetian blinds, too.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
|
|
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
|
06-03-2008 09:31
For the trick with the prim curtains that re-size, take a look at the small auditorium at the University of Houston's sim: http://slurl.com/secondlife/HHP%20at%20UH/135/44/24 . I have some of that type of curtains installed there.
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
|
|
Cristalle Karami
Lady of the House
Join date: 4 Dec 2006
Posts: 6,222
|
06-03-2008 09:33
From: Ceera Murakami *smiles* I already do! My "TRU-CM Greek Windows" include all the variations needed for this, in several frame colors. When I complete my next building project, I'll try to make time to make more window textures that offer curtains like these do, and some with venetian blinds, too. Hi Ceera, I meant the 4 windows in one texture. 
_____________________
Affordable & beautiful apartments & homes starting at 150L/wk! Waterfront homes, 575L/wk & 300 prims! House of Cristalle low prim prefabs: secondlife://Cristalle/111/60http://cristalleproperties.info http://careeningcristalle.blogspot.com - Careening, A SL Sailing Blog
|
|
Morgaine Christensen
Empress of the Universe
Join date: 31 Dec 2005
Posts: 319
|
06-03-2008 09:42
I am not very fond of alpha textures anyway and only use them to reduce the prim size of the build. WoW, this is starting to sound really complicated. Really makes me appreciate builders even more then I once did.
I thank everyone for the valuable information. I will try experimenting with the suggestions made and see which works the best for me. Then on to doors!
|
|
Beverly Ultsch
Registered User
Join date: 6 Sep 2007
Posts: 229
|
06-03-2008 11:02
Am amended version of the script to do it with one texture consisting of four panels as recommended by Chosen.
integer INSIDE = 2; integer OUTSIDE = 4;
vector REPEATS = <0.25, 1.0, 0.0>;
vector INSIDE_OPEN = <0.125, 0.0, 0.0>; vector INSIDE_CLOSED = <0.375, 0.0, 0.0>; vector OUTSIDE_OPEN = <0.625, 0.0, 0.0>; vector OUTSIDE_CLOSED = <0.875, 0.0, 0.0>;
key TEXTURE = "1a82fa6f-8440-6b09-c9f7-ff9d0381b82e";
integer is_open;
open() { llSetPrimitiveParams([PRIM_TEXTURE, INSIDE, TEXTURE, REPEATS, INSIDE_OPEN, 0.0, PRIM_TEXTURE, OUTSIDE, TEXTURE, REPEATS, OUTSIDE_OPEN, 0.0]); is_open = TRUE; }
close() { llSetPrimitiveParams([PRIM_TEXTURE, INSIDE, TEXTURE, REPEATS, INSIDE_CLOSED, 0.0, PRIM_TEXTURE, OUTSIDE, TEXTURE, REPEATS, OUTSIDE_CLOSED, 0.0]); is_open = FALSE; } default { state_entry() { open(); }
touch_start(integer total_number) { if(is_open) { close(); } else { open(); } } }
Edit: This assumes 4 frames in a row, EG; 256 x 1024
|
|
Cristalle Karami
Lady of the House
Join date: 4 Dec 2006
Posts: 6,222
|
06-03-2008 12:08
My question then would be this: Is it better to have a 1024 that loads once, or 4 512s?
_____________________
Affordable & beautiful apartments & homes starting at 150L/wk! Waterfront homes, 575L/wk & 300 prims! House of Cristalle low prim prefabs: secondlife://Cristalle/111/60http://cristalleproperties.info http://careeningcristalle.blogspot.com - Careening, A SL Sailing Blog
|
|
Ceera Murakami
Texture Artist / Builder
Join date: 9 Sep 2005
Posts: 7,750
|
06-03-2008 12:57
From: Cristalle Karami My question then would be this: Is it better to have a 1024 that loads once, or 4 512s? Generally speaking, a single 1024 x 1024 texture will put less load on the system than 4 512 x 152's, just because it is only one call on the asset server, instead of four. And being on one texture sheet means all 4 textures preload at once. I'll add it to my "to do list" to make some "4-state-per-sheet" window textures, along with a suitable texture change script. Wouldn't be hard to create from my existing window graphics image masters and source content. I think for most windows, a 512 x 512 sheet that splits into 4 256 x 256 frames would be quite sufficient. But Venetian Blinds would probably need to be a 1024 x 1024 sheet to look good. One reason my current textures are seperate is it allows you to repeat a frame sideways on a single prim. For example, to make a bay of two or three window sashes in a single exterior frame, each with a curtain or roller blind, that all operate at once. A lot of my early home building found uses for that sort of texture. Couldn't do that with a 4-in-one texture sheet, unless it was 4 textures stacked vertically in a 1024 x 256 strip. Hummm. Now you have me thinking...
_____________________
Sorry, LL won't let me tell you where I sell my textures and where I offer my services as a sim builder. Ask me in-world.
|