Naiman Broome Posted December 8, 2021 Share Posted December 8, 2021 I would like to create a mesh with light bulbs , using a texture but I have no idea how to uvmap the balls or to arrange the texture like, any idea ? I wanted to use with a script so that the colors of each bulb change , illuminate , may be glow and flicker. 1 Link to comment Share on other sites More sharing options...
Profaitchikenz Haiku Posted December 8, 2021 Share Posted December 8, 2021 Each ball is going to have to be a separate face when uploaded, but typically you'd just have a few colours and therefore repeat the faces. If however you want to be clever and have marching colours flowing along the line of lights you might have to accept a higher LI siince each time the faces g upp by a multiple of 8 an extra prim equivalence is added. Link to comment Share on other sites More sharing options...
Naiman Broome Posted December 8, 2021 Author Share Posted December 8, 2021 I wanted to use a single face possibly couse i made a line of balls of like 32 balls or so , andi don't want it to become too primmy , I created a rainbow pattern that I wanted to smoothly slide in the bulbs but for some reason it doesn't flow as should there are half cuts in the look . Link to comment Share on other sites More sharing options...
Naiman Broome Posted December 8, 2021 Author Share Posted December 8, 2021 probably I need to understand how a script shows the texture, which is the difficulty I am having, what portion of the texture etc ... so I can arrange the uvmap accordingly ... Link to comment Share on other sites More sharing options...
Profaitchikenz Haiku Posted December 8, 2021 Share Posted December 8, 2021 Look in the LS wiki for llSetLinkTexture, also look at llSetLinkPrimitiveParamsFast(ii, [PRIM_TeXTURE, face...]) for how to use offsets and repeats and angles to put parts of a texture onto different faces Link to comment Share on other sites More sharing options...
Madelaine McMasters Posted December 8, 2021 Share Posted December 8, 2021 This is probably off-topic, but I'm reminded of a ball gown I saw some years ago which twinkled beautifully. I don't know for sure how it worked, but I got the feeling it might have been generating moiré effects by animating a patterned texture behind a patterned mask. As I cammed around the dress, the twinkling was clearly driven viewing angle, much as you might get from viewing bulbs through the branches and needles of a tree as you walk around (or spin) it. The effect was wonderful, with easily thousands of twinkling lights. Link to comment Share on other sites More sharing options...
animats Posted December 8, 2021 Share Posted December 8, 2021 The most efficient way would be to construct a string of lights with all the bulbs on the same face, but at different places in UV space. Then set up texture animation in UV space to scroll some long narrow texture past all the faces. Texture animation is nice for this because there's no script load - the viewer does all the work. 2 Link to comment Share on other sites More sharing options...
Profaitchikenz Haiku Posted December 8, 2021 Share Posted December 8, 2021 1 hour ago, Madelaine McMasters said: I got the feeling it might have been generating moiré effects by animating a patterned texture behind a patterned mask. Qie posted something about this a while back, hopefully his memory will be better than mine regarding the detail. Link to comment Share on other sites More sharing options...
Wulfie Reanimator Posted December 8, 2021 Share Posted December 8, 2021 (edited) Pretty much exactly what @animats said. Once you have created the lights, place each bulb at different areas of the UV area on a single axis (since you'll probably just be sliding the texture on one axis). Here are my lights, with a gradient texture applied: The first (left) bulb is in the center, then each one after that is horizontally offset by 0.2. You can do all of this with modifiers after creating/unwrapping a single light. No need to manually edit anything. You'll notice that the colors wrap around automagically when they go "outside" the UV bounds. How far apart you space them (or how much you stretch your texture on an axis) can produce some neat patterns. You'll also notice that the bulbs are tiny in the UV. I scaled them to 0, that way each bulb is given the same pixel-perfect color all around. Re: The Moire pattern This is pretty easy to produce by setting the texture repeat to something very high, like 100 or 10'000. A texture pattern helps, but most color data can produce a similar shimmer at very small scales as long as there's enough contrast. Or they could add tiny triangles with fullbright/glow on them, which can also create pretty neat non-blingy bling that has its own quirks. Edited December 8, 2021 by Wulfie Reanimator 2 1 Link to comment Share on other sites More sharing options...
ChinRey Posted December 8, 2021 Share Posted December 8, 2021 (edited) 2 hours ago, Madelaine McMasters said: This is probably off-topic, but I'm reminded of a ball gown I saw some years ago which twinkled beautifully. I don't know for sure how it worked, but I got the feeling it might have been generating moiré effects by animating a patterned texture behind a patterned mask. Was that one of Doe Silverspar's Shimmer dresses? One similar to this? (It really need an animated image to show how it works but those color patterns you see move around and twinkle as the avatar moves.) If it was one of these, she got that effect with some rather unconventional use of normal and specular maps. The effect is powered by avatar movements/animations though so it doesn't work for static objects. Speaking of cool twinkling effects, rez a prim and put this script in it: default{ state_entry(){ llSetLinkPrimitiveParams(LINK_THIS, [ PRIM_SIZE,<0.3,0.3,0.3>, PRIM_NAME,"Glitterball", PRIM_DESC,"Christmas Decoration 2013. Enjoy! :-)", PRIM_OMEGA,<0.0,0.0,0.666667>,0.015,1.0, PRIM_TYPE,PRIM_TYPE_SPHERE,ALL_SIDES,<0.0,1.0,0.0>,0.0,<0.0,0.0,0.0>,<0.0,1.0,0.0>, PRIM_TEXTURE,ALL_SIDES,"aaa32ac0-972b-6555-4673-5c7c53e94375",<30000.0,30000.0,0.0>,<0.0,0.0,0.0>,0.0, PRIM_COLOR,ALL_SIDES,<1.0,1.0,0.0>,1, PRIM_BUMP_SHINY,0,PRIM_SHINY_HIGH,PRIM_BUMP_DARK ] ); llRemoveInventory(llGetScriptName()); } } Play around with different bump maps, shininess values and colors if you like. Only, don't use too dark a color since it will reduce the effect. (The texture is by Linda Kellie who released it under a CC0 style license, free for anybody to use any way they like.) Edit: The script above works for spheres, semisphere created with 0.5 pathcut and cylinders with or without hollow. For toruses, tubes, rings and dimpled spheres, change this line: PRIM_OMEGA,<0.0,0.0,0.666667>,0.015,1.0, to: PRIM_OMEGA,<0.666667,0.0,0.0>,0.015,1.0, Edited December 8, 2021 by ChinRey Link to comment Share on other sites More sharing options...
animats Posted December 8, 2021 Share Posted December 8, 2021 Textures don't have to be square. Not sure how far you can push that. 1x1024? 1 Link to comment Share on other sites More sharing options...
Madelaine McMasters Posted December 8, 2021 Share Posted December 8, 2021 1 hour ago, ChinRey said: Was that one of Doe Silverspar's Shimmer dresses? One similar to this? (It really need an animated image to show how it works but those color patterns you see move around and twinkle as the avatar moves.) If it was one of these, she got that effect with some rather unconventional use of normal and specular maps. The effect is powered by avatar movements/animations though so it doesn't work for static objects. Speaking of cool twinkling effects, rez a prim and put this script in it: default{ state_entry(){ llSetLinkPrimitiveParams(LINK_THIS, [ PRIM_SIZE,<0.3,0.3,0.3>, PRIM_NAME,"Glitterball", PRIM_DESC,"Christmas Decoration 2013. Enjoy! :-)", PRIM_OMEGA,<0.0,0.0,0.666667>,0.015,1.0, PRIM_TYPE,PRIM_TYPE_SPHERE,ALL_SIDES,<0.0,1.0,0.0>,0.0,<0.0,0.0,0.0>,<0.0,1.0,0.0>, PRIM_TEXTURE,ALL_SIDES,"aaa32ac0-972b-6555-4673-5c7c53e94375",<30000.0,30000.0,0.0>,<0.0,0.0,0.0>,0.0, PRIM_COLOR,ALL_SIDES,<1.0,1.0,0.0>,1, PRIM_BUMP_SHINY,0,PRIM_SHINY_HIGH,PRIM_BUMP_DARK ] ); llRemoveInventory(llGetScriptName()); } } Play around with different bump maps, shininess values and colors if you like. Only, don't use too dark a color since it will reduce the effect. (The texture is by Linda Kellie who released it under a CC0 style license, free for anybody to use any way they like.) Edit: The script above works for spheres, semisphere created with 0.5 pathcut and cylinders with or without hollow. For toruses, tubes, rings and dimpled spheres, change this line: PRIM_OMEGA,<0.0,0.0,0.666667>,0.015,1.0, to: PRIM_OMEGA,<0.666667,0.0,0.0>,0.015,1.0, Yep, that looks familiar. Now that I'm thinking about this, I did some noodling with normal and specular maps years ago, and thought they might be used for some interesting effects. If I ever get some time, I'm gonna re-noodle. 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