Date : 2017-01-15 MasterPoppy
- [monso] Hair Script V2 HUD sample (32 hair color) HUD assembly sample 16 hair colors and 4 accessory colors on TAB1 and TAB2 Resize and Material on TAB3 Main HUD script and one DB script is needed for 32 colors.
- [monso] Hair Script V2 HUD sample (64 hair color) HUD assembly sample 32 hair colors and 4 accessory colors on TAB1 and TAB2 Resize and Material on TAB3 Main HUD script and two DB scripts are needed for 64 colors.
- [monso] Hair Script V2 CLIENT sample (With Resize) Run function (change texture, resize, restore size, material on/off, remove script) by command from HUD.
- [monso] Hair Script V2 CLIENT sample (No Resize) Run function (change texture, material on/off, remove script) by command from HUD.
- UUID List Maker Automatic texture UUID list maker for supporting data input.
- Delivery Specification (this document)
Prim name of button is used as command to run Client script.
Following names are reserved keyword, so other name to be used for texture change button.
TAB1
, TAB2
, TAB3
, TAB4
,
+MATERIAL
, -MATERIAL
, RESIZE
, RESTORE
, REMOVE_SCRIPT
,
XYZ+++
, XYZ++
, XYZ+
, XYZ---
, XYZ--
, XYZ-
,
X+++
, X++
, X+
, X---
, X--
, X-
,
Y+++
, Y++
, Y+
, Y---
, Y--
, Y-
,
Z+++
, Z++
, Z+
, Z---
, Z--
, Z-
Button named shown as following table rotates Z-Axis of HUD object in default configuration.
Button Name | Factor [degree] | Remarks |
---|---|---|
TAB1 | 0.0 | |
TAB2 | 90.0 | |
TAB3 | 180.0 | |
TAB4 | 270.0 | Not used in sample HUD |
"X-" side of prim for button to be faced forward. Other side face cannnot be handled to prevent miss oparations in other TAB page.
HUD script and Client script needs PRODUCT_ID
.
PRODUCT_ID
is used to generate listen channnel.
Recomended to change product per product.
integer PRODUCT_ID = 7275;
HUD has two type script. Number of DB script can be one at least, or more as needed. It is recomended that free memory is 10 kbyte/script or upper. Please refer to the FreeMemory information when you save the script.
[FreeMemory] 16.42 / 64 kbyte @ `[monso] Hair Script V2 DB`
Script Name | Data type | Required Q'ty |
---|---|---|
[monso] Hair Script V2 HUD | Material (Normal Map & Specular Map) | 1 |
[monso] Hair Script V2 DB | Texture (Diffuse Map) | 1 or more as needed |
Texte UUID should be defined in list listUUID
on the head of each script.
UUID List Maker is helpful for this data preparation.
list listUUID = [
// "TextureName", "TextureUUID"
"hair_mixed_basic8_root", "9f5f6ff2-957b-9328-fbf3-26003108c8e2",
"hair_mixed_basic8_root_alpha1", "23aa44a8-6e03-49a7-9657-711d6a59661f",
"hair_mixed_basic8_root_alpha2", "68e653d9-2695-80e3-c1d9-23fe5d3df5b4",
"SampleTex1", "44c78d32-845c-d586-b213-530eb7f7ecd9",
"SampleTex2", "50330856-2510-bb1c-4ff2-838aa7d706aa",
"SampleTex3", "9bfaf28e-88e4-9d6e-98af-4f208112f61f",
"SampleTex4", "cc5ac2fc-efeb-701a-92df-15bb28792cda",
"SampleTex5", "dead6094-76a7-9fa8-1630-cbad1ace8000",
"SampleTex6", "63c205c9-1f5a-c07c-1d0d-d42d5889a3b2",
"SampleTex7", "078a7d3d-f1e8-8b67-07ec-bc32598a47db",
"SampleTex8", "3fa95aa6-c0ae-16ca-ff40-d13f378994fa",
0];
Button and Texture and Material is associated with list listMATERIAL
(HUD script) and list listTEXTURE
(DB script).
Horizontal Scale, Vertical scale and Repeats per meter is loaded from the product prim and duplicated automatically, so they are not necessary to input in HUD and DB script.
HUD script
Button name for material (normal & specular) change is reserved as +MATERIAL
& -MATERIAL
;
list listMATERIAL = [
// (NumOfData)
// "PrimName", FaceNum(0-7), "TextureName(NomalMap)", "TextureName(SpecularMap)", <Specular_Color>, Specular_Glossiness, Specular_Environment
// Note:All Face of sides: FaceNum=-1
// Note:Buttom Name for material is reserved as "+MATERIAL" & "-MATERIAL".
5,
"hair1", 0, "hair_nm", "hair_sp", <1,1,1>, 70, 1, // Apply to single face
"hair2", -1, "hair_nm", "hair_sp", <1,1,1>, 70, 1, // Apply to all face
"hair3", 0, "hair_nm", "hair_sp", <1,1,1>, 70, 1, // Apply to multiple face
"hair3", 1, "hair_nm", "hair_sp", <1,1,1>, 70, 1,
"hair3", 2, "hair_nm", "hair_sp", <1,1,1>, 70, 1,
0];
DB script Button name for texture (diffuse map) change to be inputed manually;
list listTEXTURE = [
// "ButtonName", (NumOfData)
// "PrimName", FaceNum(0-7), "TextureName",
// Note:RootPrim="root"
// Note:All Face of sides: FaceNum=-1
"A01", 5,
"hair1", 0, "hair_mixed_basic8_root", // Apply to single face
"hair2", -1, "hair_mixed_basic8_root_alpha1", // Apply to all face
"hair3", 0, "hair_mixed_basic8_root_alpha2", // Apply to multiple face
"hair3", 1, "hair_mixed_basic8_root_alpha2", // Apply to multiple face
"hair3", 2, "hair_mixed_basic8_root_alpha2", // Apply to multiple face
"A02", 5,
"hair1", 0, "SampleTex2", // Apply to single face
"hair2", -1, "SampleTex2", // Apply to all face
"hair3", 0, "SampleTex2", // Apply to multiple face
"hair3", 1, "SampleTex2", // Apply to multiple face
"hair3", 2, "SampleTex2", // Apply to multiple face
// *SNIP*
0];
Resize(XYZ) and Restore can be handled on both of HUD touch and dialog.
Stretch can be handled on dialog only.
Button RESIZE
call the following dialog.
The following mode and factors are available for resize function in default configuration. Factors are defined in Client script.
Mode | X | Y | Z |
---|---|---|---|
XYZ+ | +1% | +1% | +1% |
XYZ++ | +5% | +5% | +5% |
XYZ+++ | +10% | +10% | +10% |
XYZ- | -1% | -1% | -1% |
XYZ-- | -5% | -5% | -5% |
XYZ--- | -10% | -10% | -10% |
X+ | +1% | ||
X++ | +5% | ||
X+++ | +10% | ||
X- | -1% | ||
X-- | -5% | ||
X--- | -10% | ||
Y+ | +1% | ||
Y++ | +5% | ||
Y+++ | +10% | ||
Y- | -1% | ||
Y-- | -5% | ||
Y--- | -10% | ||
Z+ | +1% | ||
Z++ | +5% | ||
Z+++ | +10% | ||
Z- | -1% | ||
Z-- | -5% | ||
Z--- | -10% |
Button REMOVE_SCRIPT
call the following dialog.
Clicking OK will delete Client script with message for owner.
Client Script has PRODUCT_ID
that must be the same as HUD script.
There is no user input except PRODUCT_ID
, but should be selected in accordance with mesh type of the product.
There are two types of Client script.
Type | Description |
---|---|
TypeA | With resize function, for non-rigg mesh. |
TypeB | Without resize function, for rigged mesh. |
Communication method between HUD and Client is HTTP Protcol.
HTTP Protcol is faster than usual method Listen
.
But HTTP requests are throttled at approximately 25 requests per 20 seconds. HUD script freezes 0.8 seconds after texture change or resize to prevent crash.
Transmitting and receiving data (including texture UUIDs) between scripts is secured by encrypted with llXorBase64
.
It is difficult for cryptanalysis without leakage of encryption keys defined in each script.
The charge is L$10,000.