P3D v4 P3D v4 Compiler

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
#1
The P34 compiler is generating a Bgl which ADE cannot decompile.

So far I have found two element IDs which I haven't seen before: 62 (0x3e) and 64 (0x40)

I am also seeing an error with Apron records so it seems possible that the format of those has altered.

Since ADE decompiles the bgl file after compile to do some byte modification then compiling using the P34 bglcompiler will generate an error. I could disable this but basically at the moment ADE will not be able to decompile a bgl created by the P34 compiler.

I am not much good a reverse engineering byte files and it raises the question whether we could do this under the terms of use of the compiler. I am sure someone will be able to work out the byte changes but until we resolve this then you would need to use the P33 Compilers with ADE.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#2
Would be interesting to know what the changes are. The mdl format also has some differences.

Does the bglcomp documentation also show changes in the input xml?
 

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
#3
I had a quick look and to be honest I didn't see anything. I ran a quick test on one issue: I created an empty airport, compiled it and it decompiled fine. I added an apron and the decompile failed - one change is they way they are storing aprons.
 

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
#4
There are three changes I have found so far:
  1. New ID for Runways
  2. New ID for Taxiways
  3. Some sort of change to Aprons
In the case of the first two LM have clearly changed the compiled format and content for these elements. They have new IDs which their compiler generates. Presumably so they can have different and/or additional properties for these. In the last case their compiled format triggers a decompile error in some guard code for aprons. Disabling that guard code does not seem to have any effect on the resultant decompiled aprons.

I haven't looked any further as to what the detail of the changes might be. Also there may be others that have not triggered errors from my decompiler
 
#5
LM collaborator replies often refer to both ADE and MCX for solving problems or to see what could be wrong. But I do not see neither Arno nor Jon asking questions in their forum.
Maybe it would be a good idea to face them personally with the issues you have on their own forum? And maybe you even get answers;)?
Just a thought:).
 

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
#6
Thanks Roby. I do have links with LM and one of their divisions have ADE licenses. Also l do know the change that have been made in the v4 compiler. The next update should decompile bgl files created by the v4 compiler.
 

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
#8
The changes I have found so far are in three elements: Runway, Taxi Path and Apron. In each case LM has added a new property called materialSet. This seems to allow the user to override the default seasonal materials for that specific element. It is in the form of a GUID. Maybe someone can tell me about material sets?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#9
Not sure if it's the same, but autogen also uses them. They are defined in materials.spb.

That would be great that materials could be customised to match the look and feel of an airport.
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
#11
Yes, everything is a GUID in the engine :)

The material sets are layered so that they can be regionalised, etc.
 

scruffyduck

Administrator
Staff member
FSDevConf team
Resource contributor
#12
OK thanks. I know where the materialSet attribute is stored for runways and taxi links. Not yet sure where they are for aprons. for some reason they didn't change the ElementID for aprons and while the record size is 16 bytes bigger I am still looking for them.

Update
I found them after the draw flags
 

=rk=

Resource contributor
#13
it seems likely to me that this new mystery value is intended to be the switch that triggers the states of the PBR, which is supported in this version of P3D. If they seem to override default seasonal settings, or allow for customization; would not an ambient condition, like time of day, season of year, or even a temperature/humidity combination, be sufficient to define a unique state for the physically based render?
 
#14
Been using the P3D4 compiler since P3D4 was out, and only know these facts: Those compilations make a mess with FSX (why should I care). I also discovered if I don't recompile a model library from FS9 to FSX, I ain't gonna see any 3D objects, buildings.

Solution is simple: Recompile the original afcad. Reset draw flags. Throw away anyting VTPP or VTXX, make new flatten. Use McX to make the FS9 lib at least a FSX lib. Wow this done suddenly an airport is full of hangars or whatever porno which originally intended to be seen :stirthepo
 
#15
Here is a off the subject, side issue, perhaps:

A mutual friend has ADE 1.76.xxx (for P3D4) When he compiles he gets the extra white window with two buttons... one is for airport elevation, the other is for ground elevation. the ground elevation is checked.... the airport elevation is dimmed out. Is there a way to activate this airport elevation button so it can be checked?
 
Top