Planetside Software Forums

General => Terragen Discussion => Topic started by: monks on October 10, 2008, 05:02:24 PM

Title: Getting two colours from one surface layer?
Post by: monks on October 10, 2008, 05:02:24 PM
Is this possible?

I've got an image map that I want to use to control the bounding area of 2 colours.
I've gto a single surface layer. I've removed the default fractal breakup node though from the surface layer.
I have an image map going to 2 colour adjusts. How would I input those into the single surface layer to get a mix WITHOUT using altitude or slope.
I'm really trying to minimise the number of nodes here, any other suggestions would be welcome.
Any ideas??

monks
Title: Re: Getting two colours from one surface layer?
Post by: bigben on October 10, 2008, 08:15:45 PM
I take it you have a greyscale image map and you want to apply colour to the high and low values, with mixtures in between?

It's quite simple really.  Set the white point to the greyscale value that you want the colour to appear fully, and the black point to the number that you want it to disappear. (scale of 1 to 0)  That's all there is to it.  If the black pooint is higher than the white point the greyscal image will appear inverted, so there's no need to invert the mask at all.

http://forums.planetside.co.uk/index.php?topic=2519.msg25275#msg25275 (http://forums.planetside.co.uk/index.php?topic=2519.msg25275#msg25275)
http://forums.planetside.co.uk/index.php?topic=2549.0 (http://forums.planetside.co.uk/index.php?topic=2549.0) Flat ocean, coloured using an image map of bathymetric data
Title: Re: Getting two colours from one surface layer?
Post by: monks on October 11, 2008, 05:58:53 AM
Thanks Ben, I'll give that a go   :)

monks
Title: Re: Getting two colours from one surface layer?
Post by: mhaze on October 12, 2008, 08:18:58 AM
I'm totally confused by your examples and can seem to make monks set up work. How about a simple example for the mentally challenged please

Thanks

Mick
Title: Re: Getting two colours from one surface layer?
Post by: bigben on October 12, 2008, 03:21:41 PM
http://archive.bigben.id.au/tgdemo/colour_adjust_mask.tgd (http://archive.bigben.id.au/tgdemo/colour_adjust_mask.tgd)

This demo overlays two masked surfaces (green and blue) over a red surface producing a complete spectrum of colours. Simply substitue a greyscale image map for the Fractal node feeding the colour adjust shaders.
Title: Re: Getting two colours from one surface layer?
Post by: mhaze on October 13, 2008, 04:23:26 AM
Thanks BigBen I'll give it a go
Title: Re: Getting two colours from one surface layer?
Post by: mhaze on October 13, 2008, 01:13:14 PM
No matter what image or type of image I use for a mask this causes terragen to crash soon after usually on the next change or the one after.

I came up with my own similar solution and the same thing happened, any ideas?

Mick
Title: Re: Getting two colours from one surface layer?
Post by: Oshyan on October 14, 2008, 12:36:25 AM
Are you using "Through Camera Projection" in your Image Map shader? You will need to assign a camera to stop it from crashing. Either that or use a different projection type, though Through Camera may be necessary for your particular technique.

- Oshyan
Title: Re: Getting two colours from one surface layer?
Post by: mhaze on October 14, 2008, 04:46:26 AM
Thanks Oshyan I'll try that

Mick