Cinder Darkheart Posted October 4, 2019 Share Posted October 4, 2019 I'm on a witch hunt here lol. I'm in need of texture "Texture Rotation" that slides smoothly and stops on a given float. I'm already using TextureAnim and so that will not work for what I need. Any tips on how I would go about doing this. Link to comment Share on other sites More sharing options...
Qie Niangao Posted October 4, 2019 Share Posted October 4, 2019 Tell us more about the texture animation you're already doing. Maybe there's some way to do whatever that is some other way, allowing you to use texture animation to do this smooth texture rotation effect. There's not much of an appealing substitute. You can certainly write a loop to spin a texture around and stop at a point -- that's easy, but it will not look "smooth" in the viewer because every cel of motion needs to be generated by the sim individually and shipped as an object update to the viewer, subject to network jitter, etc. (to say nothing of the script lag of the loop). In some very simple cases, it's possible to rotate the whole object with llTargetOmega while animating the texture on some face of the object. This is almost certainly not going to work here, but we just don't know enough about this application to rule it out. Link to comment Share on other sites More sharing options...
Cinder Darkheart Posted October 4, 2019 Author Share Posted October 4, 2019 taking region wind and applying to a mesh I made, I want the texture to move with the wind do not really have to be smooth just not jumpy as it I will only fire off ever 10 to 15 mins but I don't want the jump to be to fast aiming keep it from being seen if any one is looking at it. Link to comment Share on other sites More sharing options...
Qie Niangao Posted October 4, 2019 Share Posted October 4, 2019 I'm not quite understanding the application yet, and this sample code is very simplistic so I'm not sure this is useful, but here's a way to rotate a texture without using texture animation: float textureRot = 0.0; // starting rotation default { state_entry() { llSetTimerEvent(0.1); // seconds per update } timer() { textureRot += 0.02; // step size (radians) if (textureRot > PI) // max texture rotation llSetTimerEvent(0.0); // stop rotating texture else llSetLinkPrimitiveParamsFast( 0, // link number [ PRIM_TEXTURE, 0 // face to rotate texture on , TEXTURE_DEFAULT // texture (plywood for example) , <1,1,0> // repeats , ZERO_VECTOR // offsets , textureRot // rotation (radians) ]); } } If you don't have the texture UUID, it's possible to do this with llRotateTexture() but only with a built-in minimum 0.2 second delay between updates. Link to comment Share on other sites More sharing options...
Cinder Darkheart Posted October 4, 2019 Author Share Posted October 4, 2019 Thanks Qie I will give it a try, is add more detail to some prim water I'm making step one is down on getting the faces on the mesh right goal lol. step two is get the water to simulate wind blowing across the water. one thing I hated in all my years in sl water always see blah if you were using a prim for it. Just trying to make it more life like for me being I'm using specular mapping on my mesh to make it look that much sweeter! Link to comment Share on other sites More sharing options...
KT Kingsley Posted October 4, 2019 Share Posted October 4, 2019 Could you rotate a whole prim or a mesh model with a fixed texture to get the effect you want? In which case you might want to look at key framed motion for a nice smooth and precise result. Link to comment Share on other sites More sharing options...
Recommended Posts
Please take a moment to consider if this thread is worth bumping.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now