manually doing .BCF generation.

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
MineElectricity
Posts: 2
Joined: Sat Aug 01, 2020 8:57 am

manually doing .BCF generation.

Post by MineElectricity »

Hi,

I have a project too big for blender, so I presently generate .ply, .scn and .cfg files using a script.
The problem being that I have way too many files and I loose considerable amounts of time in IO operations.

Thus, I would like to know how to directly make .bcf files, but I couldn't find any documentation.
My supposition was that it simply is .cfg followed by .scn and then by all the .ply written in binary and then compressed. But as pointed out on the discord server I may be wrong.

So if I could have a little help on how to write such files it would be greatly appreciated, otherwise I would do it by testing byte by byte an already generated .bcf file.

Thank you !
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: manually doing .BCF generation.

Post by Dade »

MineElectricity wrote: Sat Aug 01, 2020 9:05 am I have a project too big for blender, so I presently generate .ply, .scn and .cfg files using a script.
The problem being that I have way too many files and I loose considerable amounts of time in IO operations.

Thus, I would like to know how to directly make .bcf files, but I couldn't find any documentation.
My supposition was that it simply is .cfg followed by .scn and then by all the .ply written in binary and then compressed. But as pointed out on the discord server I may be wrong.

So if I could have a little help on how to write such files it would be greatly appreciated, otherwise I would do it by testing byte by byte an already generated .bcf file.
LuxCore has specific render engine to save scenes as text or binary format: it is called FILESAVER and the render just produces the files.

You can convert from any supported format (.cfg, .lxs, ect.) in binary format with the following command:

Code: Select all

pyluxcoretools.exe console -D renderengine.type FILESAVER -D filesaver.format BIN -D filesaver.filename exported-scene.bcf scenes/cornell/cornell.cfg
Or, if you are using a script to create the scene, you can directly save the scene in binary format. LuxCore API as explicit methods for this process (aside FILESAVER render engine).

LuxCore .bcf format in a serialization of memory scene using Boost serialization process, the output is pipelined with gzip to compress the output in roder to save space.
.bcf format is intended as a temporary format so it supported only across LuxCore tools of the very same version.

Boost serialization (and gzipping) may be a not particularly fast process so I'm not sure if it is really going to accelerate your process however copy around a single self-contained binary file is a lot easier and faster than many text files.
Support LuxCoreRender project with salts and bounties
MineElectricity
Posts: 2
Joined: Sat Aug 01, 2020 8:57 am

Re: manually doing .BCF generation.

Post by MineElectricity »

Hi and thank you for your quick response.

Code: Select all

Or, if you are using a script to create the scene, you can directly save the scene in binary format. LuxCore API as explicit methods for this process (aside FILESAVER render engine).
That is exactly what I am doing, though, I don't fully understand how to use LuxCore API's explicit methods, so I'll try to figure it out and come back to you if I'm really stuck, thank you.
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: manually doing .BCF generation.

Post by Dade »

MineElectricity wrote: Sun Aug 02, 2020 8:39 am That is exactly what I am doing, though, I don't fully understand how to use LuxCore API's explicit methods, so I'll try to figure it out and come back to you if I'm really stuck, thank you.
You have just to use RenderConfiog::Save() method: https://github.com/LuxCoreRender/LuxCor ... re.h#L1209
Support LuxCoreRender project with salts and bounties
Post Reply