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

    [Plugin] Bitmap To Mesh

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

      Overview
      Generates a mesh from a given BMP image.

      Note! Generates two triangles per pixel!
      250x250 pixel image generates a mesh of ~125K faces! ( 250 * 250 * 2 )

      ImageToHeightmapMesh.gif

      HeightmapToMesh.gif

      BitmapToMesh.gif

      [flash=600,338:2gnylh6l]http://www.youtube.com/v/oGU7NABqEeU[/flash:2gnylh6l]

      Beware!
      This is a quick experimental beta release!
      Gremlings might lurk!

      v0.2.0b
Mesh from Heightmap

      Access
      Draw > Mesh From Heightmap
      Context Menu > Mesh From Heightmap
      Context Menu > Mesh From Bitmap

      Compatibility

      SketchUp 2018 or newer

      • All features

      SketchUp 2014 to SketchUp 2017

      • No down-sampling of heightmaps.
      • Limited image formats supported.

      SketchUp 2014 to SketchUp 2016

      • Degraded text display.

      Link Preview Image
      SketchUp Plugins | PluginStore | SketchUcation

      SketchUp Plugin and Extension Store by SketchUcation provides free downloads of hundreds of SketchUp extensions and plugins

      favicon

      (sketchucation.com)

      http://forums.sketchucation.com/download/file.php?id=53761


      v0.3.0b
