Distort Altitude Blend

Started by efflux, February 03, 2012, 07:49:42 PM

Previous topic - Next topic

efflux

There are a few things you can't do in TG2 but I think this is a crucial one.

You can't distort altitude blends. For example, in the surface shader you can altitude blend between various layers but it's a straight line - rarely happens in reality. You should be able to attach another fractal to distort the altitude value for the blend. This can result in some beautiful effects.

It may be possible to do this when using noise functions but I haven't even managed to achieve this.

Matt

#1
You can do this using a Warp Shader if you connect your Surface Layer to the "shader" connection on the Warp Shader. You can then connect any displacement shader to the "warper" connection.

The displacement will happen along the normal, which won't be perfectly vertical but should still have some effect unless you have a sheer cliff. Even in that case there are solutions. Some shaders including the Power Fractal allow you to change the direction to "Along vertical". For others that don't have this capability, use a Redirect Shader and connect the displacement shader to its Y input.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

efflux

Thanks Matt. I've got it working.

I had in fact created another altitude distortion by connecting a get altitude in texture into the warp shader's shader input but that was not ideal. Now I've worked out how to create a blend zone for the distortion in blue nodes. I don't need it now but it's always useful to know how to hook these things up.

It's probably worth me posting more about this. I'm not sure people are using this technique.

efflux

Just one question. It's related to the technique I'm talking about here. Are we going to get a voronoi fractal at any stage? The reason I ask is that voronoi is excellent for rocks. The distorting altitude blend method can make the lower surface flow up through the cracks in a the higher surface if you use the texture for warper input for the blend and use it on the higher surface's displacements. Voronoi in particular creates and awesome effect here.

Tangled-Universe

To add to this, Worley noise would be a GREAT addition too. It's very similar to voronoi, but has extra levels of complexity.
This noise-type is already integrated in World Machine. For instance see http://www.cse.ohio-state.edu/~kerwin/worley-noise.html

The "voronoise" macro for World Machine uses different mixes of voronoi noise types and a derivative of that macro would also be a really useful shader addition.

efflux

I think Worley Noise is in fact Voronoi. What we want is a few more basis functions in the fractal. Voronoi simply as a noise stands out horribly when it's used beside a rich Perlin fractal. I'm trying to create cracks in mud at the moment but the voronoi is simple looking like voronoi noise. In this case I don't want it to.

First Voronoi basis. Next I'd suggest sparse convolution. It's not as useful as voronoi but it's the one to use for craters for example. After these two, others become less useful but sine fractals are very cool for some nice wierdness. You can go totally psychedelic with sine fractals - especially if you have a colour gradient.

efflux

Here's a great page:

http://www.neilblevins.com/cg_education/procedural_noise/procedural_noise.html

In particular look at the cauliflower like shapes. These are great for rocks especially if you distort around a bit. Also good for clouds. Just look at all those fractals. Blender actually has a lot of them. TG2 has to get a voronoi basis fractal at some stage.

dandelO

Some warping of the Voronoi can give a much more varied effect. I've no doubt you know that, Efflux of course, but it goes some way in the meantime to break up the regularity. As long as position in texture is used then it can be warped, here it's very mild but the straight lines can be pretty much removed according to warp.

* Excuse the ugliness of the render, it's just an intersection settings test to partially bury underlying features close-up.

digitalis99

Quote from: efflux on February 04, 2012, 08:05:57 AM
Here's a great page:

http://www.neilblevins.com/cg_education/procedural_noise/procedural_noise.html

In particular look at the cauliflower like shapes. These are great for rocks especially if you distort around a bit. Also good for clouds. Just look at all those fractals. Blender actually has a lot of them. TG2 has to get a voronoi basis fractal at some stage.

Oh...I like the cellular round variants.  That would be great for the sea foam shading I'm working on.
Pixel Plow :: Render Endlessly :: http://www.pixelplow.net

efflux

Yeah, that cracked mud looks quite good.

Looking at real cracked mud I think the difference is that nature doesn't have the simple algorithm of voronoi noise. Even a voronoi fractal lacks a bit at this. In real mud cracks often go a long distance then other cracks will branch out.

dandelO

#10
Yes, and cells sometimes happen to break up into smaller versions of themselves, as well as a kind of perpendicular cracking on the cell walls, I've went some way into trying to work the first part of that out but it's still too 'cellular'. I did work out a method to rescale noise, though, you might look at this thread(gets quite interesting on page 2) to try it out with some voronoi nodes and rescale them via fractals, which should now probably be possible with the ability to change a fractal's texture coordinates in the transform shader. Hmmm...


dandelO

Or.

efflux

Those are good. There is some kind of concave effect by the looks of it. I saw a tutorial somewhere on the net where someone had added in a voronoi inversion of some kind. Can't remember exactly how that was done. Of course TG2 doesn't handle verticals very well which is another problem with these cracks.


Tangled-Universe

Another way to achieve nice effects, I discovered yesterday, is to have 1 voronoi noise pattern, have it run twice separately through a transform node which transforms the pattern on the X-axis or Z-axis. Transofrm it with 1/2 the size of the voronoi size, for example.
Then mix the orginal voronoi with the 2 transformed voronoi and set blending mode to difference and 100% addition of shader A.

There ARE ways to achieve nice effects, but I still think new shaders should be added since first of all these are the real deal, possible not reproducable at the moment and likely also faster when coded as a shader.
So sharing complex ways to achieve different fractal looks is nice, but I do not intend to facilitate excuses for not extending the noise flavours in TG2 ;)

Working on verticals is a bit more difficult, but what often works well is to have the base terrain computed with a small patch size.