Skip to content

Instantly share code, notes, and snippets.

@foone
Created March 1, 2021 17:14
Show Gist options
  • Star 11 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save foone/4bd3d9ca059d59e070d1e2aed7ddfe36 to your computer and use it in GitHub Desktop.
Save foone/4bd3d9ca059d59e070d1e2aed7ddfe36 to your computer and use it in GitHub Desktop.
The DAM 3D format of Matterport
// type i
message DAMFile {
repeated Chunk chunk = 1;
repeated QuantizedChunk quantized_chunk = 2;
}
// type "o"
message Chunk {
required Vertices vertices = 1;
required Faces faces = 2;
required string chunk_name = 3;
required string material_name = 4;
}
// type "h"
message QuantizedChunk{
required string chunk_name = 1;
required string material_name = 2;
required QuantizedVertices vertices = 3;
repeated QuantizedUVs uvs = 4;
required Faces faces = 5;
}
// type r
message QuantizedVertices{
required float quantization = 1;
repeated float translation = 2 [packed=true];
repeated sint32 x = 3 [packed=true];
repeated sint32 y = 4 [packed=true];
repeated sint32 z = 5 [packed=true];
}
// type n
message Faces{
repeated int32 faces = 1 [packed=true];
}
// type a
message QuantizedUVs{
required string name = 1;
required float quantization = 2;
repeated sint32 u = 3 [packed=true];
repeated sint32 v = 4 [packed=true];
}
// type s
message Vertices {
repeated float xyz = 1 [packed=true];
repeated float uv = 2 [packed=true];
}
@1e1001
Copy link

1e1001 commented Mar 1, 2021

Damn

@yogo-zhangyingzhe
Copy link

You were brilliant。
How did you get this file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment