Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

THE way to MAINTAIN your water prims textures NON 1x1...

Margot Abattoir
Senior Member
Join date: 15 Jul 2004
Posts: 234
03-04-2006 09:54
Luna Bliss IM'd me about something related to a falls of hers not looking 'quite right' this morning. Seems it was something to do with her graphics detail prefs..BUT in messing around with the water script to see whether it was another LL update snafu, I came across the 'cure' for not being able to texture animated prims in a NON 1x1 repeat texture and have them remain so after you log off and come back on. And, no, it does NOT involve changng the numerical parameters of the water script.

I save a lot of my prims I use for falls, and I kept rezzing certain prims to look more closely at them. Mainly because these prims DID keep their NON 1x1 repeats log on after log on. I thought it was due to the fact that they were over a year old and perhaps they were 'immune' to the LL bug. As when a prim seems to be changed forever and act as though it still has a certain script in it..even though you've removed it.

Thing is..the ones that KEPT their textures had ONE thing in common. They all had the hot tub steam script in them. SO..perhaps, some competitive inhibition was at play hehe.

I made a water prim and put a relatively harmless script in it...not hot tub steam..to see if I was right. It worked. I was able to alter the texture several times and have it stay that way after logging off, loggin on. Replicating a prim is a great way to tell if this works. And of course, it passed that test as well. So try it.

Only thing is...I'm open to suggestions for the additional script to use in water prims. NOT hot tub steam..some falls you do wish to be less steamy :) NOT a visitor list maker...when my customers 'say list' having a hundred scripts answer may not be pleasant. :) Luna suggested Jillian's splash script..but..again..pls make suggestions.
Toy LaFollette
I eat paintchips
Join date: 11 Feb 2004
Posts: 2,359
03-04-2006 10:24
Interesting, maybe just a simple particles script thaat doesnt calle for particles.... like

default
{
state_entry()
{
llParticleSystem([]);
}
}
_____________________
"So you see, my loyalty lies with Second Life, not with Linden Lab. Where I perceive the actions of Linden Lab to be in conflict with the best interests of Second Life, I side with Second Life."-Jacek
Margot Abattoir
Senior Member
Join date: 15 Jul 2004
Posts: 234
Tyssm, Toy!
03-04-2006 11:27
Will try it..yes... sounds perfect, because helicopter scripts are definitely out :)) Soooo happy bout this today..yeah!!
ZsuZsanna Raven
~:+: Supah Kitteh :+:~
Join date: 19 Dec 2004
Posts: 2,361
03-04-2006 11:43
Margot, Not sure if you remember or not but You gave me a script awhile back that did fix the repeat issues for a bit as you stated above. If you happen to make one that works as it should I would be forever in your debt to get a copy. I am making a volcano and need a good script for the lava repeats. Thanks!
_____________________
~Mewz!~ :p
Margot Abattoir
Senior Member
Join date: 15 Jul 2004
Posts: 234
no water script changes needed, S...
03-04-2006 12:28
Yes, ..changing the parameters in the water script DOES allow you to alter the texture repeats and have them STAY that way. Sell an urn containing just such prims with scripts in them that have been altered in the recommended way. So I did not give out scripts but examples of scripts INSIDE prims showing what the adjustments DID to those prims. Included with that package was a suggestion to LOOK at the scripts, and adjust them further to get a preferred look from your texture. :)

But that is a sad replacement for actually getting your preferred texture repeats via the prim data screen's texture parameters!

Read the first post..and try it..very happy that it seems to work..and work so easily!
Margot Abattoir
Senior Member
Join date: 15 Jul 2004
Posts: 234
This is way fun..but linking is tricky in this respect...
03-04-2006 13:24
As with ANYTHING you link, the entire group will take on the characteristics of the initial prim with which you began the link..but in this case, more happens. The INITIAL linking looks fine...even thought they NOW have the texture repeats of that initial water prim.

BUT MORE HAPPENS...

Whenyou take that reasonably 'ok' linked piece into your inventory and re-rez it. OR log off and come back on. You'll THEN find all the textures revert to 1x1 IN YOUR LINKED GROUP! Gruesome, yes, but truly no prob. You'll find when you UNLINK THEM..they return to their beautiful non 1x1 repeat texture. Sometimes it takes a sec. Just touch them. And, yes, they REMAIN that way. Log on after log on. That is, until LL's next update (aargh) AND....

Since one usually UNLINKS water design prims to adjust for phantom ANYWAY, (that is, unless you're terribly fond of falling thru rocks you're trying to sit on or hurting yourself on SOLID H20 you're trying to dive into), this reverting to 1x1 when linked is NOT a issue. You'll be unlinking the work anyway..and perhaps linking the solids apart from the water prims as in fountain work, or just locking all in place, as I do with falls.

SO, link...and save your work..then rez it..unlink it..and ALL your water prims will return to the texture repeats they had BEFORE you linked them! Then do as you please for your type of work. Fountain work/link the non-phantom. Falls, lock each piece for possibly clumsy customers and you're done :)


And a big ty to Toy..think that that a non-particle particle script would be a great script 'partner' for the water script to allow us to fine-texture water prims. Luna tried Jillian's splash thingie to accompany the w.script and it had a rotation thing in it..I think she's still trying to catch her falls:)

(pls read the initial post to follow, ty...will be having a class later in the month to 'splain

this and more! )
SunenRec Ayoob
Registered User
Join date: 29 Dec 2004
Posts: 61
03-04-2006 15:55
Rather than adding an extra script you can achieve the same results by adding an empty timer event to the texture animation script.

