Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- NVR Documentation
- Header 28 Bytes:
- ------------------------------------
- UInt Magic;
- UInt Version;
- UInt MaterialCount;
- UInt VertexBufferCount;
- UInt IndexBufferCount;
- UInt MeshCount;
- UInt NodeCount;
- Read Material:
- Read 816 Bytes, store within this struct:
- Byte Name[260];
- UInt MaterialType;
- ColorValue m_DiffuseColor;
- Byte DiffuseTextureName[260];
- ColorValue m_EmissiveColor;
- Byte EmissiveTextureName[260];
- Structure Note:
- --------------------------------------------------------------------------------
- ColorValue Struct:
- float r;float g;float b;float a;
- --------------------------------------------------------------------------------
- Next Data is read, note some previous data seems to be copied into this:
- Read 2988 Bytes:
- Byte Name[260];
- UInt MaterialType;
- Uint Flags;
- Channel Channels[8];
- Structure Note:
- --------------------------------------------------------------------------------
- Channel Struct:
- ColorValue _Color;
- Byte TextureName[260];
- Matrix44f m_Transform;
- Matrix44f Struct:
- Float f00;Float f01;Float f02;Float f03;Float f10;Float f11;Float f12;Float f13;Float f20;Float f21;Float f22;Float f23;Float f30;Float f31;Float f32;Float f33;
- Float r11;Float r12;Float r13;Float r14;Float r21;Float r22;Float r23;Float r24;Float r31;Float r32;Float r33;Float r34;Float r41;Float r42;Float r43;Float r44;
- Float Data[4][4];
- Int i00;Int i01;Int i02;Int i03;Int i10;Int i11;Int i12;Int i13;Int i20;Int i21;Int i22;Int i23;Int i30;Int i31;Int i32;Int i33;
- UInt u00;UInt u01;UInt u02;UInt u03;UInt u10;UInt u11;UInt u12;UInt u13;UInt u20;UInt u21;UInt u22;UInt u23;UInt u30;UInt u31;UInt u32;UInt u33;
- Byte u[16]; s0; Byte u[16]; s1;Byte u[16]; s2;Byte u[16]; s3;
- Float m[4][4];
- --------------------------------------------------------------------------------
- Loop for Material Count
- Vertex Buffer:
- UInt Length;
- Read VertexBuffer for Length
- Loop for Vertex Buffer Count
- Index Buffer:
- UInt Length;
- IndexBufferFormat Format; //Either 0x65 or 0x66, specify if 16 or 32?
- Read IndexBuffer for Length
- Loop for Index Buffer Count
- Meshes:
- Read 96 Bytes:
- UInt m_QualityLevel;
- Sphere BoundingSphere;
- Box3f m_BoundingBox;
- UInt Material;
- IndexedPrimitive IndexedPrimitive[2];
- Structure Note:
- --------------------------------------------------------------------------------
- Sphere Struct:
- Vector3f mCenter; //Float x; Float y; Float z;
- float mRadius;
- Box3f Struct:
- Vector3f mMin;
- Vector3f mMax;
- IndexedPrimitive:
- UInt VertexBuffer;
- UInt FirstVertex;
- UInt VertexCount;
- UInt IndexBuffer;
- UInt FirstIndex;
- UInt IndexCount;
- --------------------------------------------------------------------------------
- Loop for Mesh Count
- Nodes:
- 40 Bytes:
- Box3f BoundingBox;
- UInt FirstMesh;
- UInt MeshCount;
- UInt FirstChildNode;
- UInt ChildNodeCount;
- Loop for node count
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement