Jump to content

Macrocosm Draegonne

Resident
  • Content count

    151
  • Joined

  • Last visited

Community Reputation

39 Excellent

About Macrocosm Draegonne

  • Rank
    Advanced Member

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Macrocosm Draegonne

    Subtle Texture Animation

    Oh I see now, the llWind wasnt there, thats why the separated one was working and not the other, it needed that function to get the right connection stack going. I was almost figuring that out but not quite there hahaha, I knew something was off but I didnt detect that missing llWind, which should have been apparent but I guess im still a newb and thats going to keep happening until I scream and learn more.
  2. Macrocosm Draegonne

    Subtle Texture Animation

    When testing float windSpeed = llVecMag((ZERO_VECTOR) ); I get zero's as a result with that for some reason when testing the output, is there some caveat about needing to separate out with this below? vector windVector = llWind( ZERO_VECTOR); float windSpeed = llVecMag( windVector); I will keep testing for sure, but I can say the float modSpeed = windSpeed * 0.05 works perfectly. that indeed is a much cleaner and more concise line! I was beating around the bush there a bit lol 🤣 Now that I a bit more fully understand things I can add in some If/else logic to treat the high and low wind differently in the animation which should be a nice touch hopefully, and can add some more still time to it as well perhaps
  3. Macrocosm Draegonne

    Subtle Texture Animation

    Thanks so much for that, I will test for sure, there was still some cruft in there from other testing too heheh, but also the numbers are very very touchy in the llSetTimerEvent, so it caused me to try some odd combos in the functions to try and make it calmer, especially in that line I brought over from the sailing script, also in that last paramater section too, may times I would get no animation, or the texture would split and freeze. I tried to look for some others like and opposite of llPow to replace that bit with but nothing jumped out as I was checking, I figured that line was the most messy of all and would need refactoring, if not the whlole script, but I still was very happy to get it down to a very subtle effect comparatively.
  4. Macrocosm Draegonne

    Subtle Texture Animation

    Ill put this one up now, its much better for what I had in mind, and of course is reliant on my UV setup as mentioned above in the thread. I am certain I will make this several times over again as I learn more and can do more, but I am happy now and should jump back to the graphics and mesh side of this to further enhance it on those fronts. Thanks everyone for the encouragement and super useful pointers! // Texture Plant Waver Chingus Based On LL Wind Speed // Script should be deleted after activated. float CYCLES_PER_SECOND = .06; integer FACES = ALL_SIDES; // Change if you want just one face float ANGLE_DEGREES = .8; default { state_entry() { llSetStatus(STATUS_PHANTOM,TRUE); llSetTimerEvent(4.00); // trigger timer event (max once per second) } timer() { vector windVector = llWind( ZERO_VECTOR); float windSpeed = llVecMag( windVector); integer windValue = llRound(windSpeed); float modSpeed = .1*llPow( llVecMag( windVector), .333333); // moderated speed //float windDirection = llAtan2( windVector.y, windVector.x); //integer compassWind = ( 450 - (integer)( RAD_TO_DEG*windDirection))%360; llSetTimerEvent(1.0+llFrand(12.0)); //trigger the timer event every 12 seconds float angleRadians = ANGLE_DEGREES * DEG_TO_RAD; llSetTextureAnim( ANIM_ON | SMOOTH | ROTATE | LOOP | PING_PONG , FACES, 1, 1 // (These parameters ignored for ROTATE animation) , -angleRadians // Start angle in radians , modSpeed * .02 // Length of animation in radians ,CYCLES_PER_SECOND * llFrand(0.66) * modSpeed); } }
  5. Macrocosm Draegonne

    Subtle Texture Animation

    Yea, that was the right angle to go on, I have it much much more subtle now with more variation too.
  6. Macrocosm Draegonne

    Subtle Texture Animation

    I was able to modulate the number a bit with that function from the sailing script, however, its all very tinkery, I am almost there, but its still too fast and active compared to similar plant animations ive seen out in the realms, it keeps getting better as I learn more though. The trouble is as I tweak the number lower to get a slower speed the animation then breaks, and the texture splits up and/or stops moving all together. 😭 Below is my latest code tinkering with using the wind speed. EDIT: Improved by reducing the angle, so tinkering around more with that area more might yield more interesting results, to get a mix for low wind vs high wind. // Texture Plant Waver Chingus Based On LL Wind Speed // Script can be deleted after activated. float CYCLES_PER_SECOND = .04; integer FACES = ALL_SIDES; // Change if you want just one face float ANGLE_DEGREES = .3; default { state_entry() { llSetStatus(STATUS_PHANTOM,TRUE); llSetTimerEvent(6.00); // trigger timer event (max once per second) } timer() { vector windVector = llWind( ZERO_VECTOR); float windSpeed = llVecMag( windVector); integer windValue = llRound(windSpeed); float modSpeed = .1*llPow( llVecMag( windVector), .333333); // moderated speed //float windDirection = llAtan2( windVector.y, windVector.x); //integer compassWind = ( 450 - (integer)( RAD_TO_DEG*windDirection))%360; //llSetTimerEvent(1.0+llFrand(12.0)); //trigger the timer event every 15 seconds float angleRadians = ANGLE_DEGREES * DEG_TO_RAD; llSetTextureAnim( ANIM_ON | SMOOTH | ROTATE | LOOP | PING_PONG , FACES, 1, 1 // (These parameters ignored for ROTATE animation) , -angleRadians // Start angle in radians , angleRadians * .2 // Length of animation in radians //, llFrand(0.2) - CYCLES_PER_SECOND); //, windValue / CYCLES_PER_SECOND); , modSpeed ); } }
  7. Macrocosm Draegonne

    Subtle Texture Animation

    Oooh, thats interesting, I had not found that page when searching wind stuff. Really smart to peg on that 0,0,0 spot for consistency, I will tinker with that for sure, also I did not know you could sail the winds in SL, thats new to me also are very cool. Cheers!
  8. Macrocosm Draegonne

    Subtle Texture Animation

    Omg I have so many questions, I love learning a new language, you only get this feeling for so long heheh. I have had to stop myself so many times from coming here with a million questions, and then, no, get back to digging and testing, and tinkering. LSL is quite different than i am used to doing with web stuff. Im currently trying to reduce the number of the wind speed to fit nicely into the last section of the llSetTextureAnim anything too high and its really a bit much. ive tried all sorts of things. Using a simple division messes up on rare occasion when it falls below zero, the texture goes off all cockeyed. In my mind I want an array/list of values, I could use llRound to turn the windspeed into a single digit, and then on my array associate a small number to each range of those windspeeds, which then can be passed down to llSetTextureAnim in the last spot for Float Rate. But there are many other ways I could do this too, instead of float rate maybe tweaking the Float Length, or both? lol so many things to test, I imagine it will change a lot over time as I learn more.
  9. Macrocosm Draegonne

    Subtle Texture Animation

    windSpeed / CYCLES_PER_SECOND 😲 are we ok with using llWind on things? it works perfectly, no need to randomize the speed anymore, I just need make it more subtle and all of them in the area are now synced because, wind, wow this is cool! 🤓
  10. Macrocosm Draegonne

    Subtle Texture Animation

    Thanks so much for the tips and encouragement, I will dig into the wiki on that more and tinker with adding an extra ..llFrand(1) seems like it would be nice for them to go dormant from time to time. Im also going to switch to deal with linksets using llSetLinkTextureAnimation probably. Thanks for letting me know about viewer/server strain area too, I really wanted to be sure I wasnt going to hurt performance as that is a primary goal of mine. I am actually really pleased with how well it performs, and its super smooth too, once you get the numbers just right so its not jumpy, and let me tell ya, that texture animation can fly at blazing speed! lol made me dizzy a few times. I will be doing many weird things with it in due time I hope. Sometimes I really like the code to have a cozy macro view pattern, it helps me to jump into the different areas as the code gets larger and larger, especially when I am thinking of the code, I can mentally zoom in and out of the pattern lol. 🤪 Im not sure what syntax highlighing to use in Brackets though, I saw some lsl ones in github but not for brackets. Luckily there is a GLSL one that seems to work nicely built into Brackets, and also the C syntax highlighters seem to look well enough too.
  11. Macrocosm Draegonne

    Subtle Texture Animation

    The randomization is working great but Im wondering if thats the best thing, maybe something of a preset thats seemingly random anim would be better performant for more people? I want this to be as lightweight as possible so I can have more plants moving, works great on my PC but im wondering if the timers are the best route? Also id like to introduce some spans of time with no animation so maybe adding a third timer cycle for that, or somehow injecting a zero in cycles_per_second on occasion? Are timers taxing on the viewer/server? Below is my latest code, feel free to laugh at my newbiness and poke holes in the approach lol. Its more properly formatted now at least. // Texture Plant Waver Chingus With Randomization // Script can be deleted after activated. float CYCLES_PER_SECOND = 0.02; integer FACES = ALL_SIDES; // Change if you want just one face float ANGLE_DEGREES = 0.5; default { state_entry() { llSetTimerEvent(5.00); // trigger timer event (max once per second) } timer() { llSetTimerEvent(1.0+llFrand(15.0)); //trigger the timer event every 15 seconds float angleRadians = ANGLE_DEGREES * DEG_TO_RAD; llSetTextureAnim( ANIM_ON | SMOOTH | ROTATE | LOOP | PING_PONG , FACES, 1, 1 // (These parameters ignored for ROTATE animation) , -angleRadians // Start angle in radians , angleRadians * 2.0 // Length of animation in radians , llFrand(0.04) - CYCLES_PER_SECOND); } }
  12. Macrocosm Draegonne

    Subtle Texture Animation

    Yeah, especially goodies like that, zero script need at all! I will have to thin out my grass density in the texture a touch, but I love the animation. It will take some tweaking to get the randomization and animation just right but its fun anyway. I want it to be really subtle and randomish. The most epic would be vertex animations dictated by Linden Wind and weight paint on the mesh, but thats not a thing here at the moment. The texture anim is a great fall back though, especially the more subtle I can get it. Im also putting several other plants on the same texture to save draw calls, so the uv map is going to be a lot of odd offset fun with this one hehe.
  13. Macrocosm Draegonne

    Subtle Texture Animation

    It worked! But I did it backwards lol, it will work next upload though, cheers!❤️ I would have never thought of that as a solution, I was all digging into a code solution.
  14. Macrocosm Draegonne

    Subtle Texture Animation

    Well, there will be flexymesh at some point, I saw that somewhere. Thats a cool Idea about flexies I bet it was great for grasses, and being able to tie it to wind is nice as well, I was reading the legacy linden tree's have a lot of cool features like that too, but they're gone now.
  15. Macrocosm Draegonne

    Subtle Texture Animation

    Yes I created the mesh and textures, though im not sure I understand fully what you mean by center. Move the uv section off the imagespace onto a repeat area in blender? Or change the texture so the plant image is in the upper space and thus the uv is as well?
×