P3D File Format - ODOLV40 Obsolete – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 67: Line 67:
         float  Diffuse[4];
         float  Diffuse[4];
         float  forcedDiffuse[4];
         float  forcedDiffuse[4];
         float  Unknown[8];
        float  specular[4];
         float  Unknown[4];
         float  specularPower;
         float  specularPower;
         ulong  PixelShaderID; //Note: see enum below...
         ulong  PixelShaderID; //Note: see enum below...
Line 94: Line 95:
enum PixelShaderID
enum PixelShaderID
{
{
  AlphaShadow 12;
   NormalMapMacroASSpecularMap 20;
   NormalMapMacroASSpecularMap 20;
   NormalMapSpecularDIMap 22;
   NormalMapSpecularDIMap 22;
Line 104: Line 106:
enum VertexShaderID
enum VertexShaderID
{
{
  Basic 0;
   NormalMap 1;
   NormalMap 1;
   NormalMapAS 15;
   NormalMapAS 15;
Line 109: Line 112:
};
};
</nowiki></code>
</nowiki></code>
--[[User:Sy|Sy]] 16:32, 17 June 2007 (CEST)
--[[User:Sy|Sy]] 16:32, 17 June 2007 (CEST) --[[User:Sy|Sy]] 02:26, 18 June 2007 (CEST)
----
----

Revision as of 01:26, 18 June 2007

I'm seeing a lot of varying structures dependant on model type. //Legend //byte = 1 char = 8 bits //ulong = unsigned long, 4 bytes //ushort = unsigned short 2 bytes //asciiz = variable length zero terminated string. //float = 4 bytes (single precision) struct ODOLv40 } char Signature[4]; //"ODOL" ulong Version; //28hex, 40dec ulong LodCount; float Resolutions[LodCount]; byte Unknown[VariableLength]; //Length varies between models, end of Resolutions array to begining of Skeleton. struct Skeleton //Note: A Skeleton may not exist { asciiz SkeletonType; //eg. Weapon, OFP2_ManSkeleton byte Unknown; ulong BoneCount; struct BoneGroup { bool isBoneGroup; //Note: The 1st. bone is implied to be a 'group' but has no leading byte asciiz BoneName; }; }; byte Unknown; ulong Something01; //Always? xh16000000, 22 - Exists in 3 odolv40's i've checked byte Unknown[VariableLength]; //Length from 'Something01' to begining of anims. asciiz Animation; };

in the M16a4.p3d after animation 'magazine_hide\0' and 'reloadMagazine\0' there is...

Anim Sequencing?

Also, I think the first LOD in the file structure is always the 'Memory LOD' - Well at least it looks like it in m16a4.p3d, G36.p3d and us_soldier_sniper.p3d.

--Sy 17:15, 16 June 2007 (CEST)

interesting LOD's seen so far... 1100 10000 = Shadow LOD 10010 = ? 11000 = ? Hybrid LOD 11010 = ? 9.999999828e+012 = ? 9.99999987e+014 = ? 1.999999974e+015 = LandContact 5.000000136e+015 = HitPoints 6.999999976e+015 = ViewGeometry --Sy 12:06, 17 June 2007 (CEST)

struct Textures { ulong TextureCount; asciiz Texture[TextureCount]; //Note: a texture entry can be zero-length. ulong MaterialCount; struct Materials[MaterialCount]; { asciiz Material; ulong Unknown; //Note: always seems to be '0900 0000' = 9. float Emissive[4]; float Ambient[4]; float Diffuse[4]; float forcedDiffuse[4]; float specular[4]; float Unknown[4]; float specularPower; ulong PixelShaderID; //Note: see enum below... ulong VertexShaderID; //Note: see enum below... byte Unknown[38]; struct MaterialTextures { asciiz MaterialTexture; ulong Stage; }; byte Unknown[52]; struct Stages[StageCount]; //Note: total the number of stages from above. { ulong uvSource; float aside[3]; float up[3]; float dir[3]; float pos[3]; }; }; }; byte Unknown[8]; ulong FaceCount;

enum PixelShaderID { AlphaShadow 12; NormalMapMacroASSpecularMap 20; NormalMapSpecularDIMap 22; NormalMapMacroASSpecularDIMap 24; //... probably lots more... };

enum VertexShaderID { Basic 0; NormalMap 1; NormalMapAS 15; //... probably lots more... }; --Sy 16:32, 17 June 2007 (CEST) --Sy 02:26, 18 June 2007 (CEST)