Altitude Blend Distorter

Started by efflux, March 02, 2012, 07:17:20 AM

Previous topic - Next topic


This file creates an altitude range of blending and provides various ways to mess it up. Primarily I started this for colour but taking a line out to provide some displacement for one layer (or two or whatever) enables you to have some relationship between displacement and colour. This means I slightly limited the amount of functions in this version. If you take a line from any noise functions in this file to give some displacement you don't want it too mashed around or the altitude delineation too tight because the displacements get blended without defined masking. You will get nasty displacement artifacts. I could have added more distortions stuff if it was just colour. I also have versions with better defined displacements so the rocks can change suddenly but that's a whole different file. This one gives quite a lot of variation just by itself.

The blue nodes on the left should be fairly self explanatory. The one marked + - just inverts the blending. This may be necessary in some instances to get desirable shapes especially since there are lots of ways that this could be hooked up. However, it's not just a switch from + to - and you could try hooking up a different constant scalar to each mix node and have different + and - values on each.

Basically the blend graduates through from one level to another and both sides of the blend can be differently controlled. I haven't even really experimented much with this aspect. All I know is that you'll have to make sure it's not too twisted up or that small bits of the blend are not orphaned out too much unless you are just using colour and not displacements. You'll find out what works and what doesn't by looking at the simple coloured file I've posted. That's why I make them like that. So you see what's going on. In fact better and more varied results are probably possible that what I'll post here.

In this particular file the actual altitude levels don't exactly match up visually to the value you enter but this isn't of much importance.

You can add in lots of other maths functions like bias or square root to manipulate the rock shapes and go on forever with this idea.


Here's some other versions. Roughly the same idea but not exactly the same file.

By the way, just to add to this post here. Although these picture below look radically different from the one above. The file should be capable of these things even although I haven't actualy tried these effects with that file. The smoother effect in the last three is not built in though. That requires maths functions such as square root. The last one with the broken up look requires a blend with voronoi cell but I don't think that effect is fantastically successful anyway or maybe I'll revisit that effect to make it better.


Here's two renders made from the same graph as in the tgd that I've posted. Obviously tweaked around a bit with other surface colours etc.


Just another point I should have mentioned.

There is nothing wrong with taking a value out from the end of the function to drive displacements. The reason I didn't do that is because I simply thought the results were a little severe and less natural. It will go from 0-1 within the blend region. Displacements will only happen there or at least provide variation there. It will be like a kind of step. However, this may be exactly what you want. I might try using some function there to soften the displacement effect. The displacements will also line up tightly if you do this but they won't carry on up the hill or down, they will create a step.

Also with that method, voronoi will get a bit weird because it will kind of invert through the blend. Perlin doesn't go so weird in this scenario.


I have another version that cuts the rocks at a line. The rocks can also be terrain.

No file yet. I'm trying to explore all the options to minimize displacement nightmares. For my own use this is no problem because I just build the facility it needs for that particular use but in this example, if you add largish displacement to the rocks it will create problems. There are ways of solving it but I'm just trying to decide on what choices to build in to eliminate the problems, integrate red nodes etc.

However, these are designed for smaller scale things in surfaces without lots of displacement not as large as I'm showing here. It can be done as terrain then slope etc ultised for surfaces.


Here's another picture. It's unrelated to the technique here but demonstrates the kind of things I'm trying to achieve. It's not an altitude blend but can be distribution controlled by altitude. It's red nodes and a fractal. There are sliders in this to control it's coverage and all surrounding surfaces can be made to melt into it by whatever degree you want. The file isn't finished yet though. It's not complicated but I've got dozens of things in the works.

So what I'm doing is trying to create rock structures but not fake stones. Fake stones are best for what it's called, stones not larger rocks.

The altitude blend distortion is a method to replicate what happens in the real world. Rock stratas merging into one another through altitudes. Say sand on a beach, then rocks, then that merges into something smoother etc. Scattering huge fake stones about doesn't replicate this very well.

