Select faces by image texture color - Geo Node Tool

I’m trying to create a ‘select face by image texture colour’ for working with photoscans.

Base mesh / texture…random texture just for example.

The color selection method works well as a Geo Node ‘modifier’

But if I repeat the process as a ‘Tool’.
There are issues with the ‘threshold/epsilon’ not working as expected.

  • Low threshold, select magenta, works pretty well

image


Increase the threshold and white, yellow, non-red areas are getting selected first.

image

Thanks in advance!

1 Like

Also of note. Tools don’t support image selection data-blocks as inputs in the UI. Does anyone know the reason for this/is this likely to change?

Donno if this will help but your Tool setup and Modifier setups are different. In the Tool setup you are comparing Value with Value, in the Modifier setup you are comparing Alpha and Value… The results would be different.

3 Likes

Face-meet-palm. I’m such an idiot.

Thank you for noticing this dude.

I had a feeling I’m just overlooking some dumb connection because my eyes keep trying to close while I work from lack of sleep and I’m making a lot of dumb mistakes this week.

I’ll have a check but I’m guessing you’ve solved it. Thank you as always dude.

So I may have been at bit hasty to hit solution since I wasn’t at a computer but I still appreciate the help so much.

The threshold/still seems to select apparently non-red colors before moving onto selecting more red faces.

May something about color management?

I’ll play with it some more.

Separate Hue preview

So it seems that the separate HSV outputs red as black and also white as black. So the saturation and value compares can’t be ignored, they must be dialed in.

You might want to try out the Compare - Color node instead:
image

White and Black (and any grayscale color) don’t have a hue and saturation. Their hue defaults back to 0.0 but could basically be any hue you want (saturation will still be 0.0).
If you want to select the color based on its hue you have to keep in mind that the hue wraps around on a circle (from 0.0 to 1.0):
image
So a color that is close to red could have a hue that is close to 0.0 but also close to 1.0.
Maybe the “Proposed Fix” video here for the Hue Correct node in Blender 4.2 makes it clearer what i mean.

1 Like

How did I not know compare had a color mode! My brain is stuck in shader node mode.

New thing every day, thank you so much. I’ve learned so much just from this little tool.

And that color wrapping is very interesting thank you for sharing. Much more to think about!

1 Like