Cycles: Optionally cancel render when a texture is missing
Needs RevisionPublic

Authored by Lukas Stockner (lukasstockner97) on Nov 5 2017, 10:13 PM.



Instead of just using a pink texture, Cycles will cancel the render and display an error message when a texture couldn't be loaded, unless you disable that behaviour.

As usual, the main question is where to put this option and whether it should be on by default...

Diff Detail

rB Blender
missing_image_error (branched from master)
Build Status
Buildable 950
Build 950: arc lint + arc unit

I think this should be off by default, it seems more for advanced users? Beginner users might get stuck if they can't figure out how to turn this option off. Render farms can automatically enable it through a script.

Ideally it would be a general "Stop on Missing Data" or "Stop on Error" option. OSL shaders that fail to load seems like an easy addition. It would be good to check for library datablocks with LIB_TAG_MISSING too, and eventually missing point and smoke caches too, but that's harder.

I'm not sure which panel this option belongs in. Perhaps in the Output panel, since it's mostly for preventing broken render farm or animation renders?

Sergey Sharybin (sergey) requested changes to this revision.Dec 6 2017, 3:34 PM

This is indeed needs to be applied to all datablocks and caches. But keep in mind, that LIB_TAG_MISSING is only set on missing IDs, so for images you still need to check if they are available or not.

Did you check that callbacks (buildin-called thingie) can report missing images and catch those?

As for enabling this by default: yes, BUT! Check on production files from open movies. I remember implementing such option in the past, and it only gave headache in reality. All those reference images on a hidden objects made a mess. While one would argue that this is unacceptable .blend, this happens in reality and system should be just smart enough that something is missing ONLY for datablocks which ends up in the final render image.

This revision now requires changes to proceed.Dec 6 2017, 3:34 PM

Would prefer this is handled outside of each render engine - an alembic geometry cache may be missing or an image could be used by a modifier for example.
So there is no guarantee that having Cycles check this will give a useful outcome.

This issue has been raised on bf-committers some years back: we could have some 'pre-flight-check' add-on that handles this.

It might be that we need some extensions to the C/Python-API's to know what is used - but think its worth doing it outside of the render engine.