Latest Posts

Topic: reproducible blender rendering

knarf
Avatar
Topic Opener
Joined: 2024-01-03, 21:20
Posts: 45
OS: Debian
Ranking
Pry about Widelands
Posted at: 2024-01-14, 01:13

Hi,

I took a look into the current state of reproducible blender rendering in widelands. To start, I more or less randomly picked graphics/tribes/frisians/buildings/warehouses/warehouse/idle. First I will describe what I did and then I do have a few observations with lead me to questions.

general procedure:

observations:

  • The generated files are (using 100% scaling) the same size as the files Renderes000?.png in the repo.
  • The new files show essentially the same (same thing, orientation, brightness, ...)
  • I do get 60 files, while the repo contains only 10. The difference on first glance looks to be that "my" 60 start with the flags on the poles completely flat and start flapping in the following frames, while the 10 images in the repo do not show this feature
  • Assuming that the first 50 frames were used to essentially "jump-start" the physics of the flag and only then taking "real images", I compared the last 10 newly rendered images with the 10 in the repo. On first glance, they are really, really close. However, the shape of the (flapping) flags is different: not right or wrong in one or the other: just different.
  • when rendering twice (or more often), the results are different each time. The difference (besides the png metadata) is only the "light" from the inside of the house (inside of the windows); the flags behave the same to the bit. The interiour uses a randomized step integration for the material, and I suspect this randomness to be the cause of the lack of reproducibility even between renderings on the same machine. The difference between renders is visible when comparing pixel by pixel, even by eye, but not in-game. Which means the effect is not dramatic, but it would make automated checks highly problematic.

questions:

  • Is there documentation which of the frames in blender corresponds to which rendered files in the repo? This might help finding frames when the flags are flapping "exactly the same".
  • Is there a possibility to set a seed to the randomness in the material, and if not, would it be possible/acceptable to change the random setting with something reproducible, assuming it would not be "too visible" in the end (essentially look the same, although the exact images obviously have to differ, but they already do now with each new rendering)?

Top Quote
knarf
Avatar
Topic Opener
Joined: 2024-01-03, 21:20
Posts: 45
OS: Debian
Ranking
Pry about Widelands
Posted at: 2024-01-14, 01:14

For the curious: this is what one of the images looks like (from the repo).


Attachment:
Renders0000.png

Top Quote
Nordfriese
Avatar
Joined: 2017-01-17, 18:07
Posts: 2054
OS: Debian Testing
Version: Latest master
Ranking
One Elder of Players
Location: 0x55555d3a34c0
Posted at: 2024-01-14, 10:31

Is there documentation which of the frames in blender corresponds to which rendered files in the repo? This might help finding frames when the flags are flapping "exactly the same".

When you load the blender file from the repo, the animation is set to start at frame 50 and end at frame 59. Those are the frames that are meant to be rendered.

To initialize the flag physics, it's not necessary to render all 60 frames, you just have to let the animation run through from frame 0 on in Blender once (Alt+A).

Is there a possibility to set a seed to the randomness in the material, and if not, would it be possible/acceptable to change the random setting with something reproducible, assuming it would not be "too visible" in the end (essentially look the same, although the exact images obviously have to differ, but they already do now with each new rendering)?

I don't see such an option in Blender, but I'm not an expert. There is an option to change the Step Calculation for the window light material from Randomized to Constant, but that looks really bad, see attachment.


Attachment:
untitled.png

Top Quote