Open Narann opened 5 years ago
Hello!
I realize enabling "false color" doesn't work if there is no RGB channel in source.
Here is a simple graph:
My deepread doesn’t have any RGB channel.
If I use it directly, like DeepOpenEXRId2 and set false color ON, and put my viewer on it, nothing appear, it’s black.
DeepOpenEXRId2
My only solution is to "force" a RGB channel to exists in the Deep graph merging two deep inputs (DeepOpenEXRId1).
DeepOpenEXRId1
If I enable false color on DeepOpenEXRId1, I have proper color.
I suspect the problem appear here:
https://github.com/MercenariesEngineering/openexrid/blob/master/nuke/DeepOpenEXRId.cpp#L320
The else statement is not reached if no RGB channel exists.
I suggest to add something like:
Channel redChannel = DD::Image::getChannel ("rgba.red"); Channel greenChannel = DD::Image::getChannel ("rgba.green"); Channel blueChannel = DD::Image::getChannel ("rgba.blue");
On top of doDeepEngine(), then, after needed += Mask_Alpha;, add:
doDeepEngine()
needed += Mask_Alpha;
if (_colors) { needed += redChannel; needed += greenChannel; needed += blueChannel; }
It should do the job but more test is obviously needed, maybe creating channel is done another way. The idea is simply to ensure RBGA is available when "false color" is enabled.
Thanks in advance, keep the good job!
Hello!
I realize enabling "false color" doesn't work if there is no RGB channel in source.
Here is a simple graph:
My deepread doesn’t have any RGB channel.
If I use it directly, like
DeepOpenEXRId2
and set false color ON, and put my viewer on it, nothing appear, it’s black.My only solution is to "force" a RGB channel to exists in the Deep graph merging two deep inputs (
DeepOpenEXRId1
).If I enable false color on
DeepOpenEXRId1
, I have proper color.I suspect the problem appear here:
https://github.com/MercenariesEngineering/openexrid/blob/master/nuke/DeepOpenEXRId.cpp#L320
The else statement is not reached if no RGB channel exists.
I suggest to add something like:
On top of
doDeepEngine()
, then, afterneeded += Mask_Alpha;
, add:It should do the job but more test is obviously needed, maybe creating channel is done another way. The idea is simply to ensure RBGA is available when "false color" is enabled.
Thanks in advance, keep the good job!