Generate image of single colour

I’m having a hard time understanding the Generate Image node.
My scenario is I want to create two images with a solid background colour of my choice.
I can make two images with the correct size but have no idea how to generate a colour.
The setting for pixel content I had assumed was it but I don’t fully understand the setting (plus the description is very vague) and whatever I set it to I get a grey image.
Any ideas?

Hi @bobpeers,

I agree that the behavior is a little unintuitive - I understand it such that the image processing extension is targeted most towards scientific purposes, where you have e.g. a laser with a single wavelength and then store only one value per pixel - the intensity, mostly in a great dynamic range (e.g. int type images) - instead of having a channel for each of the three colors in a rather small dynamic range 0-255 (i.e. unsigned byte type images).

That being said, you can still pull it off and get an image with a specific color with the following workflow:

Its a bit hacky, but essentially you put the RGB values into the Table Creator for each image, then create an image for each channel with constant value 1 and multiply the RGB values via the image calculator node (it doesn’t support flow variables for some reasons, thus you have to put the full expression into the table creator). In the image view, make sure to choose the RGB Image renderer:


(For unknown reasons the rendering does not work for the first image for me right now - I’ll investigate.)

Hope that helps!
Kind regards,
Lukas

2 Likes

Wow, thanks @LukasS . Really appreciate the help on this. I’m not sure I’d have worked this out for myself :astonished:

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.