P3D File Format - ODOLV4x – Talk

From Bohemia Interactive Community
Revision as of 19:24, 9 January 2009 by T D (talk | contribs)
Jump to navigation Jump to search

In structSkeleton the data type bool is used. Is it 1 byte with possible values 0 and 1? --Vektorboson 22:55, 19 July 2008 (CEST)

Yes, I believe it is. Amended, article to a 'byte' with 0x00=false, 0x01=true. -- Sy 04:56, 20 July 2008 (CEST)


I will use this page to keep track of some of my thoughts: --T_D 23:56, 3 January 2009 (CET)

  1. ModelProxies should be part of structResolution imo
  2. byteArrayUnknown1 could consist of at least a few floats
  3. Unknown could contain something like modelCenter or boundingBox
  4. Mass data should be somewhere


Yeah, sorry, haven't updated this article in a long time. Quite, alot of extra info. could be added but tbh haven't had the motivation and of course some or all of the stuff may or may not be accurate.
Here's the area 'tween the Header and the Skeleton...
//------------------------------------------
br.ReadInt32();
this.ModelInfo.Sphere = br.ReadSingle();
br.ReadBytes(36);
this.ModelInfo.ViewDensity = br.ReadSingle();
br.ReadBytes(24);
this.ModelInfo.ModelVertexOffset_x = br.ReadSingle();
this.ModelInfo.ModelVertexOffset_y = br.ReadSingle();
this.ModelInfo.ModelVertexOffset_z = br.ReadSingle();
br.ReadBytes(12);
this.ModelInfo.ModelCentreOfGravity_x = br.ReadSingle();
this.ModelInfo.ModelCentreOfGravity_y = br.ReadSingle();
this.ModelInfo.ModelCentreOfGravity_z = br.ReadSingle();
this.ModelInfo.ModelMassVector1_x = br.ReadSingle();
this.ModelInfo.ModelMassVector1_y = br.ReadSingle();
this.ModelInfo.ModelMassVector1_z = br.ReadSingle();
this.ModelInfo.ModelMassVector2_x = br.ReadSingle();
this.ModelInfo.ModelMassVector2_y = br.ReadSingle();
this.ModelInfo.ModelMassVector2_z = br.ReadSingle();
this.ModelInfo.ModelMassVector3_x = br.ReadSingle();
this.ModelInfo.ModelMassVector3_y = br.ReadSingle();
this.ModelInfo.ModelMassVector3_z = br.ReadSingle();
this.ModelInfo.AutoCenter = br.ReadByte();
this.ModelInfo.lockAutoCenter = br.ReadByte();
this.ModelInfo.canOcclude = br.ReadByte();
this.ModelInfo.canBeOccluded = br.ReadByte();
this.ModelInfo.allowAnimation = br.ReadByte();
br.ReadBytes(6);
//------------------------------------------
btw... the ModelInfo.ModelMassVector1_blah's are inaccurately identified, just old placeholder names that have never been updated.
Cheers, -- Sy 10:59, 6 January 2009 (CET)