TG Earth model progress.

Started by bigben, February 21, 2015, 12:42:36 AM

Previous topic - Next topic

Oshyan

Ah, thanks for the additional info. Good to know.

- Oshyan

bigben

Exploring an idea on using the image texture colour to mask TG shaders to rebuild the image.  Comparing a reference colour to colour in the image using the angle between two vectors constructed from the RGB values...  Sample images are the image map masked for a particular colour.  The idea is to replace the image map entirely with TG shaders using the image map to control distribution and blending between the surfaces.

bobbystahr

This looks totally brilliant but I'll need a math education to grok it. Well done/doing Ben....
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Ariel DK

 :o :o brilliant!! how is that not even occurred to me?!
this really works?
requires a great texture to correctly define the coastlines?
Hmmm, what version of Terragen does God use?

bigben

#34
If you really want to explore the math:.. From "Maths is Fun" http://www.mathsisfun.com/algebra/vectors-dot-product.html This is actually quite a useful little function for lots of things.

But you don't really need to understand it to use it in this case. Input is an image  and a reference colour, output is a greyscale mask of colour similarity in the image to the reference colour (not including intensity). I'd started to explore this idea using Colour Select in Photoshop to create greyscale mask images, but that has obvious implications for RAM usage.  This will sacrifice a little realism for (hopefully) a nicer looking render once you surpass the resolution of the image texture (e.g. the previous lake image with a very low res texture underneath)

Apart from altitude restrictions, I have high res mask images for coasts and all water boundaries.

Ariel DK

I see this link later (I have a little sleep to think matematicas now)
regarding the method, I suspect think I could still be a good way to get "extra details", especially for (as suggested Oshyan) create a more "versatile" model of the Earth
and of course, the realism is lost a little when the resolution of the texture is exceeded. I should experiment on my own for talk a bit more about that
Hmmm, what version of Terragen does God use?

bigben

Onwards to the pole...  Blue marble has no sea ice.  Here is the monthly average coverage of sea ice for April... Colour adjust shader can get you the max or min coverage depending on what you want, as well as monthly data to go with the Blue Marble images.   8)  I'll build a basic ice sheet but leave it to others to rough it up. Data is for both poles, and is only a 1800x900px image map.

Oshyan

I'm super excited about the procedural detail masks!

- Oshyan

lat 64

Quote from: Oshyan on March 14, 2015, 03:05:56 PM
I'm super excited about the procedural detail masks!

- Oshyan
I'm rather lost(don't worry, I'll just watch), but it seems like it's reverse anti-aliasing the low-res image. Very cool whatever it is.
8)
I'm a half century plus ten yrs old. Yikes!

bigben

Quote from: lat 64 on March 14, 2015, 04:38:51 PM
I'm rather lost(don't worry, I'll just watch), but it seems like it's reverse anti-aliasing the low-res image. Very cool whatever it is.
8)

It's more like posterising the image into fewer colours and then replacing each colour in the image with a procedural surface. Here's a very quick demo using the orange example above.

Once you get multiple colour-based masks in action they will also overlap providing additional variation/transitions and you can also rough up the edges of the mask.

bigben

And a clearer example of the ice cap mask

bigben

Quote from: Oshyan on March 14, 2015, 03:05:56 PM
I'm super excited about the procedural detail masks!

- Oshyan

I hadn't gone that far yet as there was one piece of the puzzle missing. The mask is essentially just a hue similarity, so it doesn't distinguish between dark green and light green for example.  I've been hovering around the answer a couple of times in coming up with this model and it finally came to me.  The lightness of a colour can be put into a useable form by converting it to a vector (RGB in the range of 0-1) and then dividing the length of that vector by the square root of 3 (the length of that vector in a 0-1 range)  Most of this is already in the previous mask model so it's only a couple of extra nodes.

Now I'm super excited too  ;D

bobbystahr

Still baffled by the maths but generally blown away by your results....
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Dune

Smart thinking, Ben! I'm getting very excited as well.

bigben

Here's a clip file for the mask if people want to play with it. It takes a little experimenting with to get used to, and I'd strongly recommend using a preview shader while tweaking the numbers in the colour adjust nodes for the final output. For the reference colour, I'd suggest using either a light or dark variant of the reference colour which will make it a bit easier to use the lightness mask.

Screengab shows how I've connected it up.  Input is a convert colour to vector node. I haven't included it in the clip as it would most likely lead to unnecessary duplication of that node.

I usually build up my procedural colours from dark to light, so on this case I'm using the lightness mask to differentiate between tones, and the colour mask to control the total distribution of the parent shader.