Where are the official documentations for the .blend file format?

Looking to see if I can read portions of the .blend file format outside of Blender for a custom UE4 exporter with better feature support.

Alternatively I will just be using something like .collada

Welcome to the board.
Alas, there is no official documentation - by intent. Here are some related threads which, in part, go into why there isn’t a ‘Blender File Format Reference Manual.’

  1. [blend_info] Use Rust to inspect Blender files
  2. Blend file structure documentation
  3. .blend file errors

That said, if you could expand somewhat on what portions you want to consume and what you hope to accomplish, then perhaps some fellow traveler on this road can help with pointers. Thanks!



I wanted to process batches of files without having to load them into Blender, Sadly, As brecht said, Blend files are not intended to be read or written outside Blender.

I wrote a basic reader in C#, I provide it as is to understand.

1 Like

Just use: blender -b <blendfile> -P <bpy_script>

Hi everyone and thanks for the replies! :slight_smile:

I probably should have been a little more specific on what Im going for with this. Right now I mostly just wanna find a way of extracting PBR values from Blender principled bsdf node in a Blender addon to later on be able to pass over to a Unreal Engine material as a code contribution to Epic Games “Send to Unreal” addon.

To start with I would be happy if I could just grab single float values for each PBR channel for materials that arent using any complex node setups, but rather just the artist dragging the sliders directly on the principled bsdf node or even better would be if I could get the PBR channel values from the material output (so it would work no matter what kind of shader nodes are used in the material).

Alternatively if I can somehow extract GLSL from Blenders nodegraph and use some GLSL > HLSL converter and use that in Unreal Engine (tho this sounds a bit more complicated so Im not 100% sure if this would make a good solution for this project).

The reason for me asking about the .blend file format is just that I were digging around a bit about file formats yesterday after hearing that Send to Unreal currently uses Blenders fbx exporter and then just automating the import process in Unreal engine (which I thought sounded a little strange as theres so much data Blenders fbx exporter cant parse). After talking with one of the developers/maintainers on there Github he did say that fbx is not written in stone, so it seems there is the possibility of changing this to something that can handle more data types and one of the things that then came to mind was if one could maybe fetch any data as you like directly from the .blend file - making the only limit for what can be exported basically the time and effort we put into the project.

And the reason for “outside of Blender” was mostly just that it sounded simpler than having to use Blenders addon API to allow for less required maintenance as Blender evolves (and also that I prefer working in C++) - but maybe its not a better alternative then, especially without any documentation on the topic.

I should probably also say that I might be looking into adding support for exporting scene lights (with as many of its properties as possible) from Blender to Unreal - so having some kind of unified solution for fetching data from Blender would be nice.

There is a “Mystery Of The Blend” document included in the source tree, but that is woefully obsolete. An update I submitted (including information up to about Blender 2.72) was never accepted, so I published it here.

1 Like

BTW the blend_info link is an older version. I recently published a new blend_info crate (that’s how libraries are called in the Rust community):

blend_info crate

It can be used as a standalone executable to inspect .blend files (and their DNA). For Windows I do provide .msi installers in the download section of this two websites:

  1. rs-pbrt.org
  2. janwalter.org

The other usage is as a Rust crate (library), which I use for example in parse_blend_file, which can be seen in action here in a video. It can read and render (some) .blend files directly. It’s not well documented, but feel free to ask. Some use cases for the usage of both can be found on docs.rs and I hope to add more information or some blog posts soon …