About colorized textures


the sdk writes out colorized textures
but i need the original texture and do the colorization myself

writing the un-clorized texture works
but what is the secret behind the colorizing?
i tried any blend-mode i can think of, and tinting
it gives not the same result
any hints ?



SketchUp’s Ruby API bakes non-affine (quadrilateral) texture transformations and color modifications into the exported images. This is because many file formats and external applications might not support these features the same way as SketchUp does. There is unfortunately not much control over this.

SketchUp supports two ways to adjust a material’s appearance, so-called colorize types:

  • Colorization will turn all pixels monochrome in one single color tone with only variations in brightness.

  • Color shifting will move the HSL values of each pixel ([hue+ΔH, saturation+ΔS, light+ΔL]), but preserves variations in color tone.

If your exporter is able to write out color information and complex texture transformations, you just want the original “Vanilla” image exported. The commonly used trick is

  • for original colors: Reset the material by setting its color to nil. After exporting the texture, you have to undo to restore the modified color. (You can not save the modified color in a temporary variable and apply it again, because due to a bug SketchUp sets the colorize type to “colorized” even if it was “color shifted”.)

  • for complete untransformed texture: Create a temporary empty group (which cannot have UV coordinates) and apply the material, then load it into the TextrueWriter and it will write the undistorted image.

How does colorised texture work?
Some questions about Textured material and ColorizedTexture material
Color, Texture, Both?