[Plugin] Heightmap from model

[Plugin] Heightmap from model

Postby Didier Bur » Wed Dec 16, 2009 10:25 pm

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

Get the latest version from the PluginStore

Download

0
Last edited by Didier Bur on Wed May 05, 2010 8:59 pm, edited 2 times in total.
Didier Bur (Bytes Farmer)
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 thomthom » Wed Dec 16, 2009 10:28 pm

That is interesting. Could probably use the generated image as displacement texture in render engines.
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [PLUGIN] Heightmap from model

Postby CadFather » Wed Dec 16, 2009 11:06 pm

Thanks Didier, very interesting and good to see you around.. :thumb:
0
Quarr-IT - SketchUp Training from the Master.. http://quarr-it.com/
User avatar
CadFather 
PluginStore Author
PluginStore Author
 

Re: [PLUGIN] Heightmap from model

Postby Gaieus » Thu Dec 17, 2009 8:48 am

Hi Didier,

Indeed, long time no see and good to know you are still around.

I have been looking at Unity for a while now so I guess this will come handy soon - thanks! :thumb:
0
User avatar
Gaieus 
 

Re: [PLUGIN] Heightmap from model

Postby Pixero » Thu Dec 17, 2009 10:49 am

I get a instant BugSplat upon starting SU.
When I remove it from the plugins folder SU starts normally.
Using latest SU and the english version of your script.
0
User avatar
Pixero 
Premium Member
Premium Member
 

Re: [PLUGIN] Heightmap from model

Postby TIG » Thu Dec 17, 2009 2:48 pm