Mesh from Bitmap

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

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

        Recognize it?
        😄


        MeshTest.png


        MeshTest2.png

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

        1 條回覆 最後回覆 回覆 引用 0
        • pilouP 離線
          pilou
          最後由 編輯

          Yes, it's the beast who makes some crazzy copter and boat 💚

          Have you a ratio x*y time elapsed?

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

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

            wow - thats amazing!
            Quick question - if you were to import a BPM image of contours and terrain, could you generate a DEM with this?
            Really amazing work. Thank you!
            Daniel

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

              @tald311 said:

              Quick question - if you were to import a BPM image of contours and terrain, could you generate a DEM with this?

              "DEM" ?

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

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

                @tald311 said:

                Quick question - if you were to import a BPM image of contours [...]

                It does not find contour edges - if that is what you mean. It simply uses the grey scale value of each pixel.
                The type of image you feed it should be like those you feed to bump maps and displacement maps in render engines. White is high point and black is low point - then you have shades of grey in between.

                Detecting contours in an image is not easy (beyond me) - and even if you managed to find the contours - I'd no idea how you'd determine the Z order of them.

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

                1 條回覆 最後回覆 回覆 引用 0
                • tbdT 離線
                  tbd
                  最後由 編輯

                  did something like this some years ago (2005 i think) and used it for quick creation of landscape hills/mountains.
                  version 2 that was work in progress (and killed) had an openGL viewer to quickly see the output before importing in Sketchup.

                  nice work Thomas

                  SketchUp Ruby Consultant | Podium 1.x developer
                  http://plugins.ro

                  1 條回覆 最後回覆 回覆 引用 0
                  • pilouP 離線
                    pilou
                    最後由 編輯

                    Format Dem 😉

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

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

                      @unknownuser said:

                      did something like this some years ago (2005 i think) and used it for quick creation of landscape hills/mountains.
                      version 2 that was work in progress (and killed) had an openGL viewer to quickly see the output before importing in Sketchup.

                      None of these versions are available anywhere?
                      OpenGL viewer within SU? 😲

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

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

                        @unknownuser said:

                        Yes, it's the beast who makes some crazzy copter and boat 💚

                        Have you a ratio x*y time elapsed?

                        No detailed progress indication, no. But I did this very quickly. I'll improve it - with a tool for visually indicating the size of the mesh. Maybe with option to map with the heightmap as a material.

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

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

                          @unknownuser said:

                          Format Dem 😉

                          @tald311 said:

                          could you generate a DEM with this?

                          I see now - no you can't. It would be the other way around, you could generate a SketchUp mesh from a DEM. (Though a very large DEM would most likely kill SU.)

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

                          1 條回覆 最後回覆 回覆 引用 0
                          • tbdT 離線
                            tbd
                            最後由 編輯

                            @thomthom said:

                            None of these versions are available anywhere?

                            nope. it was on old @Last Sketchup forums and lost.

                            @thomthom said:

                            OpenGL viewer within SU? 😲

                            yep. in a separate window and it worked pretty well.

                            SketchUp Ruby Consultant | Podium 1.x developer
                            http://plugins.ro

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

                              @unknownuser said:

                              nope. it was on old @Last Sketchup forums and lost.
                              😞
                              And v2?

                              @unknownuser said:

                              yep. in a separate window and it worked pretty well.

                              C-Extension? How did you generate and interface with this window?

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

                              1 條回覆 最後回覆 回覆 引用 0
                              • tbdT 離線
                                tbd
                                最後由 編輯

                                v2 lost on a hdd crash. yup, via a CExt using http://glew.sourceforge.net/basic.html to create and interact with the openGL window. used only a simple wireframe view for testing but it is possible to create a textured/shader scene as well.

                                SketchUp Ruby Consultant | Podium 1.x developer
                                http://plugins.ro

                                1 條回覆 最後回覆 回覆 引用 0
                                • shuraS 離線
                                  shura
                                  最後由 編輯

                                  Genius!
                                  Thomas you have a great fan in me. Many times I thought "glad that I have insisted on paying for our lunch the day we met, dunno when I get the next chance to buy him cookies".
                                  With this release my credit is definitely used up...
                                  ...playing for time I extruded a cookie for you, until I get a better ideas 😉

                                  Thanks for this plugin, I bet there are a thousand interesting ways to use it.

                                  cheers
                                  alex

                                  ThomasCookie.jpg

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

                                    😆 That's great Alex! 😄

                                    Btw - you wouldn't happen to be around München next week? The office is going for a trip - Wednesday 'til Sunday... I think.

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

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

                                      @unknownuser said:

                                      v2 lost on a hdd crash. yup, via a CExt using http://glew.sourceforge.net/basic.html to create and interact with the openGL window. used only a simple wireframe view for testing but it is possible to create a textured/shader scene as well.

                                      Sounds like you had all sorts of fun experimental things lost in this HDD crash... 😞

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

                                      1 條回覆 最後回覆 回覆 引用 0
                                      • EarthMoverE 離線
                                        EarthMover
                                        最後由 編輯

                                        This is great Thomas.

                                        Do you think it's possible to use the bitmap data to do other things besides generate a point cloud terrain? Could you transfer black lines on a bit map to lines on a face? Could you offset and pushpull based on pixel color data? Just thinking of how to take Silver Shadow's original request to generate a brick wall with depth using a bitmap and make it more polygon friendly. It's great, but using a point cloud terrain to generate several wall textures will bring SU to it's knees.

                                        Could you possibly glean the UVW coordinates of a texture applied to a face and tile the 3D geometry as components over those coordinates?

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

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

                                          @earthmover said:

                                          Could you offset and pushpull based on pixel color data?

                                          It's possible - but not easy - I don't know how.

                                          @earthmover said:

                                          It's great, but using a point cloud terrain to generate several wall textures will bring SU to it's knees.

                                          You could use CleanUp to reduce excess faces/edges for uniform textures.
                                          But in any case - keep the texture files small.

                                          @earthmover said:

                                          Could you possibly glean the UVW coordinates of a texture applied to a face and tile the 3D geometry as components over those coordinates?

                                          The texture would have to be BMP - as there is no built in method to get access to the texture data in SU. But it is possible - however, this is also something that turns rather complicated. Though would be an interesting project I can't see myself taking it in this direction - I got at the moment UV Tools, Bezier Surface and Vertex Tools as my main focus (that is not including smaller updates/projects).

                                          I will be updating it with some smaller improvements, but if anyone want to take it further then be my guest. I just threw this together today during a break as I realised that most the code would be reading the image files - which I already had the codes for from Vertex Tool's toolbar system.

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

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

                                            Test with simple displacement map:

                                            Displacement.png

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

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

                                            Advertisement