Texture Change HUD โ
The bread and butter of Second Life fashion: a HUD with swatches that change the texture of a shirt. This guide builds one with 20 textures, a click sound and a reset, then finishes it for sale.
You need: a shirt (mesh, with named parts), 20 textures, a click sound, and a HUD object with 21 prims (20 swatches + 1 reset) or a single-prim HUD if you prefer UI Mode.
1. Prepare the shirt โ
Rez the shirt on the ground. With Edit linked on, name its parts:
body,collar,sleeves. Same-named parts get the same texture.Drag
*TARGETSinto the shirt and choose NEW.If the shirt uses PBR, also drop
[add-on] - PBR Managerin it.
2. Prepare the HUD โ
Rez the HUD. Name the swatch prims
tex_01โฆtex_20and the last onereset. Link them with the background as root.Drop
*BUILDand*FUNCTIONSinto the HUD's Content. Also drag in the 20 textures and the click sound.Open the panel link from chat.
3. Scan everything โ
Re-scan the buttons (left column).
tex_01โฆtex_20andresetappear.Targets โ Search for targets. The shirt appears with its 3 link names.
Assets โ Search for assets. The 20 textures and the sound appear.
4. The click helper โ
Click + next to Functions, name it
fx_click, Create.Open it and add Sound: Play, your click sound, volume 40. Save.
5. The first swatch โ
Click
tex_01in the left column. Its function opens.Add Activate Function โ
fx_click.Add Blinn-Phong: Target = the shirt, Link Names =
body,collar,sleeves, Faces = All, Diffuse = texture 1. Save.Build and click
tex_01in-world. The shirt changes and clicks. If not, see Troubleshooting.
6. Clone to the other 19 โ
Click the yellow ๐ on
tex_01.Hold Ctrl and click
tex_02,tex_03, โฆtex_20in the list. Release Ctrl and close the window.Open each
tex_xx, click the texture thumbnail on the Blinn-Phong card (Quick Swap) and pick its texture. Twenty times, about ten seconds each.
7. The reset button โ
Open reset, add Activate Function โ fx_click and a Blinn-Phong with the shirt's original texture. Optionally a Color <1,1,1> if you plan to add a Color Picker later.
8. Attach event โ
Open the Attach event and add Message (Owner): "Shirt HUD ready!". Optional, but customers like feedback.
9. Test as a customer โ
Take a copy of the HUD and the shirt to inventory, wear both, click through every swatch. Fix anything in the panel, Build, re-copy, re-test.
10. Finish โ
Press Finish!. The HUD loses its textures and *BUILD. Take it to inventory, box it with the shirt, done.
Variations โ
- Several bodies: make the other shirts synced targets; nothing changes in the HUD.
- PBR shirt: use PBR Custom or Material PBR instead of Blinn-Phong, and drop PBR Manager in the shirt.
- Single-prim HUD: draw the swatches in UI Mode; everything else is identical.
- Custom colors: add a Color Picker.
- Demo: see Demo Version.