Questions on Color

I have two questions.

  1. How do I use a custom gradient in the Colorize from file in the Colorize device?
    I created a gradient in png format, and tried to load it, but that doesn’t work. What is the correct way to use my own gradient from an image?

  2. Is it possible to get a color from a bitmap, and use it as height data?
    Say for example, I have an image like uglymap
    and I want green to be low, yellow mid, and red high.
    Can I accomplish this with a macro?

  1. First, you must change the Colors from parameter and set it to External file. Then you must open the gradient (.png is supported) by clicking on the Open button, and after that use the slider to select the row of pixels you want to use for your colouriser.

  2. That is not yet possible, also not with a macro.

Hope this helps!

1 Like

Thanks, but my interface is quite different to the image you showed.
Are you using a macro you downloaded, rather than the default, or is there a new version of WM, I have not installed?
My Colorize properties looks like this

Also, my Colorize device has only one output port.

@Jillinger What’s the exact version of world machine are you using? Should have been mentioned with the original post btw. The latest stable version of world machine has the interface @HYLK showed.

In any case, there’s a “colorize from file” section on the right, with a button named “Select file”. Tried that yet? You have to create a linear gradient, other kinds of images are not supported YET. It can be done using photoshop or similar tool though.

Here’s a tutorial about creating those gradients from reference images. The creator of this tutorial uses world machine as well. It’s from 2015, so should work with your current version of WM.

wmversion
It should have been obvious to me that I had an ancient version, since I used WM ages ago, and don’t remember if I updated. Lol.

Thanks. I will check it out. :smiley:

1 Like

Since you’ve already gotten some answers on the first question, I’ll go ahead and throw my two cents in on the second one.

While you may not be able to do this natively in World Machine, if you have access to an image editing software such as Photoshop (GIMP is free if you don’t have access to Photoshop, and should be able to do what I describe here, though the methodology may be different), you should be able to convert that bitmap into a greyscale image that could be read by World Machine as height data. You probably won’t want to convert to greyscale and just leave it as is, though, as it probably won’t natively react correctly. Your best bet using Photoshop is to run it through the Camera Raw Filter, change the Profile to “Monochrome”, then in the tab marked “B&W Mixer”, adjust the levels of your red, green, and yellow channels (or all of the channels, if that’s easier for you), until the greyscale image looks roughly how you imagine it being (and by adjusting midpoints like orange, you can even control the steepness of the transition areas).

All that being said, assuming the bitmap is an 8-bit file of fairly low resolution comparatively, be prepared for significant banding on the terrain once you import it into World Machine.
As an example, here is the exact same linear gradient in 3 different bit depths.

8-bit

16-bit

32-bit

For the heightmap, I simply started in 32-bit mode in Photoshop, made a black to white linear gradient, saved as a .tiff file, changed the mode to 16-bit, saved another .tiff, changed the mode to 8-bit, and saved as a final .tiff. Nothing else was changed between mode changes (the s-curve of the 32-bit changing into a more rounded curve is probably more a result of the algorithm in Photoshop than a side-effect of bit-depth, though, so keep that in mind). You can see significantly more banding/dithering in the 8-bit heightmap. All this to say, if you’re working with a low bit-depth file, probably use it more as reference to build/sculpt something in World Machine rather than trying to use it as the heightmap itself.

Thanks. That sounds interesting.
I have Photoshop 7. Can that work?
If I use Gimp, would similar features be available, for example Camera Raw Filter?