Author Topic: Heightmap Generator  (Read 7216 times)

Heightmap Generator
A client-sided add-on designed for experimentation with procedural noise. The generator works by overlaying various iterations of noise waves together to create a heightmap, which can be saved to a text file; various options are included to modify the final result. Right now, this add-on isn't overly practical. However, I'm hoping to add support for importing text-based heightmaps to either PTG or Simplex Gen in the near future.




Notes:
  • In addition, you can technically save a heightmap by using the print screen button on your keyboard and cropping it via an image manipulation program.
  • All options (except rendering) apply to a saved heightmap - make sure to generate a render before saving.
  • You may experience client lag when first generating a render, especially when switching to larger grid sizes.
  • Should work fine on Macs
  • Currently supports Perlin Noise / Fractals and Incoherent Noise, but support for other types of noise may be added later

Address in a future update:
  • Fix issues with tiling (?)
  • Fix pixelation so that it works with fall off (and other options?)
  • Fix inversion on y-axis when saving height values to file



Downloads:
Blockland Glass (v1.0.0 - 228 Kb): https://blocklandglass.com/addons/addon.php?id=661
« Last Edit: July 01, 2017, 06:09:32 PM by [GSF]Ghost »


now make it work for the random map generator and this will be the best thing ever

can this be used to convert old terrain maps to bricks

can this be used to convert old terrain maps to bricks
If you have their heightmaps and if Ghost can get it working with PTG, yes

GSF Ghost does it again! Very nice and it's not if he can get it working with PTG, it's when. This guy knows his stuff.

GSF Ghost does it again! Very nice and it's not if he can get it working with PTG, it's when. This guy knows his stuff.
strait up

If you have their heightmaps and if Ghost can get it working with PTG, yes
Couldn't they just be ripped from old Blockland with the editor?

Couldn't they just be ripped from old Blockland with the editor?
They can, and i've already done that with the Bedroom, Slopes, and the Kitchen if anyone needs/wants 'em


if you find a practical, convenient way to import heightmaps with torquescript that doesn't take years to process that's gonna have super neat implications, hope you can figure it out

GSF Ghost does it again! Very nice and it's not if he can get it working with PTG, it's when. This guy knows his stuff.
strait up
Thanks =) I am hoping to start work on the next update to PTG fairly soon.

can this be used to convert old terrain maps to bricks
If you have their heightmaps and if Ghost can get it working with PTG, yes
if you find a practical, convenient way to import heightmaps with torquescript that doesn't take years to process that's gonna have super neat implications, hope you can figure it out
Torque used to be able to import image-based heightmaps prior to the v21 update, but I think that feature has been disabled ever since. There is a function for reading image pixels, but it's very slow and hard to use.

If someone can write a program to convert image maps to text-based maps (or the other way around), it could prove to be very useful. I might look into this myself; it would be a good reason to learn a raw scripting language - like Python, c# or c++. This would also allow for recreating old terrain maps with bricks.
« Last Edit: May 03, 2017, 12:58:00 AM by [GSF]Ghost »

Torque used to be able to import image-based heightmaps prior to the v21 update, but I think that feature has been disabled ever since. There is a function for reading image pixels, but it's very slow and hard to use.

If someone can write a program to convert image maps to text-based maps (or the other way around), it could prove to be very useful. I might look into this myself; it would be a good reason to learn a raw scripting language - like Python, c# or c++. This would also allow for recreating old terrain maps with bricks.
yeah i'm pretty sure that was a terrain-specific feature, and since reading pixel colors takes a super long time for a whole image and ts can't read binary data, i think the only practical solution would be to convert images into a compatible text format. or have an external server process the data and send it back

So... What is this supposed to be used for? I've re-read the description several times
and from what i can tell, all this addon does is generate a fancy image, and doesn't
do anything else.

Now, i'm sure these images can be useful to some people, but this addon is pretty
much useless to anyone who isn't a coding wizard, mainly because it doesn't add
anything to the actual game, no bricks, no events (VCE included), no emitters,
no in-game functionality, nothing.

If anything, this would've been better off as a standalone application, there was no
need to make an addon out of it.

So... What is this supposed to be used for? I've re-read the description several times
and from what i can tell, all this addon does is generate a fancy image, and doesn't
do anything else.

Now, i'm sure these images can be useful to some people, but this addon is pretty
much useless to anyone who isn't a coding wizard, mainly because it doesn't add
anything to the actual game, no bricks, no events (VCE included), no emitters,
no in-game functionality, nothing.

If anything, this would've been better off as a standalone application, there was no
need to make an addon out of it.

it could be useful if you want to generate a map, but more importantly, the fact that these things are working entirely within blockland shows that further add-ons which build upon this functionality can be made. terrain generators are nothing new (even if easily used ones are harder to come by), but the idea of being able to import/export heightmaps entirely within blockland has exciting potential if it can be effectively put to use. most people aren't going to actually use this for anything, but it shows progress in procedural generation that is meaningful. it's also a useful interface for being able to test and experiment with generation before executing the drawn-out process of actually building it out with bricks

how hard is it to implement new noise generators? for instance, i've written a working 2D simplex noise generator in blockland in the past, but how much additional code would be necessary to implement it here?
« Last Edit: May 03, 2017, 09:12:52 PM by otto-san »