sunfei
October 27, 2021, 7:28am
1
1.blend.xml (1.5 MB)
No response for a quite long time. Only 1487kb. There are many objects reuse same mesh.
delete .xml in file name
128.blend.xml (350.0 KB)
256.blend.xml (552.8 KB)
Here are two new samples, one is at most 128 reuse times, one is at most 256 reuse times.
This does not appear to be a blend file. Here’s the first bunch of bytes in your file:
paulm@cmstorm 09:30:~$ hexdump -C 1.blend | head -n 10
00000000 28 b5 2f fd a0 f4 04 01 00 55 2a 00 a6 6e b6 4c |(./......U*..n.L|
00000010 d0 b0 6e 03 e8 51 2f a0 74 34 e4 40 2c ae 33 44 |..n..Q/.t4.@,.3D|
00000020 ee 41 3a 20 9b 23 46 41 2a 84 43 9c 94 9c c0 89 |.A: .#FA*.C.....|
00000030 d9 f6 ce 14 13 a6 88 5f 8d c5 87 98 a6 84 42 28 |......._......B(|
00000040 3c 2c 7e 6f 7c e1 4f 08 48 bb 6a b9 11 82 c7 35 |<,~o|.O.H.j....5|
00000050 d2 48 70 72 3c 52 52 d2 cb 88 48 0a 9f 00 a7 00 |.Hpr<RR...H.....|
00000060 9e 00 0b 76 2a 2a 2d de 0a 59 43 92 21 26 93 c9 |...v**-..YC.!&..|
00000070 63 b5 6a 71 e0 70 38 95 aa aa 3e f3 7c 74 4b 4a |c.jq.p8...>.|tKJ|
00000080 54 3e 2c 32 16 19 18 b6 9d 1f 1f 1f 27 8a a2 3c |T>,2........'..<|
00000090 b2 0c 23 4a d3 74 a6 6d db 1a 37 f8 f6 73 1d 47 |..#J.t.m..7..s.G|
Here’s what a blend file looks like:
paulm@cmstorm 09:30:~$ hexdump -C animlight.blend | head -n 10
00000000 42 4c 45 4e 44 45 52 2d 76 32 38 30 52 45 4e 44 |BLENDER-v280REND|
00000010 48 00 00 00 60 48 ce 5f fe 7f 00 00 00 00 00 00 |H...`H._........|
00000020 01 00 00 00 01 00 00 00 fa 00 00 00 53 63 65 6e |............Scen|
00000030 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |e...............|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000060 00 00 00 00 00 00 00 00 00 00 00 00 54 45 53 54 |............TEST|
00000070 08 00 01 00 08 66 c9 48 1a 7f 00 00 00 00 00 00 |.....f.H........|
00000080 01 00 00 00 80 00 00 00 80 00 00 00 17 17 17 df |................|
00000090 17 17 17 df 18 18 18 df 19 19 19 df 15 15 15 df |................|
Trying to detect the file type of your file:
paulm@cmstorm 09:30:~$ file 1.blend
1.blend: Zstandard compressed data (v0.8+), Dictionary ID: None
paulm@cmstorm 09:32:~$ zstdcat 1.blend | hexdump -C | head -n 10
00000000 42 4c 45 4e 44 45 52 2d 76 33 30 30 52 45 4e 44 |BLENDER-v300REND|
00000010 48 00 00 00 50 ae ff 66 03 00 00 00 00 00 00 00 |H...P..f........|
00000020 01 00 00 00 01 00 00 00 fa 00 00 00 53 63 65 6e |............Scen|
00000030 65 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |e...............|
00000040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
*
00000060 00 00 00 00 00 00 00 00 00 00 00 00 54 45 53 54 |............TEST|
00000070 08 00 01 00 88 8e 54 d4 04 01 00 00 00 00 00 00 |......T.........|
00000080 01 00 00 00 80 00 00 00 80 00 00 00 00 00 00 00 |................|
00000090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 |................|
So somehow you ended up with a zstd-compressed file?
Edit: I guess I learned something today, that blender files can be in a compressed form
sunfei
October 27, 2021, 7:51am
3
I don’t know. This is part of my code.
then I use blender.exe --background --python cmd run my script.
That script ends with these two lines:
bpy.ops.wm.save_as_mainfile(filepath=f’{args.save_path}.blend’, compress=True)
bpy.ops.render.render(write_still=True)
I can get a render result like this:
But the saved blender file is like that, if I do not use compress=True, this blend file will be 259MB and still cannot be opened.
Also the scene takes over 30 seconds to build, seems “collection.objects.link(obj)” take many time, no idea how to avoid this time-consuming situation. The other script I wrote to build a .vrscene for vray only take less than 1 second to build this test scene.
If you create a smaller test scene, then does it work?
sunfei
October 27, 2021, 8:12am
5
yes, reuse around 64 times can work smoothly, only 0.4 second to build and open immediately. 128 times build 0.9 seconds and open will take a while. 256 times build 3.17 seconds and cannot open.
With “cannot open” you mean Blender gets stuck loading the file, right? It’s not that you get an error?
sunfei
October 27, 2021, 9:11am
7
Yes,no responding,not get an error.
brecht
October 27, 2021, 2:31pm
8
sunfei
October 29, 2021, 1:30am
9
Hey, since this is a bug report, and not a development topic, I’m moving this to be unlisted.