sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] TextureRandomizer

    Scheduled Pinned Locked Moved Plugins
    50 Posts 15 Posters 45.9k Views 15 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.
    • pilouP Offline
      pilou
      last edited by

      Does this a variation of only one texture or several textures ?

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

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

        It affects ALL textured materials on ALL selected faces [fronts].
        So if you want to tweak one particular face+material combo then 'select by same material' before running the tool...
        Otherwise it randomizes everything !
        Any selected non-faces, or faces with non-textured materials, are ignored anyway...

        TIG

        1 Reply Last reply Reply Quote 0
        • massimoM Offline
          massimo Moderator
          last edited by

          Now seems to work fine. Thank you. ๐Ÿ˜„
          It would be nice if it worked also with groups...

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

            @massimo said:

            Now seems to work fine. Thank you. ๐Ÿ˜„
            It would be nice if it worked also with groups...
            A textured-material applied to a group is non-editable.
            Only textured-materials applied directly onto to faces are editable.
            If you mean it working on textured-faces that are inside groups, then if you edit the group/component you can randomize the textures on selected faces within the edit session...
            It would be possible to add extra code to process selected textured-faces AND textured-faces inside selected groups/components...
            Does this method appeal to anyone else ?

            TIG

            1 Reply Last reply Reply Quote 0
            • massimoM Offline
              massimo Moderator
              last edited by

              @unknownuser said:

              It would be possible to add extra code to process selected textured-faces AND textured-faces inside selected groups/components...

              That's what I meant.

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

                Here's v1.2 http://forums.sketchucation.com/viewtopic.php?p=392834#p392834
                If there are any groups/component-instances in the selection, and they
                contain textured-faces a dialog asks if you want to include those faces
                too, answer 'No' to process selected faces only or 'Yes' to process all
                textured-faces, including those inside other selected objects...
                It does not 'mine' down beyond the selected context - so nested groups are
                never affected.

                TIG

                1 Reply Last reply Reply Quote 0
                • pilouP Offline
                  pilou
                  last edited by

                  Cool effect! โ˜€

                  Before use your plug above
                  [REQ]
                  Does it possible to apply to a selection of faces some textures randomly from the Texture library ?

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

                  1 Reply Last reply Reply Quote 0
                  • massimoM Offline
                    massimo Moderator
                    last edited by

                    Great. ๐Ÿ‘
                    Now the problem is that all the selected groups are "randomized" in the same way (I've tried with an array of the same textured group). So at the end you have... a different uniformity. ๐Ÿ˜„

                    1 Reply Last reply Reply Quote 0
                    • EarthMoverE Offline
                      EarthMover
                      last edited by

                      Nice plugin TIG. Thanks! Possible to add an option for color variation by HSB? Perhaps random slide by percent for Hue,Saturation or black value. Would be great for leaves, brick, stones, etc.

                      3D Artist at Clearstory 3D Imaging
                      Guide Tool at Winning With Sketchup
                      Content Creator at Skapeup

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

                        @massimo said:

                        Great. ๐Ÿ‘
                        Now the problem is that all the selected groups are "randomized" in the same way (I've tried with an array of the same textured group). So at the end you have... a different uniformity. ๐Ÿ˜„
                        This is NOT a problem with the tool, rather one with the model itself.
                        So this is not entirely true. ๐Ÿ˜ฎ
                        If groups are multiple instances of the same group-definition they are just like component-instances of the same component-definition, so all changes to one will look just the same across all instances.
                        BUT if groups are unique because they have been edited [equivalent to what you can do with component-instances and 'make-unique' in the context-menu]... then the texture changes WILL be unique to each unique instance of the group.
                        So in essence what you are saying is, "Multiple copies of a group which refer to the same group-definition [which you can see in the 'Entity Info' count!] will display the same random-texture changes, because they are all 'clones'..." - which is exactly as you should expect. ๐Ÿ˜’
                        So you need to edit the groups [without making any significant changes] which will make them unique, and then redo the texture-randomization and then each one will get a unique texture randomization...
                        To make your groups unique you can try this simple one-liner in the Ruby Console, use it on a preselected set of entities which include the groups you want to 'make unique'...

                        Sketchup.active_model.selection.each{|e|e.make_unique if e.class==Sketchup;;Group and e.entities.parent.instances[1]}
                        

                        You might get messages about '...deprecated methods...', but just ignore these as there's a long standing balls-up in the API ! ๐Ÿค“

                        TIG

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

                          @earthmover said:

                          Nice plugin TIG. Thanks! Possible to add an option for color variation by HSB? Perhaps random slide by percent for Hue,Saturation or black value. Would be great for leaves, brick, stones, etc.
                          This would require a new textured-material [which is of course quite possible] - but this specific tool only randomizes the position/scale/mirroring/rotate of the one textured-material without changing it in any other way except for its UV-mapping...

                          TIG

                          1 Reply Last reply Reply Quote 0
                          • massimoM Offline
                            massimo Moderator
                            last edited by

                            Ok, ok...As I suspected. Now your one-liner works like a charm. Any possibility to "incorporate" it in the plugin perhaps as an option? ๐Ÿ˜„

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

                              Here's v1.3 http://forums.sketchucation.com/viewtopic.php?p=392834#p392834
                              If there are non-unique groups in the accepted selection then you are asked
                              if you want to make them unique, so that their randomized-textures are also
                              unique... [groups should be 'unique', BUT Sketchup can have more than one
                              instance of a group !!]
                              If there are multiple instances of the same component in the accepted
                              selection then you are asked if you want to make them unique, so that their
                              randomized-textures are also unique... [use this with care as the advantage
                              of components - edit one, edit all - is lost by making instances unique!]

                              TIG

                              1 Reply Last reply Reply Quote 0
                              • pilouP Offline
                                pilou
                                last edited by

                                Give a random colors to a volume is easy with the Random Painter by Chris Fullmer
                                but random textures from the Library of textures?

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

                                1 Reply Last reply Reply Quote 0
                                • EarthMoverE Offline
                                  EarthMover
                                  last edited by

                                  Thanks for the reply. I guess it would be best served as a separate plugin called "Texture Variator" or something similar where one could enter the number of variations desired and the range of HSB, thus producing copies and replacing the existing. Texture Randomizer as you have created it works great in my tests and again I thank you for your efforts and generosity! It is a handy addition to your texture toolset which I use everyday. ๐Ÿ‘

                                  3D Artist at Clearstory 3D Imaging
                                  Guide Tool at Winning With Sketchup
                                  Content Creator at Skapeup

                                  1 Reply Last reply Reply Quote 0
                                  • massimoM Offline
                                    massimo Moderator
                                    last edited by

                                    Thanks again TIG. Your patience is equal to your abilities... ๐Ÿ‘

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

                                      TIP: Using the same value for the 'max' AND 'min' settings will make that change with no randomization, e.g. set UXmax=1 and UXmin=1 will jump all of the selected faces' textures across by +1 unit.

                                      TIG

                                      1 Reply Last reply Reply Quote 0
                                      • guanjinG Offline
                                        guanjin
                                        last edited by

                                        @tig said:

                                        TIP: Using the same value for the 'max' AND 'min' settings will make that change with no randomization, e.g. set UXmax=1 and UXmin=1 will jump all of the selected faces' textures across by +1 unit.

                                        ๆœชๅ‘ฝๅ.jpg
                                        The plane can not be adjusted, the tool does not work

                                        I come from China, is to learn

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

                                          Explain how it is "not working" !
                                          Your bug reports can be annoyingly brief and unclear. ๐Ÿ˜’

                                          Is your textured-material applied directly to a face and NOT a group/component-instance - remember that you CANNOT adjust textures unless they are applied directly to a face - that applies to either with this tool or using the native Texture tool available through the context-menu...

                                          Is the texture-material applied to a 'front' face - you cannot adjust the texture that are incorrectly applied to a 'back' face.
                                          If your rectangle was drawn on the ground and you haven't reversed the face then you have textured the back NOT the front !
                                          To check this... ensure your Style has a distinct color difference between front and back default materials - typically an off-white and a blue-gray respectively - now toggle the view between Monochrome mode and Textured mode. Faces that are textured incorrectly on their backs will show 'blue'; they need to be Reversed [context-menu] and the texture applied to their fronts - it will now be editable using this tool ๐Ÿค“ Capture.PNG

                                          If this is not the case [my best guess!]...
                                          What values do you have in the tool's dialog?
                                          If the max/min for a pair of setting are the same number [that is NOT 0] then the texture[s] WILL change by the fixed amount [without any randomization].

                                          If you are working in mm and enter 1 then the 1mm jump could be hard for you to see unless you are close to it as it changes.
                                          Also, if your pattern repeats at say 150mm and you also enter 150... then although the texture will jump over by that value it will once again starting in the same place... so you will see no change.

                                          I know this tool works perfectly well - I have tested it extensively - so you must be doing something wrong. ๐Ÿ˜•

                                          TIG

                                          1 Reply Last reply Reply Quote 0
                                          • guanjinG Offline
                                            guanjin
                                            last edited by

                                            @unknownuser said:

                                            Thanks TIG ๐Ÿ‘

                                            444.gif

                                            I come from China, is to learn

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

                                            Advertisement