localize /mask out cloud

Started by Dune, June 12, 2011, 02:59:05 AM

Previous topic - Next topic

Dune

Before I start experimenting, maybe someone knows the answer....
1: if you mask (painted shader) a certain area where one cloud will be, would it decrease render time? My theoretical method would be to add the cloud node as a child to a blended surface shader (no atmosphere needed), which goes into the planet.
And question 2: if you localize a cloud, will the coordinates take the location on the main planet, even though the cloud (where the localizing is done) is based on a second planet?

Tangled-Universe

1) There is a difference between how TG2 deals with the fractal when using "regular" masking or a localized cloud:

If you use a distance shader or painted shader or whatever else then TG2 still calculates the entire texture-space for those fractals and blendshaders.
Rendering itself will be faster since you reduced the amount of volumetric rendering by masking.

However, when using a localized cloud TG2 limits the calculation of the texture space to the localized area only.
Rendering itself will be faster too, but also the calculation of texture space.

2) Yes that's possible. I've attached an example .tgd. Somehow you need to apply the "move cloud with texture" option, but I'm not sure why.

Cheers,
Martin

Dune


Tangled-Universe

You're welcome :) Building metaclouds? ;)

Dune

Sure am. What I now need is a (blue) node to bend and widen the cloud according to height exponentially. Exactly, like a windblown volcano smoke column. I was hoping to do that with a distribution shader as a vertical gray scale, square its scalar and use that to displace X-wise, but it doesn't seem to work. Tried it with a camera and distance shader as well... nope. Perhaps a get position, Y to scalar etc... Bending it with a 3D perlin is possible but needs a lot of seeding to get the right curve. I'll find it, but if anyone can tell me, I'd be much obliged.

Dune

What I have is this, but it's not good enough. Bending works with a double squared distribution shader entered into a displacement, redirect and warp.

BUT... there must be a way to transform the width (X and/or Z) of a simple shape gradually, based on a gradual height scale. If any one knows, please tell me! 


Dune


bobbystahr

Quote from: Dune on June 13, 2011, 12:21:28 PM
Don't bother, found it.

Do share now that you've got my/our interest, heh heh heh
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Dune

Here you go.... speaks for itself. The 'position in texture' is a 'get position in texture', another constant vector can be added to shift the start location.

Tangled-Universe

Thanks for sharing this Dune.
I created something similar, though in a very different way. I think this is more versatile as the data is more flexible because it's made of functions.

mogn

To avoid the conditional, replace it with a hardstep and delete constants 0 and 1.

jo

Or just keep the conditional if it makes more sense to you :-).

It's not bad to have conditionals to choose between two things, mogn just doesn't like them. You can often avoid using conditionals if you feel you must but it does sometimes make logic harder to follow.

Dune

Can you also make it soft edged? Like the simple shape.

jo

Hi Dune,

One good reason not to use conditionals is that they are either one value or another value, which gives hard edges and can show as aliasing/jaggies.

There are various ways to make soft edges with functions. Smoothstep is a classic way to soften an edge. Other ways can be gain, bias, a smooth linear interpolation or anything else that you think could work. The idea is to use one of those methods to smooth the edge over some distance.

Regards,

Jo

jo

BTW, I will now insert my customary recommendation of "Texturing and Modelling: A Procedural Approach" :-). I'm sure you would get something out of it.