[Plugin] Heightmap from model

Re: [Plugin] Heightmap from model

Postby miikka1978 » Sun May 02, 2010 8:47 pm

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

miikka1978 
Premium Member
Premium Member
 

Re: [Plugin] Heightmap from model

Postby Chris Fullmer » Sun May 02, 2010 11:59 pm

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.
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Heightmap from model

Postby miikka1978 » Tue May 04, 2010 4:26 pm

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
0

miikka1978 
Premium Member
Premium Member
 

Re: [Plugin] Heightmap from model

Postby Chris Fullmer » Tue May 04, 2010 5:45 pm

Look at the technicque used in this post:

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
1
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Heightmap from model

Postby Chris Fullmer » Tue May 04, 2010 5:49 pm

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.
0
Lately you've been tan, suspicious for the winter.
All my Plugins I've written
User avatar
Chris Fullmer 
SketchUp Team
SketchUp Team
 

Re: [Plugin] Heightmap from model

Postby Didier Bur » Wed May 05, 2010 9:02 pm

Hi all,
A new version of the script has been uploaded May 5th 2010 (no more instant bugsplat).
Find it here: viewtopic.php?p=209935#p209935
The scrambler still puzzles me...
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Heightmap from model

Postby TIG » Thu May 06, 2010 8:57 am

Thanks, now working perfectly... :D
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Heightmap from model

Postby miikka1978 » Thu May 06, 2010 6:27 pm

Thank you Didier!
0

miikka1978 
Premium Member
Premium Member
 

Re: [Plugin] Heightmap from model

Postby morrowsend1 » Thu Jun 10, 2010 9:02 pm

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.
0

morrowsend1 
 

Re: [Plugin] Heightmap from model

Postby dbalex » Tue Nov 30, 2010 4:29 pm

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!
0

dbalex 
 

Re: [Plugin] Heightmap from model

Postby jason_maranto » Tue Nov 30, 2010 5:27 pm

This is indeed very useful for rendering purposes :D -- 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.
0
I create video tutorial series about several 2D & 3D graphics programs.
User avatar
jason_maranto 
 

Re: [Plugin] Heightmap from model

Postby dbalex » Fri Dec 03, 2010 2:26 pm

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

dbalex 
 

Re: [Plugin] Heightmap from model

Postby Hanstania » Tue Jun 28, 2011 5:43 pm

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!
0

Hanstania 
 

Re: [Plugin] Heightmap from model

Postby Didier Bur » Wed Jun 29, 2011 10:21 am

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.jpg
hm.jpg
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Heightmap from model

Postby Hanstania » Sun Jul 03, 2011 11:23 pm

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.
0

Hanstania 
 

Re: [Plugin] Heightmap from model

Postby aile009 » Tue Mar 13, 2012 4:01 pm

Didier Bur wrote: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 :P





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.
0

aile009 
 

Re: [Plugin] Heightmap from model

Postby TIG » Tue Mar 13, 2012 5:24 pm

If you know the over all height of the data in the height-map... you can Import it, then Select the imported mesh and Scale it vertically, typing in the known height WITH A UNITS SUFFIX - e.g. if it's 25m high type 25m+enter and instead of scaling x25 it will rescale so the total height is 25m...
Done ;)
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Heightmap from model

Postby Didier Bur » Tue Mar 13, 2012 9:18 pm

Hi,
Before using the tool, open the Ruby console and type:

Code: Select all
Sketchup.active_model.bounds.min.z  (Enter)
Sketchup.active_model.bounds.max.z  (Enter)

This will output the minimum and maximum altitudes in your model (in inches).
Hope this helps,
0
Didier Bur
Ecole Nationale Supérieure d'Architecture de Nancy (F)
http://rld.crai.archi.fr/rubylibrarydepot/
User avatar
Didier Bur 
 

Re: [Plugin] Heightmap from model

Postby aile009 » Wed Mar 14, 2012 11:51 am

Didier Bur wrote:Hi,
Before using the tool, open the Ruby console and type:

Code: Select all
Sketchup.active_model.bounds.min.z  (Enter)
Sketchup.active_model.bounds.max.z  (Enter)

This will output the minimum and maximum altitudes in your model (in inches).
Hope this helps,



Thank you very much.
I have got some code and made a .rb file by myself,
it can label the min and max elevation value (in current unit setting)
Anyway, thanks again for your reply.
0

aile009 
 

Re: [Plugin] Heightmap from model

Postby lhyps » Tue Apr 10, 2012 3:45 pm

really need that.
0

lhyps 
 

Re: [Plugin] Heightmap from model

Postby nikusknx » Tue Apr 23, 2013 11:16 am

:idea: Tips to unpack it :

Respect the original author
Please respect the author's wish to not have the code visible. Just because a plugin is free doesn't mean the source code is.



