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

    [Plugin] Normal Map Maker

    已排程 已置頂 已鎖定 已移動 Plugins
    43 貼文 21 Posters 57.1k 瀏覽 21 Watching
    正在載入更多貼文
    • 從舊到新
    • 從新到舊
    • 最多點贊
    回覆
    • 在新貼文中回覆
    登入後回覆
    此主題已被刪除。只有擁有主題管理權限的使用者可以查看。
    • Chris FullmerC 離線
      Chris Fullmer
      最後由 編輯

      UPDATED: Now there is an actual plugin file to download and install thanks to Didier Bur.

      Ok, here's a quick and dirty normal map maker. It will re-paint all selected faces with the color of their normal, then it changes the camera to top mode and exports an image. Unfortunately you will have to crop the image yourself. Please watch the video for a brief demonstration of how to use it.

      This video shows an old version of the plugin that required pasting code into the Ruby console. That is no longer necessary. Now the plugin has a proper item in the plugins menu.
      [flash=790,600:s5l6x2be]http://www.youtube.com/v/1z0LAb2MTjA&hd=1&fs=1[/flash:s5l6x2be]

      Here is a picture of the base geometry:
      Base Geometry

      Here is the actual exported normal map that you need to crop down:
      Normal Map


      normal_map_maker.zip

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

      1 條回覆 最後回覆 回覆 引用 0
      • Rich O BrienR 離線
        Rich O Brien Moderator
        最後由 編輯

        Chris that's excellent 👍

        Nice pink background in SU too 😲

        Download the free D'oh Book for SketchUp 📖

        1 條回覆 最後回覆 回覆 引用 0
        • PixeroP 離線
          Pixero
          最後由 編輯

          Dang. Though this is good, I for a moment thought you had found a way of SETTING the normal in SU.
          Oh well, maybe in SU 12... 😒

          1 條回覆 最後回覆 回覆 引用 0
          • Chris FullmerC 離線
            Chris Fullmer
            最後由 編輯

            @unknownuser said:

            Nice pink background in SU too 😲

            😄 I normally just have a white background, but with edges off and having just a pure white geometry, I could not see my geometry, so I needed a background color. Pink seemed to fit the groovy "normal" colors well 😄

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

            1 條回覆 最後回覆 回覆 引用 0
            • GaieusG 離線
              Gaieus
              最後由 編輯

              👍 👍 👍
              Excellent, Chris! Thanks!

              Gai...

              1 條回覆 最後回覆 回覆 引用 0
              • Chris FullmerC 離線
                Chris Fullmer
                最後由 編輯

                Also, if people don't like copy and pasting code into the ruby console, I could further develop it to be a regular install plugin that goes into the menu system. Maybe if I get some free time. I prefer menu items personally.

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

                1 條回覆 最後回覆 回覆 引用 0
                • GaieusG 離線
                  Gaieus
                  最後由 編輯

                  You described an easy and excellent way to make b&W displacement/bump map in another topic (using a gradient black-to-white image projected sideways...).

                  If you ever develop this plugin into a menu item one, could you also include that option? (although true that it can easily be done simply manually, too).

                  Gai...

                  1 條回覆 最後回覆 回覆 引用 0
                  • Rich O BrienR 離線
                    Rich O Brien Moderator
                    最後由 編輯

                    +1 for menu

                    +1 for Gaieus suggestion

                    +1 for +1

                    Download the free D'oh Book for SketchUp 📖

                    1 條回覆 最後回覆 回覆 引用 0
                    • P 離線
                      Panga
                      最後由 編輯

                      Thanks a lot Chris for this one. Hope you'll find some time to make a menu for this one...and +1 for the Gaieus suggestion.

                      Cheers.

                      1 條回覆 最後回覆 回覆 引用 0
                      • Chris FullmerC 離線
                        Chris Fullmer
                        最後由 編輯

                        Great, thanks Didier! You added pretty much everything else I was hoping to get to later, just didn't have time at the moment. I can redo my video tutorial and stuff later when I get a chance. Hopefully tonight.

                        Chris

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

                        1 條回覆 最後回覆 回覆 引用 0
                        • honoluludesktopH 離線
                          honoluludesktop
                          最後由 編輯

                          Chris and Didier, Good work. This is a very neat function added to Sketchup's "bag of tricks".

                          1 條回覆 最後回覆 回覆 引用 0
                          • N 離線
                            notareal
                            最後由 編輯

                            Neat!

                            Welcome to try [Thea Render](http://www.thearender.com/), Thea support | [kerkythea.net](http://www.kerkythea.net/) -team member

                            1 條回覆 最後回覆 回覆 引用 0
                            • GaieusG 離線
                              Gaieus
                              最後由 編輯

                              Thanks Didier, too! 👍

                              Gai...

                              1 條回覆 最後回覆 回覆 引用 0
                              • Didier BurD 離線
                                Didier Bur
                                最後由 編輯

                                Hi,
                                Here is my contribution to this nice idea.
                                I hate commands in the console, etc, so I've made it a plugin.

                                It sets temporarily the display style without edges and edges profiles, resets it after the tool has ended.
                                It restore all the original materials of the faces and also purge unused materials.
                                You'll find the command under the File menu -> Export normal map

                                @Chris: I hope you don't mind me tweaking your script...

                                EDIT: modified on Dec. 8th 2010(menu option not working)


                                Unzip in Plugins Folder

                                DB

                                1 條回覆 最後回覆 回覆 引用 0
                                • Didier BurD 離線
                                  Didier Bur
                                  最後由 編輯

                                  Hi,
                                  Just edited the script and re-uploaded it, because the menu option was not working.
                                  Sorry for the inconvenience,

                                  DB

                                  1 條回覆 最後回覆 回覆 引用 0
                                  • T 離線
                                    tomasz
                                    最後由 編輯

                                    It is a nice step forward!

                                    I was thinking about using TIG's Java solution and produce a PNG with proper aspect ratio and without modifying the original materials. I don't know how to calculate smooth normals over a whole face when an edge is smoothed in SU, but I bet it can be done.

                                    Author of [Thea Render for SketchUp](http://www.thearender.com/sketchup)

                                    1 條回覆 最後回覆 回覆 引用 0
                                    • TIGT 離線
                                      TIG Moderator
                                      最後由 編輯

                                      I've been thinking about using a jar to mimic 'make_unique' for skewed textured materials etc as exporting these with correct UV mapping to tri-faces is not possible [or at least I don't know how to do it] - the way the built-in OBJ exporter copes is to make special versions of the texture image files that have non-exportable distorted UV-maps [from skewing etc] and then use those as a non-distorted image in the OBJ code... It's relatively easy to distort the width/height of an image in java BUT skewing is more tricky - but possible... e.g. http://www.jhlabs.com/ip/distorting.html and http://www.jhlabs.com/ip/filters/index.html or http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/Geom-image-manip.doc.html

                                      TIG

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • thomthomT 離線
                                        thomthom
                                        最後由 編輯

                                        @tig said:

                                        I've been thinking about using a jar to mimic 'make_unique' for skewed textured materials etc as exporting these with correct UV mapping to tri-faces is not possible [or at least I don't know how to do it] - the way the built-in OBJ exporter copes is to make special versions of the texture image files that have non-exportable distorted UV-maps [from skewing etc] and then use those as a non-distorted image in the OBJ code... It's relatively easy to distort the width/height of an image in java BUT skewing is more tricky - but possible... e.g. http://www.jhlabs.com/ip/distorting.html and http://www.jhlabs.com/ip/filters/index.html or http://java.sun.com/products/java-media/jai/forDevelopers/jai1_0_1guide-unc/Geom-image-manip.doc.html

                                        Sketchup::TextureWriter allows you to write out distorted images. If you load a face with distorted texture to the TW and write it out it'll save a modified version of it. Oddly enough, it doesn't seem to work the same way for skewed, scaled etc - then the texture is the original texture. 😕

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

                                        1 條回覆 最後回覆 回覆 引用 0
                                        • TIGT 離線
                                          TIG Moderator
                                          最後由 編輯

                                          And it's the skewed one we want! 😒

                                          TIG

                                          1 條回覆 最後回覆 回覆 引用 0
                                          • thomthomT 離線
                                            thomthom
                                            最後由 編輯

                                            ah... 😳

                                            But a skewed texture only needs three co-ordinates - why are these troublesome for triangles?

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

                                            1 條回覆 最後回覆 回覆 引用 0
                                            • 1
                                            • 2
                                            • 3
                                            • 1 / 3
                                            • 第一個貼文
                                              最後的貼文
                                            Buy SketchPlus
                                            Buy SUbD
                                            Buy WrapR
                                            Buy eBook
                                            Buy Modelur
                                            Buy Vertex Tools
                                            Buy SketchCuisine
                                            Buy FormFonts

                                            Advertisement