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

Texture align

Scheduled Pinned Locked Moved Plugins
11 Posts 9 Posters 1.3k Views 9 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.
  • D Offline
    dsarchs
    last edited by 10 Dec 2010, 19:38

    I was wondering if someone could make a plugin that would align textures to the surface that they're on. I was thinking it could be something where you select an edge of the surface and the texture would be rotated to align with that edge. It would be cool if there was also an option to let it auto-find the major orientation of a surface and align in that way.
    Is this something that's possible? Difficult? I think it would be most useful for correctly orienting wood grain in beams, studs, furniture, etc. These are generally fairly regular geometries so maybe that would help.


    texture align q.jpg

    Knowledge is a polite word for dead but not buried imagination.

    -e.e.cummings

    1 Reply Last reply Reply Quote 0
    • L Offline
      lapx
      last edited by 10 Dec 2010, 21:18

      Have you tried texture helper at smustard.com ?

      1 Reply Last reply Reply Quote 0
      • H Offline
        honoluludesktop
        last edited by 10 Dec 2010, 22:43

        Can that be done? How would the app know what direction the grain is running in the texture's image? Except in the case that it is parallel, or perpendicular to the edge of the texture.

        1 Reply Last reply Reply Quote 0
        • D Offline
          dsarchs
          last edited by 11 Dec 2010, 17:27

          I had assumed the general direction could be found by which vector direction had the longest cumulative length, or maybe the direction of the longest unbroken single edge.
          I haven't tried it but the texture helper plugin looks pretty useful.

          Knowledge is a polite word for dead but not buried imagination.

          -e.e.cummings

          1 Reply Last reply Reply Quote 0
          • T Offline
            thomthom
            last edited by 11 Dec 2010, 17:37

            What honolulu asked was, how would the plugin know what dorection the grain in your texture is oriented, along the U or V direction?

            Thomas Thomassen — SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

            1 Reply Last reply Reply Quote 0
            • D Offline
              DVERGER
              last edited by 14 Dec 2010, 10:51

              is a 2D image, so the program knows its orientation.

              1 Reply Last reply Reply Quote 0
              • T Offline
                TIG Moderator
                last edited by 14 Dec 2010, 10:58

                You could always assume 'vertical grain' direction [most of mine are], and then rotate it appropriately to UV map.
                A simple 90 re-rotation fixes it if it's a horizontal alignment of 'grain'...
                You could always rotate the texture in an editor and reapply it to any rogue material so that then they are all 'vertical' ?
                Presumably with the 'assumed' orientation the UV mapping to be aligned with a face's longer side is then possible to code [thomthom??].....

                TIG

                1 Reply Last reply Reply Quote 0
                • T Offline
                  thomthom
                  last edited by 14 Dec 2010, 12:29

                  Yea - that's possible.

                  Thomas Thomassen — SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

                  1 Reply Last reply Reply Quote 0
                  • D Offline
                    Dave R
                    last edited by 14 Dec 2010, 22:48


                    http://farm5.static.flickr.com/4073/5062765951_1d9827a34c_m.jpg

                    That would be a handy plugin. Especially for non square materials. I have quite a number of wood grain images similar to the one shown here. It's not so difficult to rotate it when the need arises but having it automatically applied with the correct direction would a big help. I also have a number of end gain textures that are wider than they are tall. Typically they are applied so their long direction aligns with the long direction but not for very small pieces of wood. Then the material often needs to be rotated.

                    Most of the square wood grain materials I've had are so bad, I've discarded them in favor of the long ones.

                    Etaoin Shrdlu

                    %

                    (THERE'S NO PLACE LIKE)

                    G28 X0.0 Y0.0 Z0.0

                    M30

                    %

                    1 Reply Last reply Reply Quote 0
                    • D Offline
                      dale
                      last edited by 15 Dec 2010, 13:48

                      @dave r said:


                      http://farm5.static.flickr.com/4073/5062765951_1d9827a34c_m.jpg

                      Most of the square wood grain materials I've had are so bad, I've discarded them in favor of the long ones.

                      I've been frustrated with square wood textures also Dave, where are you getting your textures from?

                      Just monkeying around....like Monsanto

                      1 Reply Last reply Reply Quote 0
                      • R Offline
                        Richard
                        last edited by 17 Dec 2010, 04:43

                        @tig said:

                        A simple 90 re-rotation fixes it if it's a horizontal alignment of 'grain'

                        Even that set would not be so likely needed as the user would understand - pick the opposite edge for the align!

                        [BUILTBRAND.COM.AU](http://builtbrand.com.au/)

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

                        Advertisement