LEGO Digital Designer Geometry Files (.g & .g*) to .obj (or equivalent)

Skeletons, animations, shaders, texturing, converting, fixing and anything else related to read game models
ProfBrickkeeper
Posts: 13
Joined: Mon Jun 13, 2016 7:52 pm

LEGO Digital Designer Geometry Files (.g & .g*) to .obj (or equivalent)

Post by ProfBrickkeeper »

Hello,

To assist me with a rendering project I am currently working on, I am looking for assistance in converting the LEGO Digital Designer geometry files (.g) to .obj or an equivalent format. Currently, no documentation exists for the format, but many others have been able to make sense of it in the past, so I do not expect that to be a major issue. The complete models are housed across multiple files, with the base mesh housed in a .g file and (depending of the needs of the model) decorated, UV mapped portions of the mesh contained in numbered .g* (ex. .g1, .g2, etc.) of the same root name. Previous converters have typically dealt with the issue of being unable to stitch together the data from the geometry files into a cohesive mesh, and have also not been able to support the UV maps, which I hope this effort will remedy.

To assist in attempts to figure out and convert the format, I have provided a small copy of the database, which can be downloaded HERE. The geometry files are found in the "Primitives/LOD0" folder, decorations are found in the "Decorations" folder, and the "DecorationMapping.xml" file dictates which decorations (by ID) get mapped to which brick ID, and on which surface (presumably, the surface ID is related to the number found at the end of .g* files).

Thanks for all the help!