I finally made an attempt at a
very naive hack, consisting in simply switching the renderer to the base color texture for faces with PBR material and without a proper fallback substitution diffuse texture (i.e. with a default plywood or default blank texture set as the diffuse map).
EDIT: I also added a mode in which the diffuse (even non-default) texture is force-replaced with the base color texture for faces with a GLTF material, and I perfected the hack so that the base color texture color and transforms are used when it replaces the diffuse texture.
The result is not
that bad (even though still
very far from what a proper diffuse texture baking would allow to achieve). Here is what it gives in Runitai's villa (Rumpus Room 2 sim) on Aditi where many/most PBR objects do lack a diffuse fallback texture (click the pictures for the full size screenshots):
PBR rendering mode:
ALM without the hack:
ALM with base color replacing default diffuse:
Forward with base color replacing default diffuse:
ALM with base color always replacing diffuse:
Forward with base color always replacing diffuse:
Note that the current quick and dirty hack lacks proper texture color, offsets and scale support (i.e. the color, offsets and scale from the default diffuse texture are applied instead of the one used by the base color map), but as long as a white color is used and the offsets and scale are the same, it kind of "works"... (
EDIT: fixed in the new version)
Note how the GLTF materials of the room walls and ceiling do have a fallback diffuse texture, but use a different color for their PBR material (which, incidentally, and due to a bug of mine in the current viewer version, is wrongly used instead of the diffuse texture color in non-PBR rendering modes: I fixed this bug while implementing the hack).
Note also that forcing the use of the GLTF materials base color map (and its transforms and color) in non-PBR rending mode sometimes lead to bad result: the small round table vanishes (becomes invisible) in this forced mode (that's because it does not use any texture in its GLTF material)... (
EDIT: "fixed" in the latest version of my hack, where I simply do not touch the diffuse texture when no base color map exists in the PBR material: not ideal, but better than a vanishing object).