Talk:Avatar lad.xml

From Second Life Wiki
Jump to navigation Jump to search

Past and Future

I started playing with the LAD file before LL open sourced the client, I wanted to see if I could add a tail. I was very disappointed. The file gives the impression of great flexibility but that flexibility is only flesh deep, in some cases if new nodes are added they will be ignored (global_color for example). There is no way to define new textures for mesh. The mesh texture attribute is a name, while the texture manipulators require an index. New mesh cannot be added as they are hard coded, new mesh LOD cannot be added or removed as they are hard coded. The LAD file is well designed but the code that reads it is a hack job. -- Strife Onizuka 21:33, 1 December 2007 (PST)

Proposed Changes:

  • Insert a new level between the current nodes and "linden_avatar", name it "shape" with the attributes "name" and "id", allowing for other shape types to be defined later.

<xml><shape name="ruth" id="0" baked_textures="8"></shape></xml>

  • Load mesh and global color nodes dynamically.
  • Move texture specification into the LAD file.

<xml><textures> <texture id="0" name="head_bodypaint" baked="false" wearable="skin"/> <texture id="1" name="upper_shirt" baked="false" wearable="shirt"/> <texture id="2" name="lower_pants" baked="false" wearable="pants"/> <texture id="3" name="eyes_iris" baked="false" wearable="eyes"/> <texture id="4" name="hair" baked="false" wearable="hair"/> <texture id="5" name="upper_bodypaint" baked="false" wearable="skin"/> <texture id="6" name="lower_bodypaint" baked="false" wearable="skin"/> <texture id="7" name="lower_shoes" baked="false" wearable="shoes"/> <texture id="8" name="head_baked" baked="true"/> <texture id="9" name="upper_baked" baked="true"/> <texture id="10" name="lower_baked" baked="true"/> <texture id="11" name="eyes_baked" baked="true"/> <texture id="12" name="lower_socks" baked="false" wearable="socks"/> <texture id="13" name="upper_jacket" baked="false" wearable="jacket"/> <texture id="14" name="lower_jacket" baked="false" wearable="jacket"/> <texture id="15" name="upper_gloves" baked="false" wearable="gloves"/> <texture id="16" name="upper_undershirt" baked="false" wearable="undershirt"/> <texture id="17" name="lower_underpants" baked="false" wearable="underpants"/> <texture id="18" name="skirt" baked="false" wearable="skirt"/> <texture id="19" name="skirt_baked" baked="true"/> </textures></xml>

  • Set body_region attribute for mesh nodes (and use them)
  • Set bake_texture attribute for layer_set nodes, use it to map to a texture node.
  • Change mesh declare (makes reading easier)

<xml> <mesh type="hairMesh" lod="0" file_name="avatar_hair.llm" min_pixel_width="320"></mesh> <mesh type="hairMesh" lod="1" file_name="avatar_hair_1.llm" min_pixel_width="160" reference="avatar_hair.llm"></mesh> <mesh type="hairMesh" body_region="hair"> <lod lod="0" file_name="avatar_hair.llm" min_pixel_width="320" default_reference="true"/> <lod lod="1" file_name="avatar_hair_1.llm" min_pixel_width="160"/> <param ... /> <param ... /> </mesh></xml>