Database:Primshapes

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
m (Documenting undocumented fields as I figure them out.)
(Adding more info about ExtraParams, how it stores sculpts and mesh)
 
Line 97: Line 97:
 
<br />
 
<br />
 
Contains different data for each prim type.<br />
 
Contains different data for each prim type.<br />
Byte 1 contains the prim type and 0x30 is the type for mesh, which is kinda sorta like the asset type 49 for mesh.<br />
+
If the first byte is 0 there are no more ExtraParams. <br />
When a mesh, bytes 7 through 22 contain a 16 byte binary asset UUID of the mesh.<br />
+
If the first byte is 1 then you look at the next byte, it's meaning is: <br />
Rumor has it a sculpty texture asset is referenced the same way.<br />
+
FlexiEP = 0x10; <br />
The rest of the bytes in this blob contain ????
+
LightEP = 0x20; <br />
 +
SculptEP = 0x30; <br />
 +
ProjectionEP = 0x40; <br />
 +
MeshFlagsEP = 0x70; <br />
 +
On sculpts, the next 5 bytes have fixed constants: 00 11 00 00 00 (Hex). <br />
 +
Bytes 7 through 22 contain a 16 byte binary asset UUID of the sculpt texture.<br />
 +
Byte 23 contains the sculpt stitching type (cylinder sphere, etc).<br />
 +
The UUID is stored as a binary 16bit value, it must be converted to hex string format.<br />
 +
A sculpt of stitching type 5 is a mesh, the UUID references a mesh asset.
 
<br />
 
<br />
  

Latest revision as of 23:25, 30 July 2022


Primshapes Describes prim shapes, colors and textures       (back to Database Documentation)

The current structure of the Prims table is as follows:

Field Type Null Key Default Extra
Shape int(11) YES NULL
ScaleX double NO 0
ScaleY double NO 0
ScaleZ double NO 0
PCode int(11) YES NULL
PathBegin int(11) YES NULL
PathEnd int(11) YES NULL
PathScaleX int(11) YES NULL
PathScaleY int(11) YES NULL
PathShearX int(11) YES NULL
PathShearY int(11) YES NULL
PathSkew int(11) YES NULL
PathCurve int(11) YES NULL
PathRadiusOffset int(11) YES NULL
PathRevolutions int(11) YES NULL
PathTaperX int(11) YES NULL
PathTaperY int(11) YES NULL
PathTwist int(11) YES NULL
PathTwistBegin int(11) YES NULL
ProfileBegin int(11) YES NULL
ProfileEnd int(11) YES NULL
ProfileCurve int(11) YES NULL
ProfileHollow int(11) YES NULL
State int(11) YES NULL
Texture longblob YES NULL
ExtraParams longblob YES NULL
UUID char(36) NO PRI
Media text YES NULL

      (back to Database Documentation)




ScaleX ScaleY Scalez
The size of the prim in meters.


ProfileHollow
The percent size of the hole in the prim. Divide this integer by 500.0 to get the number you see in the build dialog.


Texture
Contains a list of up to 8 texture asset UUIDs for the 8 faces of the prim. If all the faces are the same only one UUID is present. Each UUID is stored as 16 BINARY bytes (not as hex strings) and must be converted to strings to use to search the asset table. Each UUID is followed by a single byte related to the face number that texture is on. Face 0 must always be last and has a face number 0 which terminates the list. 16 or more bytes follow the last texture assetUUID and these contain ????


ExtraParams
Contains different data for each prim type.
If the first byte is 0 there are no more ExtraParams.
If the first byte is 1 then you look at the next byte, it's meaning is:
FlexiEP = 0x10;
LightEP = 0x20;
SculptEP = 0x30;
ProjectionEP = 0x40;
MeshFlagsEP = 0x70;
On sculpts, the next 5 bytes have fixed constants: 00 11 00 00 00 (Hex).
Bytes 7 through 22 contain a 16 byte binary asset UUID of the sculpt texture.
Byte 23 contains the sculpt stitching type (cylinder sphere, etc).
The UUID is stored as a binary 16bit value, it must be converted to hex string format.
A sculpt of stitching type 5 is a mesh, the UUID references a mesh asset.


UUID
The UUID of this prim in database table Prims.

Personal tools
General
About This Wiki