• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] Color by Z (Updated August 27th, 2009)

Scheduled Pinned Locked Moved Plugins
54 Posts 21 Posters 50.8k Views 21 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.
  • C Offline
    Chris Fullmer
    last edited by 14 Feb 2009, 04:33

    Thanks John and all!

    For now, it does not work on groups by design (and because I haven't made a plugin that drills down into groups, so I would have to learn how). But I made it so it would leave all groups alone because I didn't think it would be desireable to have it re-paint your trees and buildings and things.

    I suppose once I get it able to drill down into groups, I could just put in a prompt asking if you want it to work on groups and components. That would probably be a good solution.

    Chris

    Lately you've been tan, suspicious for the winter.
    All my Plugins I've written

    1 Reply Last reply Reply Quote 0
    • C Offline
      Chris Fullmer
      last edited by 14 Feb 2009, 05:57

      Thanks Coen! This script was a good challenge for me, so I'm glad I got it to work at all!

      John, those are great ideas. I'll have to look into how to implement them. I know I can get the color palette in this one too easy enough, but I can't get it to remember colors very well or to give it my own starting colors. If I could figure that out, then it would be super easy to save chosen color schemes and re-use them. Maybe Ill contact the guy who developed the SU color palette and see if he can give me any tips on how to use it better.

      Anyhow, thanks for using it. I'm interested in you image though John. You have some unexpected coloration going I think. It looks like you have patches of light color moving up into higher elevations and a single color crosing over onto multiple faces. I'd be interested in seeing that file maybe. Thanks!

      Chris

      Lately you've been tan, suspicious for the winter.
      All my Plugins I've written

      1 Reply Last reply Reply Quote 0
      • K Offline
        kwistenbiebel
        last edited by 14 Feb 2009, 06:09

        I know in SU7 you can 'make a texture unique'.
        Unfortunaly I am on SU 6. Is there a workaround to get it in SU 6 as well?
        It would be great to be able to make a unique (projected) texture out of the mesh produced by Color by Z...

        Keep up the good work! That city/terrain greebler is going to be a blast when you will have finished all the needed rubies.
        We have a new ruby master πŸ‘

        1 Reply Last reply Reply Quote 0
        • F Offline
          Fletch
          last edited by 14 Feb 2009, 06:49

          Looks cool, Chris!

          maybe we should just update the first post w/ new versions as it get confusing to try to follow if one has the most up-to-date version or not...

          thanks for sharing and this is a great ruby idea!

          Fletch
          Twilight Render Cross-platform Plugin for SketchUp on PC or Mac

          1 Reply Last reply Reply Quote 0
          • M Offline
            MALAISE
            last edited by 14 Feb 2009, 07:31

            I'm definitively fascinated by the way you produce so many plugins. πŸ˜„
            MALAISE πŸ‘ ................. πŸ‘

            La Connaissance n'a de valeur que partagΓ©e

            1 Reply Last reply Reply Quote 0
            • C Offline
              Chris Fullmer
              last edited by 14 Feb 2009, 08:19

              Aha! I think I forgot to add "require 'sketchup.rb'" to the top of the file. And I think that is the problem. Try the current version. THanks,

              Chris

              Lately you've been tan, suspicious for the winter.
              All my Plugins I've written

              1 Reply Last reply Reply Quote 0
              • P Offline
                Pixero
                last edited by 14 Feb 2009, 10:12

                I've experimented with something similar in the past but gave up because I didnt find a way of getting a smooth gradient. Colors are applied to every polygon and not the UV values. Also it resulted in a "LOT" of color swatches in the material browser. Is there a way of applying colors but not having them added to the materials? And is there a way of using the UV values to get a smooth gradient?

                1 Reply Last reply Reply Quote 0
                • P Offline
                  pilou
                  last edited by 14 Feb 2009, 10:32

                  Works now! πŸ˜‰ β˜€


                  zzz.jpg

                  Frenchy Pilou
                  Is beautiful that please without concept!
                  My Little site :)

                  1 Reply Last reply Reply Quote 0
                  • H Offline
                    Heven7_floor
                    last edited by 14 Feb 2009, 10:35

                    Thanks Chris , your creation is still very cool and fantastic, πŸ‘ πŸ‘ my model is look better now

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      kwistenbiebel
                      last edited by 14 Feb 2009, 10:41

                      @pixero said:

                      I've experimented with something similar in the past but gave up because I didnt find a way of getting a smooth gradient. Colors are applied to every polygon and not the UV values. Also it resulted in a "LOT" of color swatches in the material browser. Is there a way of applying colors but not having them added to the materials? And is there a way of using the UV values to get a smooth gradient?

                      Yes, that is exactly what the new SU 7 feature 'Make unique texture' does. It makes one big gradient texture to project on your geometry.
                      If you go to the other plugin thread by chris (Random Color Select), he demonstrates this feauture in his proof of concept video in the first post.

                      Since I don't use SU 7 (various reasons, the handicapped component browser is one of them), I truely miss that 'make texture unique' option. πŸ˜•

                      1 Reply Last reply Reply Quote 0
                      • D Offline
                        Daniel S
                        last edited by 14 Feb 2009, 11:06

                        SU7 has an option called Combine Textures (The Combine Textures menu item combines separate textures on adjacent co-planar faces into a single larger texture. This feature also, optionally, removes edges between co-planar faces to reduce the polygon count for the model as a whole. Context-click on multiple selected parallel faces, with at least one face having a texture, and select Combine Textures to create a texture which is unique to that set of faces.)
                        This is a great tool, but it will be more usefull if it`s extended into curved surfaces. This Color by Z or the Tools On Surface are examples of plugins that will be benefit.

                        Daniel S

                        1 Reply Last reply Reply Quote 0
                        • P Offline
                          Pixero
                          last edited by 14 Feb 2009, 12:47

                          I still don't get a smooth gradient. πŸ˜•

                          1 Reply Last reply Reply Quote 0
                          • C Offline
                            Chris Fullmer
                            last edited by 14 Feb 2009, 16:32

                            The way to get a smooth gradient is to make a material in photoshop that is a big smooth gradient. Then bring it into your model and turn it so it is standing vertical next to your model. Set it to "Projected". THen select all of the land for it to be applied to and apply it to your model. You'll get all faces nicely mapped with a single image.

                            I just don't know how to do all that in one clean ruby unfortunately. So painting each face its own material is the closest I can get for now πŸ˜„

                            gradient z color.jpg

                            And with the combine textures bit....theres a HUGE downside to that. While it works great in that video I did, it only works on planar faces. So to get it to work on something like this, I would need to create a flat version of my terrain mesh, then apply all my materials to it, then run combine textures, then re-apply the new textuire onto my non-flattened terrain. So thats not terribly smooth either.

                            But it is what it is. Hopefully this script will be helpful for someone πŸ˜„

                            Chris

                            Lately you've been tan, suspicious for the winter.
                            All my Plugins I've written

                            1 Reply Last reply Reply Quote 0
                            • P Offline
                              Pixero
                              last edited by 14 Feb 2009, 17:23

                              The script idea I played with was to apply different colors based on slope and the side projected gradient doesnt work for that. 😞
                              Texturing is another area in SU we could wish for improvements in.

                              1 Reply Last reply Reply Quote 0
                              • C Offline
                                Chris Fullmer
                                last edited by 14 Feb 2009, 17:56

                                Ahh, tis true! If you wanted to do slopes as gradients, then you're out of luck. The only possible workaround I can think of is to use the subdivide scrip to subdivide faces into a tone of smaller faces. Then apply a single color to each face. Then somehow turn the whole thing into a single material and re-apply it to the pre-subdivided mesh. But I have a feeling that is 1. beyond the scope of Ruby and 2. probably just not very efficient and would be better suited for another 3d modeler? Maybe someone like Al's team could write an entirely separate app that reads the SU model and does all that work with the UV and gradients, and then sticks the model back into SU.

                                Chris

                                Lately you've been tan, suspicious for the winter.
                                All my Plugins I've written

                                1 Reply Last reply Reply Quote 0
                                • J Offline
                                  JClements
                                  last edited by 14 Feb 2009, 18:00

                                  Hi Chris, again.

                                  Other ideas:

                                  1. enable the script to "remember" the settings last used during the same SU session.
                                  2. save the settings in to a library (each "style" would be saved a record in a text file).
                                  3. call up the color wheel dialog

                                  And OMG, is Mt Hood going following in the foot steps of Mt St. Helens?
                                  Mt Hood gone Active Vulcanic AGAIN.jpg

                                  EDIT: 14 Feb 09
                                  Here is the skp , Chris. It may be that I didn't input the same values for the two terrains. It is geolocated, it will take you back to Mt. Hood in GE.


                                  Mt Hood gone Active Vulcanic AGAIN.skp

                                  John | Illustrator | Beaverton, Oregon

                                  1 Reply Last reply Reply Quote 0
                                  • J Offline
                                    JClements
                                    last edited by 14 Feb 2009, 18:03

                                    Chris, .skp was added to my previous posting.

                                    John | Illustrator | Beaverton, Oregon

                                    1 Reply Last reply Reply Quote 0
                                    • C Offline
                                      Chris Fullmer
                                      last edited by 14 Feb 2009, 18:09

                                      Cool, thanks John. I see it now. There is some overlapping geometry that I couldn't see in the image. That accounts for the coloration working the way it is. Thanks John!

                                      Chris

                                      Lately you've been tan, suspicious for the winter.
                                      All my Plugins I've written

                                      1 Reply Last reply Reply Quote 0
                                      • X Offline
                                        xrok1
                                        last edited by 14 Feb 2009, 19:15

                                        maybe a better direction for this would be to create a plug that creates 'real' gradient textures based on the height of geo in a scene. they could then be projected manually or auto matically based on a plane that is created with a similiar prcess to a section plane?

                                        β€œThere are three classes of people: those who see. Those who see when they are shown. Those who do not see.”

                                        http://www.Twilightrender.com try it!

                                        1 Reply Last reply Reply Quote 0
                                        • C Offline
                                          Chris Fullmer
                                          last edited by 14 Feb 2009, 19:23

                                          THats a nice arrow their John. It took me a while to find it on the image, but once I clicked on the image to expand it, it all made sense. Very nice. And your mountain looks great too! It works out really nice with white at the top that changes quickly into a brown and works its way down to give a nice snow capped mountain appearance πŸ˜„

                                          Chris

                                          Lately you've been tan, suspicious for the winter.
                                          All my Plugins I've written

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

                                          Advertisement