Same here... :(
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [PLUGIN] Heightmap from model

Postby ilay7k » Thu Dec 17, 2009 6:28 pm

Thanks
Works at 6 version, but slow, seems my pc is slow
same thing at 7 as TIG and Pixero
0

ilay7k 
 

Re: [PLUGIN] Heightmap from model

Postby DIEGO-RODRIGUEZ » Thu Dec 17, 2009 7:48 pm

thank you very much for sharing.
Could make the menu visible, in order to personalize it.
the plugins *.rbs , and menu of plugins *.rb
0

DIEGO-RODRIGUEZ 
Banned
 

Re: [PLUGIN] Heightmap from model

Postby Didier Bur » Thu Dec 17, 2009 7:50 pm

I get a instant BugSplat upon starting SU.

:evil: :evil:

Are you on Mac, guys ? or do you use 7.1. ?

Always the same boring SU version update problems with rubies, I guess...
0
Didier Bur (Bytes Farmer)
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 Dec 17, 2009 8:05 pm

PC, Vista, with latest SUp v7.1+M1
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [PLUGIN] Heightmap from model

Postby Didier Bur » Thu Dec 17, 2009 8:29 pm

@TIG:

I'm on SU v7.0.8657
Do you know of any change in the API for 7.1. ?
0
Didier Bur (Bytes Farmer)
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 Dec 17, 2009 8:37 pm

Didier Bur wrote:@TIG:
I'm on SU v7.0.8657
Do you know of any change in the API for 7.1. ?

- arccurve.is_polygon?
- adding entities to groups initially seems less bugsplatty but it's not documented...
so none that should affect this...
0
Last edited by TIG on Thu Dec 17, 2009 8:51 pm, edited 1 time in total.
TIG
User avatar
TIG 
Global Moderator
 

Re: [PLUGIN] Heightmap from model

Postby thomthom » Thu Dec 17, 2009 8:49 pm

Didier Bur wrote:@TIG:

I'm on SU v7.0.8657
Do you know of any change in the API for 7.1. ?

Model.number_faces

only additions AFIK
0
Thomas Thomassen — SketchUp Monkey & Coding addict
List of my plugins and link to the CookieWare fund
User avatar
thomthom 
PluginStore Author
PluginStore Author
 

Re: [PLUGIN] Heightmap from model

Postby TIG » Thu Dec 17, 2009 8:52 pm

Have you modified any 'built-in' methods that might clash with others mods ?
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [PLUGIN] Heightmap from model

Postby Didier Bur » Thu Dec 17, 2009 11:15 pm

@TIG: No, I never do that !
0
Didier Bur (Bytes Farmer)
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 Didier Bur » Thu Dec 17, 2009 11:17 pm

@TIG: No, I never do that !
0
Didier Bur (Bytes Farmer)
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 AcesHigh » Fri Dec 18, 2009 1:23 am

awesome Didier! I had asked for such a plugin some months ago! It will be great to create some bumpmaps (or displacement maps) to use with VRAY!
0

AcesHigh 
 

Re: [PLUGIN] Heightmap from model

Postby EarthMover » Fri Dec 18, 2009 3:14 am

Didier I extracted the plugin to the plugins folder and it causes SU to crash upon opening. I removed the plugin and SU opened fine.
0
3D Artist at Clearstory 3D Imaging
Guide Tool at Winning With Sketchup
Content Creator at Skapeup
User avatar
EarthMover 
Premium Member
Premium Member
 

Re: [PLUGIN] Heightmap from model

Postby Didier Bur » Fri Dec 18, 2009 6:53 pm

It seems that crappy Vista is causing the problem (as usual).
Since the script writes binary BMP or RAW files, ensure you have the right to do this (be logged as admin ?)
Any other clue anyone ?
0
Didier Bur (Bytes Farmer)
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 Pixero » Sat Dec 19, 2009 7:32 am

Well...I had the same problems on XP at work, so... it can't be just Vista.
0
User avatar
Pixero 
Premium Member
Premium Member
 

Re: [PLUGIN] Heightmap from model

Postby notareal » Sat Dec 19, 2009 1:27 pm

:thumb: Nice tool. Wonder if hdr or exr would be possible as file options.
0
Welcome to try Thea Render, Thea support | kerkythea.net -team member

notareal 
Thea Render Support
Thea Render Support
 

Re: [PLUGIN] Heightmap from model

Postby TIG » Sat Dec 19, 2009 4:37 pm

Didier Bur wrote:It seems that crappy Vista is causing the problem (as usual).
Since the script writes binary BMP or RAW files, ensure you have the right to do this (be logged as admin ?)
Any other clue anyone ?

Where does it write these to?
I am an admin so it shouldn't matter.
Also it crashes SUp BEFORE you try to do anything - just by loading it you get the problem.
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [PLUGIN] Heightmap from model

Postby charly2008 » Sat Dec 19, 2009 5:13 pm

Hi TIG,

i have the same problem with XP. SU7 was just by loading and then came a Bugsplat.

Karlheinz
0
He who makes no mistakes, makes nothing
User avatar
charly2008 
 

Re: [PLUGIN] Heightmap from model

Postby Didier Bur » Sat Dec 19, 2009 6:58 pm

Where does it write these to?

It writes images at the same location than the SKP is.
it crashes SUp BEFORE you try to do anything - just by loading it

That's what is really strange. I don't overwrite built-in methods, don't do any 'require' or something that involve other files.

Would you please test this version and tell me if the problem persists ? :bounce:
0
Didier Bur (Bytes Farmer)
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 Pixero » Sat Dec 19, 2009 7:05 pm

Still crashes instantly while loading SU. Now on Windows 7 64bit. SU 7.1.
0
User avatar
Pixero 
Premium Member
Premium Member
 

Re: [PLUGIN] Heightmap from model

Postby charly2008 » Sat Dec 19, 2009 7:25 pm

it still crashes while loading SU.

Karlheinz
0
He who makes no mistakes, makes nothing
User avatar
charly2008 
 

Re: [PLUGIN] Heightmap from model

Postby TIG » Sat Dec 19, 2009 8:19 pm

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...
0
TIG
User avatar
TIG 
Global Moderator
 

Re: [Plugin] Heightmap from model

Postby georglorenz » Sat Jan 16, 2010 4:11 am

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
0

georglorenz 
 

Re: [Plugin] Heightmap from model

Postby Chris Fullmer » Sat Jan 16, 2010 4:46 am

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
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 notareal » Sat Jan 16, 2010 3:07 pm

Nice work!
0
Welcome to try Thea Render, Thea support | kerkythea.net -team member

notareal 
Thea Render Support
Thea Render Support
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 

Next


 

Return to Plugins

Who is online

Users browsing this forum: adnawri, medeek, NAGGA, Pio Pinzón and 3 guests

Visit our sponsors: