Smooth Terrain Heightmap/Colormap Importer Release!

Oh, yes I see I don’t think I really got it right before, thanks for explaining it to me.

1 Like

Did you guys keep track of imported heightmaps prior to the new image moderation downgrade?

How do you actually get colormaps though? I’ve been searching the internet and I can’t seem to find a way to generate them from hightmaps.

I think you need to copy the RGB of the materials listed above and just draw in Paint/Blender

Alright I’ll try that, also can you just use a texture for the colormap? So instead of doing that just upload a texture?

Most terrain generation plugins such as World Machine will give you the color map as an option. If you want to make it manually, I’d suggest you do it in GIMP. Make the heightmap the background layer and add multiple other layers, one for each material. The rest is pretty self explanatory. Just make sure not to use alpha for the color map as Roblox doesn’t support material blending and don’t forget to assign correct colors when you are done.

2 Likes

So… just finished making a PNG implementation in Lua :eyes:

I haven’t released the source publicly yet because I don’t want to step over any lines without consulting some staff members first.

Although personal blame could be slapped onto me for creating this implementation, there’s this a saying that goes:

I figured this would be a fun challenge to take on in order to advance my skills in computer science and software engineering. I only question what the consequences of having such power could do.

I created a singleplayer game to demonstrate my library here:

If any Roblox staff want to reach out and discuss this further, feel free to contact me.

24 Likes

I’m surprised by how fast this actually is. I’d expect it to take at least 2 minutes to generate a 1000x1000 image, but it barely took me 20 seconds.

4 Likes

Update: I wrote my own implementation of the height map importer in pure Lua using my PNG library. It restores the instant terrain importing functionality

As with the PNG library itself, I am not releasing this publicly right now.
The intent here is to amplify the point I was trying to make previously.

19 Likes

Got the OK to release this!
https://www.roblox.com/library/3980893189/Terrain-Importer

Plugin Source:
https://github.com/CloneTrooper1019/Roblox-Terrain-Importer

19 Likes

Wow, That looks awesome, is it going to be a game or a showcase?

Just a showcase. I made it to see if I could.

3 Likes

it looks great! I really like it. keep up the good work!

Thanks so much! Ima check this out when I have time.

I took a break from Roblox so I haven’t had a chance to really check this out. Now that I have had a chance to try it, have to say, not bad! It definitely has problems, but it is far better than the alternatives.

  • It is far too thin though, making it difficult to modify, occasionally leaving holes.
  • Having to upload the height and color map leaves a lot of waiting for moderation, on an asset that really shouldn’t need to be uploaded in the first place.
  • Relying on only a single channel for the height greatly reduces the potential resolution. Imagine going from a 256 to a 16777216 resolution! Especially for mountainous terrain.
  • A lot of the time, it either requires a lot of iteration, or another program to visualize the height map before it is imported.

I look forward to a day when we can just apply height maps directly to surfaces like a brush.

  • Don’t really see what you mean here. Yes it will leave holes if you make your map too thin, which is why we have scale and offset. If you don’t want any holes, either avoid using the 0 value, or fill the entire space below with terrain before importing the heightmap and offsetting it by 4 on the Y scale.
  • True, I won’t go into details because I ranted about this enough already.
  • I don’t know if Roblox discards this once uploaded, but you can use 16 bit RGB images. Heightmaps aren’t meant to be used raw. Most games apply some kind of smoothing post-processing, unless their world height limit is capped. Roblox doesn’t need this as you were supposed to apply the details yourself.
  • Same goes with 3D models, textures and everything else that is a visual. The advantage that heightmaps have is that you can opt for a standard image editor or a specialized program.

Yeah, sorry, but the moderation requirement here is absolutely absurd and places a gigantic burden on the developer trying to use this feature. I understand why it works like this, but this ruins the feature. At this point, I’m considering just writing a new tool to grab the data from a locally-run web server.

Now, considering that I can do that, perhaps this limitation isn’t the most well thought out. If you can’t get the board members to budge on this using moderation-approved images, at least propose allowing pre-moderated images, but tag the asset ID as having been used to generate terrain in whichever place ID. Then if moderation blocks the image, you can also flag it for a human to determine whether or not it contains inappropriately shaped terrain.

That being said, please don’t automatically block places if they’ve had an associated heightmap blocked by moderation. Moderation is still extremely prone to false-positives, especially in grayscale images like a heightmap. I know this probably sounds obvious, but it’s worth saying.

EDIT: In fact, in the 10+ minutes I spent thinking about this post and writing it, my test heightmap still hasn’t been approved by moderation. We need some sort of faster development loop here if this tool is going to be useful.

EDIT 2: Forgot to mention, I just ended up using CloneTrooper’s version. Though it looks like there’s a bug where the terrain isn’t completely filled on occupancy, so the Erode and Smooth tools have really intense effects even on the lowest strength setting.

11 Likes

This is a must have plugin. I do have one thing slowing me down… is there a way to choose which materials are used with the colormap? As of right now I get a default set of materials not of my choosing. Also, If I could request one feature it would be the default no colormap material be changed to grass or ground as opposed to slate that’s used now. Slate seems rare vs how many maps consist primarily of ground or grass.

1 Like

If you turn your graphics down it won’t slow you down

1 Like

Oh sorry. I meant slowing down my workflow. Right now I have to hand paint every inch of terrain. If I could choose the materials it would be closer to built in terrain tools. Like how mountains that are generated by the standard tools always have snow, rock, mud, then ground. With the plugin all that needs painting.