What technique does SketchUp use when changing RGB values of a texture?

I import a granite texture, and I change the RGB values to a specific set that I require (45, 35, 30). This essentially adds a layer of colour over the original texture.

Here’s an enlarged cut-out of the square texture preview from the screenshot above:
image

Can someone of the developers explain exactly what technique / blending mode is used under the hood to colorize the original Albedo? I’m trying to get the exact same effect in Photoshop, so I added a Color Fill layer onto the original texture with the same RGB value. Now I’m switching between the blending modes, but none of them match the edit of SketchUp:

I need to get this right because I’m using the same changed texture as a background for a portrait somewhere else in the project, and both the versions need to match, so the renders come out identical. So far no luck. Understanding the blend mode of SketchUp and managing to duplicate the same effect in Photoshop would help a lot.

As someone who uses sketchup and photoshop together daily, I can confidently say sketchup doesn’t overlay and blend the color. It legit recolors it and I don’t know how to reproduce.

My solution would be to change the color in photoshop FIRST and then import it into sketchup, guaranteeing a perfect match from the start.

If I had to guess, I feel like sketchup throws away the color info from the imported graphic when you edit the color, and uses a color blend with a black and white version to achieve color adjustments in app. It also saves that file somewhere but I’m not familiar enough with windows to tell you the location.

Thank you for the quick replies!
If there could at least be a way to export the colorized texture somehow with the same resolution as the original, that would help to.
I’m trying to manually recreate what SketchUp did to no avail.

My research also brought me here: How does colorised texture work?
Reading through, the explanation is too complex for me to understand.

However ThomThom says somewhere in the middle that since 2016 it’s possible to export a colorized texture. When I however try to export mine (Edit texture image in external editor), I still get the original texture.

Update: So one way it seems is to export your SketchUp scene as a DAE file. Then you’ll get the edited texture with your edits “baked” onto it. Not sure if this is the most optimal way but at least there is a way!

Not sure I’m following you Dave. I could of course edit the material in an external editor, but sadly I’m not getting the same result, as when I edit the texture with the RGB sliders in SketchUp. Basically trying to replicate how SketchUp colorizes the texture in an external editor is fruitless.

And even if I press on “Edit in external editor” after I’ve played with the sliders, I still end up with the original texture:

That is unless you meant something else and I misunderstood you.

Is there a reason you can’t make the texture in Photoshop and then import it into SketchUp and use the one you want instead of trying to match them?

1 Like

He’s saying to use the external editor (photoshop) instead of changing the sliders. It’s also what I suggested, to edit in photoshop.

See if this is close enough. On the left is a rectangle that is the same size as the texture, that has been colorized to 255,0,0. On the right is the original texture opened in Photoshop, changed to grayscale, back to RGB, and a 255,0,0 layer placed on top, set to Overlay.

I tried some other colors as well, they all came out pretty close.

2 Likes

This is what I get when following your steps:
The small one in the corner is the DAE exported, SketchUp-edited version, just for comparison.

As I wrote in my previous replies - I cannot get the exact same result in an external editor, because no matter what I try, it does not equal the SketchUp-colorized version. That’s the reason I made this thread.

So just use the external editor for all adjustments :slight_smile: the edit button will launch it automatically and the link will update upon return to sketchup.

Dave, that’s only your implication that I wasn’t interested. I was genuinely trying to understand, whether I misunderstood you, or you misunderstood me…
Again - I would like the adjustment that SketchUp creates, not an adjustment that I can do myself in an external editor. If the latter was the case, I would not make this thread, trying to understand what exactly the software does to achieve the result. I cannot recreate the exact same adjustment in an external editor. I hope this clears off the misconception.

Yes, I understand - but at the end of the day the work needs to get done, so…

Good Luck!

I’d have thought that 9 years in the same Forum and numerous exchanged messages over the years would’ve been enough to show that I never ignore your comments and appreciate your input. Clearly that’s not the case and the reason why you got so easily offended is beyond my understanding. Wishing you a good day.

You did an adjustment layer, and I didn’t. But even if I use an adjustment layer, the colors match what I see in SketchUp. It would be interesting to try your texture, which is a lot darker than the ones I tried.

I did look in the source code, and the colorizing seems to involve converting to grayscale, converting each pixel to HLS, applying the tint, and clamping the Hue value if it goes too high. It isn’t simple math in the code!

1 Like

I too suggested a solution to workflow to avoid this moving forward, not knowing he wasn’t looking for actual help getting the job done correctly and efficiently.

Thank you Colin!
If you have spare time to test it out, here’s the original texture.

In SketchUp I change the RGB values to: 45, 35, 30 and I get this:

And this is what I get, when following your steps in Photoshop:

  1. Image Mode > Greyscale
  2. Image Mode > RGB
  3. Add a layer with the desired RGB value over the original
  4. Change Mode to Overlay

Overlay is not the right layer type.

Here is the original SKP version:

Here is the one you edited in SKP:

Here is my version:

I selected Color as the layer type.

1 Like

What bmike did seems right. For the textures I was trying, Color and Overlay give similar results, but with your dark image Color looks like it does the right thing.

1 Like