Trouble is that the fractals lock us out of positioning control but I've gone on enough about that already.


This looks very intricate and intriguing. Thanks very much, efflux!


Thanks efflux - will take me for ever to unentangle this one!


We can use fractals for this. Not sure how far we can integrate them though I think people have done things in this direction but I'm thinking on concentrating to get all the possible angles.

There needs to be a few different methods. I think one method is to have something where you actually have three levels. A bottom mid and high. This allows changes to the centre then it graduates back again to end at a top level much the same as it does at the bottom. The reason this is cool is because you can have inversions at the middle. Then you just hook this in and have total control of where it goes. Surfacing on the top needs to be hooked in separately like you do on the fake stones. This is so we can control it to avoid mess at the edges.

For colour it's all fairly easy or for say terrain only, it's when displacements and colour get integrated that it gets more complex.


It's not that complicated. Probably I should have started by posting a graph which simply shows how an altitude can be distorted. People have done this as far as I know. You can actually use red nodes. Most of the graph is simply extra stuff to make it work in a more complicated way. I'll be posting better ones. In fact the second idea that I posted a render from is a slightly simpler graph.

The noise or whatever shape gets position coordinates. The results from this are then used to distort an altitude input. I'm not looking at the graph now. Can't even remember the exact set up. The altitude line is no longer straight, it takes on the shapes of the noise or fractal. So we can use ouputs from the graph to add displacement and it will completely line up with the colour or not exactly as in the case of the first graph I posted but I like the effect of that one. Often an exact perfectly worked out idea results in something too rigid. When I build planets I don't necessarily use the same graphs. It depends exactly what I want. Do I need colour to perfectly match displacement? Do I need the displacement to cut down to 0 at the blend ? etc etc.


Just to add a further bit of written explanation. If we add data to altitude then of course we get all sorts of values that are no good to use as a blend so we have to get than data back to 0-1. Quite simple really. This is not necessarily the case with the displacements though. Maybe we want one side to be 0 but the displacement to simply carry on after the blend etc etc. In this case though we could end up with displacements that get bigger and bigger up the hill. A smooth steps can be added to control that etc etc there are of course endless ways to do this. The biggest problem is deciding on what are general useful graphs that you can use without having to know exactly how it works. For example, how many people know how the fake stones work? but it's designed so that you don't need to know this. This locks out some possibilities but otherwise it would be difficult to use.

One definite cool possibility is to have the graph blend from one effect to another and then back out again so we have an incredibly controllable altitude range with modulating shapes and forms but it's contained within just this blend area.


Just another point worth noting. When you build your planets or scenes from only the basics of what you need, they render fast i.e. the minimum number of functions doing the maximum amount of work. This is one point about the altitude distorter. We have position and we have altitude. If you combine those two things you get amazing intricacies with few functions. I only get into heavy render times if I make a very complex terrain or have some heavy sky things going on.


Probably I should have started this thread on a much simpler basis rather than experimenting with blue nodes. Here are some simple files that anyone can use straight away. There are most likely other places where stuff utilizing this technique is available but I've put three simple files here.

First one (Alt Dist 1.0) distorts altitude but also distorts the texture. This simple way is a very cool effect. I've stretched the surface out to help to try to show this. Alt Dist 1.1 uses a Perlin driven by altitude. This shows you that with blue nodes we can choose position. This limitation of the red node fractal will lead onto other hassles with the techniques here as well as everything else I try to do in TG2. The other file (alt Dist 2.0) distorts altitude without it distorting the texture.


Here's where it all goes tragically wrong in TG2. You can see what should happen - a covering of displaced rocks all lined up with colour but because of TG2's crippling lack of control in the red nodes it all goes wrong. This is not an issue in any other 3D apps, even Blender can do better.


Actually, that last file I posted is cool even although it's not technically what I'm after.

Change the settings in the distribution node to min altitude -50 and min alt fuzzy zone 100. Change to some better colours, bring in a new default atmosphere (I've also given that some darkish blue ambient for this render) and you'll get the following if you go in closer.