e.g.

CODE
 
default
{
state_entry()
{
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP , ALL_SIDES, 0, 0, 0, 0, 0.125);
llSetTimerEvent(9999999);
}

timer(){}
}


Just tested it a few times by duplicating prims/relogging and it worked every time.

Also tried a few other events like link_message, sensor and object_rez but the timer event was the only one that fixes the texture repeat issue so I did some more tests and found that the texture repeats on a prim using texture animation are only lost if the prim isnt an active object (tested this using a sensor and sure enough the prim containing the script using the timer is detected as active whereas a prim containing the same script but no timer event is detected as passive)

It's also worth noting that if the prim containing the texture anim is a child prim in a linked object then the root prim also needs to have an active script in it (the same empty timer event works fine). This doesnt solve the issue of child prims losing their texture offsets but it's possible to hack your way around the problem by including a script in the root prim with an empty timer and on_rez event that sends a link message to all child prims, then adding a link_message event with the llScaleTexture command to each child prim that uses texture animation.

e.g.

Script for Root Prim

CODE
 
default
{
on_rez(integer start_param)
{
llMessageLinked(LINK_ALL_CHILDREN, 0, "", "");
llSetTimerEvent(9999999);
}

timer()
{}
}



Script for Child prim

CODE
 
default
{

state_entry()
{
llSetTextureAnim(ANIM_ON | SMOOTH | LOOP , ALL_SIDES, 0, 0, 0, 0, 0.125);
llSetTimerEvent(9999999);
}

link_message(integer sender, integer num, string str, key id)
{
llScaleTexture(2.0,2.0,ALL_SIDES);
}

timer(){}
}



Not exactly an elegant work around, and probably a real pain if the object you're working with has a lot of child prims with different texture scales and offsets but then I guess the most elegant solution would be for LL to fix whatever the issue is with passive objects and texture animation. (HINT HINT!) :D

You could probably improve on the above script for the child prim by using llGetTextureScale and llGetTextureRot in the state_entry event to record the texture scale and rotation of each face of the prim and then using a for loop in the link_message event to reset them each time the object is rezzed (if I get bored later I may try it and post the results if anyone is interested )

Sun.
Margot Abattoir
Senior Member
Join date: 15 Jul 2004
Posts: 234
no, it's totally ELEGANT !!
03-04-2006 18:22
Have got to experiment this week with this before my class, so I can give folks the least clumsy way to do this.

Makes sense that there is some added bit of direction in the second scripts to have the ability to keep a texture.

Am working the next few days, but will come up with a single script hopefully on Tues...and perhaps give ppl choices here. Awkwardly changing the water script parameters is just that..awkward. A second script..awkward but better. An empty timer event...much better and definitely the only fix that would qualitfy as 'elegant'. TY!

So wish me luck..in any event, it will be scripting time at the academy this week!

(*big rush of feet heard running to the exit*)
SunenRec Ayoob
Registered User
Join date: 29 Dec 2004
Posts: 61
Animated texture scaling fix
03-05-2006 02:15
I've combined the fixes mentioned above into a single script and added support for texture scaling per face instead of per prim. Dropping the script into any prim that uses an animated texture (and the root prim if it's part of a linked object) ensures that the texture scaling is retained when copies of the object are rezzed.


The script is full perms and is available in a free to copy example object (along with a brief instructions notecard) here
Margot Abattoir
Senior Member
Join date: 15 Jul 2004
Posts: 234
Yeah!!!
03-05-2006 15:34
am too tired to go inworld right now/just returned from salt mines..but will check it out laters!! tysm for making it free, too!!
Margot Abattoir
Senior Member
Join date: 15 Jul 2004
Posts: 234
Finally tested it today!!
03-19-2006 14:08
Sorry about the delay, rl is a huge time eater right now. The script is fantastic. It is a safe, quiet script to pair with your water script. Still have to unlink to get the varied repeats if one has different non 1x1 repeats on multiple prims, the root prim thing again, but the prims all retain the specific repeats of the textures you work so hard at doing to get just the right look on a prim when you unlink them.

Get this script from Wolven Hearts asap if you're a water prim afficiando! Just pair it with a water script..that you've slowed abit..and you'll have THE most perfect H20 in sl!

Thankyou Sun!!!
Margot Abattoir
Senior Member
Join date: 15 Jul 2004
Posts: 234
The SunenRec script is perfect ;)
03-23-2006 20:56
It DOES keep the INDIVIDUAL texture repeats in linked prims!! I guess I placed it in some old, warped primoids before.:))

Taught what I wanted to be a 'beginner's' class today and was just going to 'touch' on this script but they wouldn't let me just 'touch' on it! All the questions about the why of it were answered, and why I prefer this script to any other to pair with the water script to maintain non 1x1 repeats.

For fountain work, where you can easily link the water separately from the stone foundation and do NOT have to unlink to adjust for phantom, this script will be a blessing. Since I save large linked pieces and replicate them at times in a design, this is great, too. And the demo using replicating of prims to reproduce what happens after log off/on went well although I did hold my breath thinking that, hmm...what if it DOESN'T work this time!

But it went purrrrfectly!!
SunenRec Ayoob
Registered User
Join date: 29 Dec 2004
Posts: 61
03-23-2006 23:20
Glad to hear you got the fix working okay Margot! :D I was hoping to find time to attend but got sidetracked.

I'm looking forward to making it to at least one of them in the future and picking up a few tips on how to make better use of the new script tho! ;)