Difference between revisions of "Mesh/Mesh Asset Format"

From Second Life Wiki
Jump to navigation Jump to search
Line 16: Line 16:
* "low_lod" -- Optional, low level of detail, must NOT be present if "medium_lod" is absent
* "low_lod" -- Optional, low level of detail, must NOT be present if "medium_lod" is absent
* "lowest_lod" -- Optional, lowest level of detail, must NOT be present if "low_lod" is absent
* "lowest_lod" -- Optional, lowest level of detail, must NOT be present if "low_lod" is absent
<br>
<br>
<br>
Each level of detail entry must contain the following elements:
Each level of detail entry must contain the following elements:

Revision as of 13:25, 7 June 2011

Overview

This document is a specification of the mesh asset format used by Second Life. At its highest level, a mesh asset is a collection of data blocks spread across a file. The sizes, locations, and types of the data elements are described in the header at the beginning of the file. This document will describe the format of the header and each of the data block types it may reference.

Header

The header is an uncompressed, binary encoded LLSD map containing the following elements:

Versioning and Creator Information

  • "version" -- integer -- A version number for the entire asset, filled in by simulator post-import.
  • "creator" -- UUID -- agent id of the agent that uploaded the asset, filled in by simulator
  • "date" -- LLDate (as LLSD, seconds since epoch UTC) of upload, filled in by simulator

Level of Detail

Up to four level of detail blocks may be specified. Level of detail block names are:

  • "high_lod" -- Highest level of detail mesh for this asset, MUST be provided
  • "medium_lod" -- Optional, medium level of detail
  • "low_lod" -- Optional, low level of detail, must NOT be present if "medium_lod" is absent
  • "lowest_lod" -- Optional, lowest level of detail, must NOT be present if "low_lod" is absent


Each level of detail entry must contain the following elements:

  • "offset" -- integer -- the offset (in bytes) of the level of detail block in the asset starting from the end of the header
  • "size" -- integer -- the size (in bytes) of the level of detail block

Mesh Level of Detail Block

Skin Block

Physics Mesh Block

Physics Convex Block

Physics Havok Block

Physics Cost Data