Heightmap to brick converter?


RE: Heightmap to brick converter?
#14
(2018-06-20, 10:22)Jaco van der Molen Wrote: Oh, I see. Very interesting. I know the Diamond square algorithm is used in games for example to create terrain.
I found a post on Stackoverflow how to make a Diamond square algorithm output to excel, but it doesn't work properly.
If we could somehow get a Diamond square algorithm to work in excel and it outputs numbers in cells, we could use your script.
Or better still straight in LDCad.

I have a few thoughts on this and what it should be able to do, but alas I am not a programmer so no idea how to make it.

My idea is as follows:
  • Modify the script to use only 1x1 plates
  • Be able to set user prefs like set up dimensions in baseplate format 16x16, 32x32 or 48x48
  • Set up colors corresponding to plate height for terrain
    Ie. very global 0 = blue water, 1 = tan sand, 2 = bright green gras, 3 = green trees, 4 = DBG hill, 5 = LBG mountain, 6 = whith snow top
Then
  • Using the Diamond square algorithm create output in Excel or straight in LDCad (?) to fill the height array
  • Generate the LDraw model
That would be awesome.

Should all be possible directly in LDCad, but with 1.6 the main problem is the 'slowness' of the addNewRef function as it takes ~1ms and currently the maximum runtime of a script is limited to 2000ms. I will remove that limitation in 1.6c though (if ever released, so 2.0 otherwise).
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: Heightmap to brick converter? - by Roland Melkert - 2018-06-20, 17:18

Forum Jump:


Users browsing this thread: 1 Guest(s)