sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Help with limiting materials' RGB values ?

    Scheduled Pinned Locked Moved Plugins
    4 Posts 2 Posters 113 Views 2 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.
    • yitzharY Offline
      yitzhar
      last edited by

      is there a plugin for setting up all the color materials in the model that
      wont be over 235,235,235 (rgb) it will help for setting up for renders ..
      thanks

      look for us on facebook : creatioIL

      1 Reply Last reply Reply Quote 0
      • TIGT Offline
        TIG Moderator
        last edited by

        No plugin that I know of.

        However, it's not that difficult to manually fix RGB values...
        It would be possible to iterate through the model's materials and adjust the RGB values to be 235 if they were >235. However, this would mean pure 'Red' [255,0,0] would be toned down ?
        This one-liner does what you ask.

        m=Sketchup.active_model;m.start_operation('235');m.materials.each{|a|c=a.color;c.red=235 if c.red>235;c.green=235 if c.green>235;c.blue=235 if c.blue>235;a.color=c};m.commit_operation
        

        Seelect-All then Copy/Paste it + <enter> in the Ruby Console, and all of the model's materials are toned down so that no RGB is > 235... It is one-step undo-able.

        TIG

        1 Reply Last reply Reply Quote 0
        • yitzharY Offline
          yitzhar
          last edited by

          thank you for the fast reply,
          im more into makeing the white not so white ... thats meens little bit more grayer.
          i started to work with maxwell plug for SU and one of the first problems that everybody
          say about the slow render time is - to make all the colors not just the red to max 235,235,235.

          so is what you said still work for me?
          and how and where do i open the ruby script writer ?

          thank you very much

          look for us on facebook : creatioIL

          1 Reply Last reply Reply Quote 0
          • TIGT Offline
            TIG Moderator
            last edited by

            Reread what I wrote...
            It works on ALL materials, making the RGB values 235 maximum; thus 'toning down' the hue of every color that has an RGB value > 235.
            To use this one-liner code... open the 'Ruby Console' in SketchUp [via the SketchUp > Windows menu] and the copy/paste the whole of the line of the code into the bottom area of the 'Ruby Console', then press the <enter> key to run it.
            All materials are changed [it's relatively fast].
            You should see the RGB change in any material you 'Edit' in the Materials Browser, if any value was > 235 it will now be 235...
            It is one-step-undo-able - e.g. if you decide you don't like the changes.

            You could save the one-line of text into a text file for easier use later on...

            TIG

            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