Heightmap to brick converter?

RE: Heightmap to brick converter?
(2018-06-19, 18:19)Roland Melkert Wrote:
(2018-06-19, 13:28)Jaco van der Molen Wrote: With many thanks to Roland, here is an example of a complete script to generate a kind of landscape with a "height map" from Excel.
Excel source and LDraw file attached.

Fun Smile

I was playing around with actual landscape generating last night using a "Diamond square algorithm" lua module I found somewhere.
Unfortunately it was too slow (due to the hard coded max script run time) to generate any real sized ones.

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
  • 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.
Jaco van der Molen
« Next Oldest | Next Newest »

Messages In This Thread
RE: Heightmap to brick converter? - by Jaco van der Molen - 2018-06-20, 10:22

Forum Jump:

Users browsing this thread: 1 Guest(s)