• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

How does material color multiplication works?

Scheduled Pinned Locked Moved Developers' Forum
7 Posts 4 Posters 1.2k Views 4 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • F Offline
    fuzzybro
    last edited by 20 Jun 2014, 19:30

    When material has a texture and color the result is really weird. It is not just texture and color multiplication as commonly seen in computer graphics. How does it work in Sketchup so I can reproduce it in other renderer?

    Thanks

    [OctaneRender for SketchUp Overview and Demo Version(http://sketchucation.com/click.php?url)]

    Latest updates, tutorials and artwork
    facebook.com/octane4sketchup

    1 Reply Last reply Reply Quote 0
    • T Offline
      tt_su
      last edited by 23 Jun 2014, 12:26

      Material color multiplication? What do you mean?

      1 Reply Last reply Reply Quote 0
      • A Offline
        Aerilius
        last edited by 23 Jun 2014, 12:55

        SketchUp's UI has two ways to modify the color of a textured material: You can color-shift the texture image (it still preserves color differences, but with an emphasis at a different Sketchup::Color)
        and you can colorize the texture image (boolean, preserves only the brightness, sets the hue and saturation to a specific color).

        The API does not differentiate between the two, so when you read color from a color-shifted material and set the same value again, it will be not just be color-shifted but colorized. It's better not to use these properties in Ruby scripts.

        You can however "bake" the color-shift/colorization into a texture when exporting textures with the Sketchup::TextureWriter.

        1 Reply Last reply Reply Quote 0
        • T Offline
          tt_su
          last edited by 23 Jun 2014, 13:43

          Ah! That color adjustment features.

          The Colorize function just converts it to a grayscale and maps that to the selected color.

          I'll look into the color shifting. I have always thought it was a blend going on - but I'll see if I can dig into the code and see what actually happens.

          1 Reply Last reply Reply Quote 0
          • T Offline
            tt_su
            last edited by 23 Jun 2014, 14:00

            It does a HSL shift.

            1 Reply Last reply Reply Quote 0
            • N Offline
              nikusknx
              last edited by 24 Oct 2014, 11:09

              @tt_su said:

              It does a HSL shift.

              Hi,
              If we have the original rgb texture, and the hls or rgb color of the texture, what is the opertion to do to each pixel to create the new material with color like the Sketchup texture writer???

              thanks

              1 Reply Last reply Reply Quote 0
              • T Offline
                tt_su
                last edited by 30 Oct 2014, 11:56

                I would need the deltas, and know whether the material is HSL shifted or tinted - something the Ruby API doesn't expose right now. But we have an issue open to address that.

                1 Reply Last reply Reply Quote 0
                • 1 / 1
                • First post
                  Last post
                Buy SketchPlus
                Buy SUbD
                Buy WrapR
                Buy eBook
                Buy Modelur
                Buy Vertex Tools
                Buy SketchCuisine
                Buy FormFonts

                Advertisement