Hello,
I followed this tutorial (Blender Quick Tip: File output node - YouTube) to generate my custom AOVs in Blender and found that paths of a Blender “File Output” - Node from within the compositing context are not considered while pathmapping for AWS Fleet-Rendering.
The frames from the “normal” Blender Output (Render Settings) are written in the correct place, so the pathmapping seems to work for that part.
The Worker Logs also show an error writing .exr which I think is because the “File Output”-Node paths are still the on-prem ones.
I had a quick look inside the Blender.py and only found an entry for “OutputFile” which I guess is the “normal” Blender Output Path described above.
Our current workaround is to manually do the pathmapping for AWS before we submit which is a pain…
Regards, Michael
That might not be possible, as we’d have to either pass the path-mapping rules to Blender and have it make the updates, or open the .blend file and run a find/replace in it.
I can’t find anything in the Blender docs on the former, and .blend files appear to be binary files so text replacement won’t work. If I’m wrong about the binary file thing and you’re willing/interested in doing some tinkering, take a look at the Vray application plugin in DeadlineRepository10/plugins/Vray and how CheckPathMappingInFile() gets used.
Thanks for your reply,
You are only half right in regards to .blend files.
Actually the paths seem to be written in between all the binary so find and replace should work.
I will give it a go with the code inside the vray plugin.
1 Like
Nice! Happy to be wrong on this one. Let us know how experimenting goes!
Update:
I changed the Blender.py to create a temp copy of the .blend and got the Search and Replace working.
Still it fails since the .blend gets corrupted while doing the Search and Replace.
My guess is that the RepositoryUtils.CheckPathMappingInFileAndReplaceSeparator function does not work well with binary files. Similar to this discussion:
My next idea would be to use the PreRenderTask to open the temp file via blender commandline and do the Search and Replace there but this sounds a bit overcomplicated. Any chance we could modify the CheckPathMapping… functions to work with binary?
Shot in the dark here - is one of your ‘paths to replace’ just W:
? That might be short enough to match with some bytes in the .blend file. Which would result in corruption. A longer path to replace rule will resolve that.
There is also a version of the function that’ll read the file in as bytes, so give that a shot as well!
Failing those two then I’d think digging into the PreRenderTask would be the next move.
Nah, replacing text in binary files won’t work. Binary ifd files also get corrupted this way.
It’s best to open the file with blender and perform the replacements.