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

    [Plugin] Heightmap from model

    Scheduled Pinned Locked Moved Plugins
    63 Posts 28 Posters 61.2k Views 29 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.
    • TIGT Offline
      TIG Moderator
      last edited by

      Test file = instant Bugsplat.
      Didier - why not PM or email the 'uncompiled' script to one of us for debugging - you can trust me πŸ˜‰ ...
      You know that I hack into your encrypted rb files all of the time, but the rbs ones are a bit harder... just easier if you supply it unencrypted...
      It must be simple to fix...

      TIG

      1 Reply Last reply Reply Quote 0
      • G Offline
        georglorenz
        last edited by

        Slightly off topic here: Is there a plugin that does the exact opposite of this one? That is creating a terrain from an greyscale image (.jpg or anything else)? Thank you. G

        1 Reply Last reply Reply Quote 0
        • Chris FullmerC Offline
          Chris Fullmer
          last edited by

          There is, Didier wrote a script that imports a heightmap image into SU. I forget what its called, but it was written by didier bur and should be posted here on the forum somewhere....

          Chris

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

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

            Nice work!

            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
            • M Offline
              miikka1978
              last edited by

              Did anybody find some solution for instant BugSplat upon starting SU when using this plugin?

              1 Reply Last reply Reply Quote 0
              • Chris FullmerC Offline
                Chris Fullmer
                last edited by

                I was going to look at the code, but it is encrypted. So it would require Didier to look at it.

                Sometimes if the script calls the active_model before the model is initialized by SU it can cause problems. But I can't see if the script is possibly doing anything like that.

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

                1 Reply Last reply Reply Quote 0
                • M Offline
                  miikka1978
                  last edited by

                  Chris,
                  Is it possible to use your Color by Z- plugin for creating a heightmap from model? I would need to create heightmap from Sketchup model and take it into Unity 3D for creating a terrain (just like Heightmap plugin was supposed to do).
                  http://forums.sketchucation.com/viewtopic.php?f=180&t=16660

                  1 Reply Last reply Reply Quote 0
                  • Chris FullmerC Offline
                    Chris Fullmer
                    last edited by

                    Look at the technicque used in this post:

                    http://forums.sketchucation.com/viewtopic.php?f=323&t=16660&start=15#p131738

                    The idea is to make your terrain, then apply a gradient image to the entire terrain. It will make a much smoother gradient than my color by Z and the gradient will be more accurate.

                    You can try using the attached gradient image. That will give you a greyscale heightmap. I don't know what file format you need, but I am hoping you can export a black and white image from SU and find a way to get it into the correct format.

                    Let me know if this works, if you are still missing a piece to the puzzle.

                    Chris

                    BW-gradient.jpg

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

                    1 Reply Last reply Reply Quote 0
                    • Chris FullmerC Offline
                      Chris Fullmer
                      last edited by

                      ohh, hmm. I think perhaps this does something different than I thought. What are you trying to achieve? You already have a greyscale terrain and want to turn it into 3d geometry? If so, that is very different than what my color by z does. It would not be able to be tweaked to do that.

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

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

                        Hi all,
                        A new version of the script has been uploaded May 5th 2010 (no more instant bugsplat).
                        Find it here: http://forums.sketchucation.com/viewtopic.php?p=209935#p209935
                        The scrambler still puzzles me...

                        DB

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

                          Thanks, now working perfectly... πŸ˜„

                          TIG

                          1 Reply Last reply Reply Quote 0
                          • M Offline
                            miikka1978
                            last edited by

                            Thank you Didier!

                            1 Reply Last reply Reply Quote 0
                            • M Offline
                              morrowsend1
                              last edited by

                              This is a great plugin!

                              I'd love to be able to customize this code for use with a project I am working on. Any chance you will be releasing the code?

                              Things that would GREATLY help my project include:

                              • Making Black a background color
                              • Making square output images (my heightmap importer only accepts square images.)
                              • The ability to scale the output images to any size I need.
                              1 Reply Last reply Reply Quote 0
                              • D Offline
                                dbalex
                                last edited by

                                really impressive plugin, very nice for render purposes!

                                But could it be possible to enable it also in perspective view so we could have a depth map for postprocessing a sketchupview?

                                anyway, thank you very much for this plugin didier!

                                http://www.bocostudio.com

                                1 Reply Last reply Reply Quote 0
                                • jason_marantoJ Offline
                                  jason_maranto
                                  last edited by

                                  This is indeed very useful for rendering purposes πŸ˜„ -- I would second the idea that being able to generate the image at whatever resolution needed would be great.

                                  In regards to the previous post, you can do a quick version of what you want using fog:

                                  fog.jpg

                                  Best,
                                  Jason.

                                  I create video tutorial series about several 2D & 3D graphics programs.

                                  1 Reply Last reply Reply Quote 0
                                  • D Offline
                                    dbalex
                                    last edited by

                                    Interesting way jason_maranto, thanks for that, will try it!

                                    http://www.bocostudio.com

                                    1 Reply Last reply Reply Quote 0
                                    • H Offline
                                      Hanstania
                                      last edited by

                                      Hey Didier! Trying to get google terrain into UDK and tought this plugin was just what i needed. Got a problem though.

                                      First off, 18700016 rays to shoot? Thats a bit much, why does that number get so large? The model is just a small section of terrain.
                                      After the export when i open the raw file in Photoshop it does not show up as heightmap, but more like a grey mess.

                                      Any suggestions? I've got the plane version of sketchup pro and your plugin is the only one installed. Do i need additional plugins installed or something?

                                      Pardon my noobiness!

                                      Cheers!

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

                                        Hi Hanstania,

                                        What this plugin does is the inverse of thomthom's 'Bitmap to mesh' here: http://forums.sketchucation.com/viewtopic.php?t=31339

                                        As you can see a heightmap is a grey scale image so you'll get a greyscale image with my plugin. The size (in pixels) of this image is basically the size of your SU viewport. 18700016 rays to shoot is the result of width_of_your viewport * height_of_your viewport. For instance, a 1024*768 viewport will give 786432 rays and 786432 pixels in the calculated heightmap.
                                        You can resize down your viewport or lower your screen resolution to get smaller (but less accurate) images.
                                        Ensure to 'zoom-extents' your terrain in a top-down orthographic view before launching the script.
                                        You don't need to install anything else that the script.
                                        Please post an example of the 'grey mess' you got πŸ˜‰

                                        Below are 2 images of a GE captured terrain (mountain and sea) and the resulting heightmap on a red mask. It took 6 minutes to process.
                                        su.jpghm.jpg

                                        DB

                                        1 Reply Last reply Reply Quote 0
                                        • H Offline
                                          Hanstania
                                          last edited by

                                          I got it to work properly. I wasn't paying enough attention to formats/image sizes and what not. Oops.

                                          Thanks anyway Didier and thanks alot for this plugin, it's been extremely helpful when recreating realworld locations.

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

                                            @didier bur said:

                                            Hi all,
                                            After a long silence, here is another toy I wrote to export SU terrains to Unity3D game engine, which uses RAW heightmaps to create terrains. I thought it could be of any interest to others, so here it is.
                                            Features:

                                            • creates BMP or RAW images, greyscale or color, 8 bits or 16 bits from any view of your model (top view recommanded of course)
                                            • creates a colored mask where no faces found in the view
                                            • can crop the image to the model projection
                                            • can blur the heightmap before writing it.

                                            Extract in Plugins folder, PDF doc included.

                                            Regards,

                                            EDIT: new release May 5th 2010, instant bugsplat fix πŸ˜›

                                            hi, i'm using heightmap from model plugin, and have got the heightmap. but i don't know the minimum and maximum elevation of the mode. Does the plugin provide these values? Without these values i can't generate a accurate terrain in other 3D software.

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

                                            Advertisement