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

    [Plugin] Normal Map Maker

    Scheduled Pinned Locked Moved Plugins
    43 Posts 21 Posters 57.0k 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.
    • Rich O BrienR Offline
      Rich O Brien Moderator
      last edited by

      +1 for menu

      +1 for Gaieus suggestion

      +1 for +1

      Download the free D'oh Book for SketchUp ๐Ÿ“–

      1 Reply Last reply Reply Quote 0
      • P Offline
        Panga
        last edited by

        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 Reply Last reply Reply Quote 0
        • Chris FullmerC Offline
          Chris Fullmer
          last edited by

          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 Reply Last reply Reply Quote 0
          • honoluludesktopH Offline
            honoluludesktop
            last edited by

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

            1 Reply Last reply Reply Quote 0
            • N Offline
              notareal
              last edited by

              Neat!

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

              1 Reply Last reply Reply Quote 0
              • GaieusG Offline
                Gaieus
                last edited by

                Thanks Didier, too! ๐Ÿ‘

                Gai...

                1 Reply Last reply Reply Quote 0
                • Didier BurD Offline
                  Didier Bur
                  last edited by

                  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 Reply Last reply Reply Quote 0
                  • Didier BurD Offline
                    Didier Bur
                    last edited by

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

                    DB

                    1 Reply Last reply Reply Quote 0
                    • T Offline
                      tomasz
                      last edited by

                      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 Reply Last reply Reply Quote 0
                      • TIGT Offline
                        TIG Moderator
                        last edited by

                        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 Reply Last reply Reply Quote 0
                        • thomthomT Offline
                          thomthom
                          last edited by

                          @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 Reply Last reply Reply Quote 0
                          • TIGT Offline
                            TIG Moderator
                            last edited by

                            And it's the skewed one we want! ๐Ÿ˜’

                            TIG

                            1 Reply Last reply Reply Quote 0
                            • thomthomT Offline
                              thomthom
                              last edited by

                              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 Reply Last reply Reply Quote 0
                              • TIGT Offline
                                TIG Moderator
                                last edited by

                                @thomthom said:

                                ah... ๐Ÿ˜ณ
                                But a skewed texture only needs tree co-ordinates - why are these troublesome for triangles?

                                Maybe I use the wrong wording... it's textures that are somehow rotated/skewed/sheared that need four UVs ?

                                TIG

                                1 Reply Last reply Reply Quote 0
                                • thomthomT Offline
                                  thomthom
                                  last edited by

                                  Only distorted textures needs four points.

                                  Normal size (based on material width and height): 1 point
                                  Uniformly scaled: 2 points
                                  Non-uniformly scaled: 3 points
                                  Skewed - sheared: 3 points
                                  Distorted: 4 points

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

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

                                    It's distorted then - do you mean that we CAN export these already using a TW and the material's actual face front-material?
                                    If so, how do we 'know' a face has a 'distorted' texture as opposed to a 'skewed' or 'rotated' one ?
                                    Let's say I have a face with a material that has its texture distorted and some other faces use that material 'undistorted'.
                                    The material is exported 'undistorted' and used with most faces with the simple 3-point UV-mapping...
                                    I need to know how to find which face has which type of texture, then if it's distorted then export that texture as a 'variant' using the TW with the very face, and then use that image-file for that face in the exported data.
                                    Is this what the built-in OBJ-Exporter does when it makes distorted texture files for some faces...

                                    The main issue is how do I tell if a face's material's texture is 'distorted' and needs this extra step... ๐Ÿ˜•
                                    It would greatly improve my OBJexporter and some 3rd party tools I am involved with...

                                    TIG

                                    1 Reply Last reply Reply Quote 0
                                    • A Offline
                                      AcesHigh
                                      last edited by

                                      sorry for the stupid question but...

                                      1 - whats the advantage of normal map over bump and displacement maps (both of which can use the same grayscale bitmap)?

                                      2 - VRAY doesnt use normal maps, does it?

                                      1 Reply Last reply Reply Quote 0
                                      • thomthomT Offline
                                        thomthom
                                        last edited by

                                        @aceshigh said:

                                        1 - whats the advantage of normal map over bump and displacement maps (both of which can use the same grayscale bitmap)?

                                        http://www.spinquad.com/forums/showthread.php?4478-Normal-maps-vs.-Bump-maps&s=157424c55a8e268f44d84e57618a04cb&p=54371&viewfull=1#post54371

                                        http://i192.photobucket.com/albums/z232/Z-trooper/Modelling/mappings.png

                                        a) is a bump map
                                        b) is a parallax/normal map
                                        c) is a relief map (normal map with self shadowing)

                                        @aceshigh said:

                                        2 - VRAY doesnt use normal maps, does it?

                                        Not sure what V-Ray 2 does - but the version V-Ray for SketchUp currently use doesn't.

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

                                        1 Reply Last reply Reply Quote 0
                                        • T Offline
                                          tomasz
                                          last edited by

                                          @tig said:

                                          The main issue is how do I tell if a face's material's texture is 'distorted' and needs this extra step... ๐Ÿ˜•
                                          It would greatly improve my OBJexporter and some 3rd party tools I am involved with...

                                          http://forums.sketchucation.com/viewtopic.php?f=180&t=23947&hilit=distorted&start=60#p204899

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

                                          1 Reply Last reply Reply Quote 0
                                          • PixeroP Offline
                                            Pixero
                                            last edited by

                                            @aceshigh said:

                                            1 - whats the advantage of normal map over bump and displacement maps (both of which can use the same grayscale bitmap)?

                                            A bumpmap is like: Hey, change your normal (surface direction) by this grayscale amount!
                                            A normal map is more like: Yo, use this normal instead of your old one!

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

                                            Advertisement