P3D File Format - ODOLV40 Obsolete – Talk

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
m (Text replacement - "<code>" to "<code style="display: block">")
 
(2 intermediate revisions by 2 users not shown)
Line 1: Line 1:
I'm seeing a lot of varying structures dependant on model type.
I'm seeing a lot of varying structures dependant on model type.
<code><nowiki>//Legend
<code style="display: block"><nowiki>//Legend
//byte  = 1 char = 8 bits
//byte  = 1 char = 8 bits
//ulong  = unsigned long, 4 bytes
//ulong  = unsigned long, 4 bytes
Line 29: Line 29:
     ulong Something01; //Always? xh16000000, 22 - Exists in 3 odolv40's i've checked
     ulong Something01; //Always? xh16000000, 22 - Exists in 3 odolv40's i've checked
     byte Unknown[VariableLength]; //Length from 'Something01' to begining of anims.
     byte Unknown[VariableLength]; //Length from 'Something01' to begining of anims.
    ulong AnimationCount;
    ulong Unknown; //Seems to always be 09000000=9
     asciiz Animation;
     asciiz Animation;
};</nowiki></code>
};</nowiki></code>
Line 41: Line 43:


interesting LOD's seen so far...
interesting LOD's seen so far...
<code><nowiki>1100
<code style="display: block"><nowiki>1100
10000 = Shadow LOD
10000 = Shadow LOD
10010 = ?
10010 = ?
Line 54: Line 56:
--[[User:Sy|Sy]] 12:06, 17 June 2007 (CEST)
--[[User:Sy|Sy]] 12:06, 17 June 2007 (CEST)


<code><nowiki>struct Textures
<code style="display: block"><nowiki>struct Textures
{
{
     ulong  TextureCount;
     ulong  TextureCount;
Line 92: Line 94:
ulong FaceCount;</nowiki></code>
ulong FaceCount;</nowiki></code>


<code><nowiki>
<code style="display: block"><nowiki>
enum PixelShaderID
enum PixelShaderID
{
{
Line 103: Line 105:
</nowiki></code>
</nowiki></code>


<code><nowiki>
<code style="display: block"><nowiki>
enum VertexShaderID
enum VertexShaderID
{
{

Latest revision as of 11:52, 11 January 2023

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. ulong AnimationCount; ulong Unknown; //Seems to always be 09000000=9 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)