New Cloud Control Inputs

Started by miqtidar, November 27, 2010, 04:01:34 PM

Previous topic - Next topic

Tangled-Universe

Quote from: dandelO on December 02, 2010, 05:54:21 PM
Cool write-up there, cheers, TU.

When I use shaders that also enter the main network to drive the cloud functions, I've done it with only shaders right at the top of the chain, meaning that if I use a terrain heightfield for a cloud function, it hasn't even passed through any other nodes at all yet. The heightfield shader node allows you to colour any terrain from a black base to white at the highest points, there's a depth map right there. Colour adjusting to invert this gives you the reverse, obviously, which can be used to modulate clouds only between the peaks, that still mimic the terrain forms. I don't think it warrants the use of a separate image map of the terrain every time, unless you're passing the mask through many other nodes(probably most troublesome would be 'compute terrain' as it would triple calculation time of the functions entering the cloud shader) before it reaches the cloud.
I'd think using the black/white colour output of high up shaders in the network should be fine in most cases.

I see what you mean and I think you're mistaking by thinking that a heightfield-shader, it's displacement and derivement of colour is not so complex compared to an image map. It is.

Also, one would need to output an image map of the FINAL terrain.
In my example I kept things as simple as possible, so I made an image map of the terrain right after the compute terrain.
Logically, you can also make an image map of the terrain from the very last shader, preferably precedented by a compute terrain to make sure the output is correct.

The resulting mask perfectly describes the elevation of your final terrain. Perfectly, ok, that depends on the resolution you set in the heightfield generate node.

There's also no need to pass this mask through any other nodes, as it already is the map of the final terrain and you also make it for a single purpose.

Oshyan

Quote from: mhaze on December 02, 2010, 09:58:41 AM
seem to be missing an image map - 1px_4px_blur_b.sgi

I don't think this file was provided in the original package I got. Martin, is the SGI included intended to be used instead? It has a different name.

- Oshyan

Dune

Thanks a lot, Martin. This will be most helpful!

Tangled-Universe

Quote from: Oshyan on December 02, 2010, 10:48:24 PM
Quote from: mhaze on December 02, 2010, 09:58:41 AM
seem to be missing an image map - 1px_4px_blur_b.sgi

I don't think this file was provided in the original package I got. Martin, is the SGI included intended to be used instead? It has a different name.

- Oshyan

Grrr...I double-checked the contents but still overlooked that :(
Here's the SGI file which creates the terrain, without it it's a pretty useless tutorial ;)
It needs to be put into the same folder as the tutorial resources.

Apologies for the inconvenience!

Cheers,
Martin

Oshyan, could you update the archive with this file please? Thanks :)

rcallicotte

Looking forward to looking into this.
So this is Disney World.  Can we live here?

Oshyan

The download has been updated on the site.

- Oshyan

Tangled-Universe


Cyber-Angel

#37
Can the image masking techniques as described in the PDF be modified to work with Power-Fractals, or do they only work with Heighfeilds? Since the Majority of the work in TG2 is based on the Power-Fractal, that I have seen. Sorry if this isn't the right place for this question!

Regards to you.

Cyber-Angel    

Hetzen

I think Martin describes how to make an image mask from your fractal landscape in the tutorial. You have to localise the effect.

Tangled-Universe

Hi Cyber,

It's possible to use the functions, but if you scroll a few messages up you'll find some discussion which explains why it's better not to do so.

Martin

Seth

great tutorial !
most excellent way to understand the new features !
thanks dude ^^


Tangled-Universe

Thanks Franck, you're welcome ^__^
What about our meet and greet in Paris? :)

Hetzen

Martin, quick question about the new Cloud Density input. What values does it expect? I assume 0 to 1. If so, how does this correlate with the clouds internal density which defaults to 0.01. At a guess it would multiply that smaller value by 0 to 1.

Tangled-Universe

Quote from: Hetzen on December 04, 2010, 08:56:08 AM
Martin, quick question about the new Cloud Density input. What values does it expect? I assume 0 to 1. If so, how does this correlate with the clouds internal density which defaults to 0.01. At a guess it would multiply that smaller value by 0 to 1.

Looking at the release note which describes it "multiplies or reduces" the final density.
I consider this that when you have an input of >1 that the density will be modulated towards a density higher than set in the cloud node.

To see if this is true I will prepare an example, right now.

Tangled-Universe

#44
Here it is. Cloud density is set at 0.01 and I used a constant shader with a value of 1 as density shader input.
The localised cloud does not use falloff and has value at radius set to 1.

At a setting at 1 the density is unchanged (although the result looks slightly different, but that's because the lighting solution is different, hence top left and shadow on red sphere).
With a setting of 2 the density increases.

So as you can see the cloud density will be over-ruled by the final density modulator. The input of the final density modulator seems to be a multiplier. Therefore Matt mentioned it could also reduce density because that's what would happen if the input of the final density modulator is <1.