Heightmap to brick converter?


RE: Heightmap to brick converter?
#19
(2018-06-22, 17:39)Roland Melkert Wrote:
(2018-06-22, 7:14)Jaco van der Molen Wrote: Do you mind sharing this script? Can I run some tests too on smaller scale?

Attached zip contains two .lua files, put landscape.lua in the global folder and heightmap.lua in the modules folder of %appdata%/LDCad/scripts/default

Also change the
maxExecTime
value to 2000 in main.cfg for the maximum time allowed in 1.6b (instead of the default 250ms)

Using a freshly started new file might be slightly faster as deleted type 1 lines are still kept in memory and thus processed during addNewRef stuff.

On my system it runs at max 64x64 (most of the time) within the 2s limit. It's an older system though, so you might go higher if you have a more recent one.

Look for hMap.create to change the dimensions, (should be powers of 2).

I get this error:

[string "landscape.lua"]:11: module 'heightmap' not found:
    no field package.preload['heightmap']
    no file 'C:\Users\mj\AppData\Roaming\LDCad 1.6b\scripts\default\global\heightmap.lua'
    no file 'C:\Users\mj\AppData\Roaming\LDCad 1.6b\scripts\default\modules\heightmap.lua'
    no file 'C:\Program Files (x86)\LDraw\LDCad 1.6b\heightmap.dll'
    no file 'C:\Program Files (x86)\LDraw\LDCad 1.6b\..\lib\lua\5.3\heightmap.dll'
    no file 'C:\Program Files (x86)\LDraw\LDCad 1.6b\loadall.dll'
    no file '.\heightmap.dll'
Script main run failed.
Jaco van der Molen
lpub.binarybricks.nl
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: Heightmap to brick converter? - by Jaco van der Molen - 2018-06-25, 12:34

Forum Jump:


Users browsing this thread: 2 Guest(s)