:bounce: You can use the scrambler to protect your code:
http://www.sketchup.com/intl/en/developer/docs/utilities
0
User avatar
nikusknx 
Kubity Support
Kubity Support
 

Re: [Plugin] Heightmap from model

Postby neighborlee » Fri May 09, 2014 7:23 pm

NOt working in SU 2014. Its in plugins folder, no crashing on startup, but there is no plugin menu option for this script, any idea ?

thx
0

neighborlee 
 

Re: [Plugin] Heightmap from model

Postby CoolDown » Fri Aug 01, 2014 11:40 pm

Hey Didier Bur, Im using the SketchUp Make 2014, and the extensions are .rbz(Ruby) files, so I could not install your extension .rb, and i tried to add a "z" at the end as well, but it didn't install. So I was wondering if you could write a new version for this 2014 build ?
0

CoolDown 
 

Re: [Plugin] Heightmap from model

Postby Dave R » Sat Aug 02, 2014 12:47 pm

CoolDown wrote:Hey Didier Bur, Im using the SketchUp Make 2014, and the extensions are .rbz(Ruby) files, so I could not install your extension .rb, and i tried to add a "z" at the end as well, but it didn't install. So I was wondering if you could write a new version for this 2014 build ?


Although Didier should update this plugin to work in SU2014, your method of installing it is incorrect, too. Changing .rb to .rbz is the wrong way to go. SketchUp still uses .rb as the extension for plugins. The .rbz extension is for packaging and to allow you to install via Install Extension, the Sketchucation Plugin Store, or the Extension Warehouse. Changing the extension of the zip file to .rbz will make it possible to install using Install Extension.

Before you change the extension, though, edit the last line of the rb file as indicated here:

viewtopic.php?f=323&t=12354&p=529566&hilit=unpack#p515316
0
Etaoin Shrdlu


%

(THERE'S NO PLACE LIKE)

G28 X0.0 Y0.0 Z0.0

M30

%
User avatar
Dave R 
Global Moderator
 

Re: [Plugin] Heightmap from model

Postby CoolDown » Sat Aug 02, 2014 11:30 pm

Dave R wrote:
CoolDown wrote:Hey Didier Bur, Im using the SketchUp Make 2014, and the extensions are .rbz(Ruby) files, so I could not install your extension .rb, and i tried to add a "z" at the end as well, but it didn't install. So I was wondering if you could write a new version for this 2014 build ?


Although Didier should update this plugin to work in SU2014, your method of installing it is incorrect, too. Changing .rb to .rbz is the wrong way to go. SketchUp still uses .rb as the extension for plugins. The .rbz extension is for packaging and to allow you to install via Install Extension, the Sketchucation Plugin Store, or the Extension Warehouse. Changing the extension of the zip file to .rbz will make it possible to install using Install Extension.

Before you change the extension, though, edit the last line of the rb file as indicated here: viewtopic.php?f=323&t=12354&p=529566&hilit=unpack#p515316


Dave R, thanks for the reply, I understand what you told me to do, but the link you gave is not opening, could you tell me what to edit on the last line of the code ?
0

CoolDown 
 

Re: [Plugin] Heightmap from model

Postby TIG » Sat Aug 02, 2014 11:54 pm

@Yuri

I edited Dave's link - it now takes you to my post about that edit fix for many of Didier's packed plugins...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Heightmap from model

Postby CoolDown » Mon Aug 04, 2014 7:05 pm

Thanks TIG
0

CoolDown 
 

Re: [Plugin] Heightmap from model

Postby TIG » Tue Nov 04, 2014 6:37 pm

Didier has agreed that I might update some of his scripts in the PluginStore, to make them v2014/2015 compatible...
Please get the latest version from the PluginStore

Download

0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Heightmap from model

Postby Spohankie123 » Mon Jul 20, 2015 4:42 pm

2015 sketchup pro, iMac recent model OSX yosemite


The latest .rbz version installs just fine from the prefs. It shows up on my menu and reminds me if the projection/view is not orthographic. It goes to the next panel to choose an option BUT when I click OK, nothing happens. I've tried this on different machines and the new version fails on sketch 2014 as well. BUT the older version (.rb with the pdf attachment) works fine on an old Mac running sketch pro 7.1!

Is there something I'm missing here? Does the new version fully support OS X?

any suggestions?

many thanks,
0

Spohankie123 
 

Re: [Plugin] Heightmap from model

Postby TIG » Tue Jul 21, 2015 12:59 pm

Please try it on your MAC in v2014/2015 with the Ruby Console open...
Are there any error messages ?
0
TIG
User avatar
TIG 
Global Moderator
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

PreviousNext


 

Return to Plugins

Who is online

Users browsing this forum: faust07, pcmoor, pibuz and 129 guests

Visit our sponsors: