Planetside Software Forums

General => File Sharing => Topic started by: efflux on March 02, 2012, 07:17:20 AM

Title: Altitude Blend Distorter
Post by: efflux on March 02, 2012, 07:17:20 AM
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.
Title: Re: Altitude Blend Distorter
Post by: efflux on March 02, 2012, 07:18:00 AM
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.
Title: Re: Altitude Blend Distorter
Post by: efflux on March 02, 2012, 07:18:42 AM
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.
Title: Re: Altitude Blend Distorter
Post by: efflux on March 02, 2012, 08:01:45 PM
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.
Title: Re: Altitude Blend Distorter
Post by: efflux on March 02, 2012, 11:44:36 PM
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.
Title: Re: Altitude Blend Distorter
Post by: efflux on March 03, 2012, 12:08:55 AM
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.
Title: Re: Altitude Blend Distorter
Post by: Dune on March 03, 2012, 03:21:55 AM
This looks very intricate and intriguing. Thanks very much, efflux!
Title: Re: Altitude Blend Distorter
Post by: mhaze on March 03, 2012, 11:49:22 AM
Thanks efflux - will take me for ever to unentangle this one!
Title: Re: Altitude Blend Distorter
Post by: efflux on March 03, 2012, 07:19:16 PM
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.
Title: Re: Altitude Blend Distorter
Post by: efflux on March 03, 2012, 07:38:20 PM
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.
Title: Re: Altitude Blend Distorter
Post by: efflux on March 03, 2012, 07:51:59 PM
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.
Title: Re: Altitude Blend Distorter
Post by: efflux on March 03, 2012, 08:11:07 PM
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.
Title: Re: Altitude Blend Distorter
Post by: efflux on March 03, 2012, 11:14:10 PM
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.
Title: Re: Altitude Blend Distorter
Post by: efflux on March 04, 2012, 03:40:44 AM
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.
Title: Re: Altitude Blend Distorter
Post by: efflux on March 04, 2012, 04:44:32 AM
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.
Title: Re: Altitude Blend Distorter
Post by: efflux on March 04, 2012, 05:51:42 AM
Here's three layers altitude distortion blended. I threw this together. The interesting shapes are purely created with the technique otherwise these textures would be very ordinary. Maybe people are using this technique but I haven't seen much obviously showing it. Bear in mind this is that garbage smooth test terrain in the files here. I have some terrains in the works as well  :-*
Title: Re: Altitude Blend Distorter
Post by: efflux on March 05, 2012, 11:38:22 AM
I'm not going further with this angle now. Got other things in the works. It's just one step at a time. Will do in future. There is mileage in the simple set up in the files with the bluish coloured hills.

Just to tie this in with another thread. Volker showed some nice blue node stuff here. In other places I'm sure he at least provided one tgc. In any case. These crazy function shapes work brilliantly if you use them for this altitude distortion. I left a comment on this thread but it seems I didn't explain what I meant that well. I wasn't using TG2 at the time.

http://forums.planetside.co.uk/index.php?topic=7275.0
Title: Re: Altitude Blend Distorter
Post by: efflux on March 05, 2012, 12:13:06 PM
Just trying to give some pointers here.

Look at the problem described in this thread:

http://forums.planetside.co.uk/index.php?topic=10183.msg105646#msg105646

However, using a straight line altitude distribution is a bit unsatifactory in some cases like this. Far too regular.
Title: Re: Altitude Blend Distorter
Post by: efflux on March 05, 2012, 12:38:34 PM
Just one more point. I'll be leaving this thread for a bit. Another one will get started on something else.

The distribution shader has a weakness. The "fuzzy" zone is uncontrollable and quite nasty for certain scenarios. With blue nodes you can control the curve of that.
Title: Re: Altitude Blend Distorter
Post by: mhaze on March 05, 2012, 02:23:26 PM
This is brilliant thought provoking stuff. Will keep me going for weeks!
Title: Re: Altitude Blend Distorter
Post by: efflux on March 05, 2012, 02:52:09 PM
Just one more post for now. Since I haven't really done enough actual work on this which looks cool I'll add a Mojoworld image. This image has surface textures blended by distorted altitude en masse. Look how beautiful that is.  It's also a volumetric world since it has the arches.

Another point is highlighted here. This image says Lewis Moorcroft (c). Lewis Moorcroft did some nice Mojoworld work. However, this planet was in fact the creaton of Yuroslav Dynda. Lewis Moorcroft added some stuff like the distant moon/planet. It is very unfair not to credit Slav. Mojoworld was almost totally driven forward by a very small handful of people who did all the work and were kind enough to share planet files. This system doesn't work. This is why we need people to get to understand TG2 more even although TG2 is quite different.
Title: Re: Altitude Blend Distorter
Post by: efflux on March 05, 2012, 03:13:13 PM
I didn't share completed Mojoworld planets but was happy to share files that showed techniques. However, when I did this I got put down for sharing half baked planets which actually deomstrated a really useful technique. That was my last involvement with Mojoworld.
Title: Re: Altitude Blend Distorter
Post by: FrankB on March 05, 2012, 03:22:05 PM
I'm not getting it. For most images posted here, especially the first 10 or so, I would simply use a surface shader with an altitude constraint and a fuzzy zone.
For the latter ones, I'd simply warp the color providing shader over a redirect shader on y, driven by a simple power fractal.
I really don't understand what you are attempting to solve!?

Title: Re: Altitude Blend Distorter
Post by: efflux on March 05, 2012, 03:44:23 PM
Frank, those are different techniques with different results.

You can use Y but that's not the same as altitude. Very occasionally I've resorted to using x,y,z for various things because it was the only way I knew how to do it. In some circumstances it is the only way. However, I'm very aware of the fact that I'm working on a planet. This is my thing with TG2. I like to know if I move around everything is still intact. For some people it is of no importance and doesn't matter for their results but you don't have to move very far before a Y distribution goes wrong.
Title: Re: Altitude Blend Distorter
Post by: FrankB on March 05, 2012, 04:03:21 PM
true, by y doesn't work very far from the planet's origin, but a.) that's rarely a problem for most scenes, and b) you could distort on vertical only, which will be always perpendicular to the planet's surface normal. Gives you the same effect.

Cheers,
Frank
Title: Re: Altitude Blend Distorter
Post by: efflux on March 05, 2012, 04:18:24 PM
Yes, it's true that using Y or other axis is fine in most circumstances for most people and certainly fine if the specific movement isn't really related to the planet's surface. I have found though that things can start to look wrong without really moving that far from origin.

Not sure what you mean by distort on vertical though.

If we know how to do things in terms of altitude as well as Y then that's all well and good.
Title: Re: Altitude Blend Distorter
Post by: FrankB on March 05, 2012, 11:20:59 PM
check out the displacement tab of a power fractal. Default is you displace by normal, but you can change it to displace by vertical if you wish.

Frank
Title: Re: Altitude Blend Distorter
Post by: efflux on March 08, 2012, 05:03:55 AM
By the way guys. My point about the Mojoworld crediting problem was about finished planets or things a lot more developed. This is what I won't supply here but any files I do supply are to be used any which way anyone wants. I don't expect any credit for any techniques. I'm simply supplying some files to try to get people to think more about the possible ways of doing things.
Title: Re: Altitude Blend Distorter
Post by: RichTwo on March 08, 2012, 10:58:17 AM
I'll give you credit right now!  I may one of the nearly extinct here, Ryan but I like your thinking.  I had a peek at the ABD file and I must say there is good potential for it, especially when trying to create innovative terrains.  It won't do much for the ones who use TG2 merely as a platform for object placement, though.  And I won't climb onto my soapbox about that.

I haven't tried it with rougher displacements yet, but that's on my to-do list.  I hope you'll let me know if that's not such a good idea. 

I also look forward to seeing what you come up with in the future.  I know you've been away from TG2 for awhile and it's good to see you back at it.  Me - I wouldn't know the first thing on how to make the function nodes work from scratch the way you've done, so you have my appreciation, if no one else's. 
Title: Re: Altitude Blend Distorter
Post by: efflux on March 10, 2012, 06:39:02 AM
Hi Rich.

The first graph will work more or less the way I explain it. Change the +- node to see some extreme changes. Don't try to have severely tight altitude blends (just as you wouldn't with a standard red node altitude blend) because when you take the displacement from earlier in the graph it won't match up to the mask part. You need a soft blend. If you take from the end of the graph the displacements will create a kind of step. That's a bit severe. I did add a picture later of another graph where the displacements do line up with colour but that graph isn't completed to do the same as the first one. Also, if you were to add further displacements to that one (as you would likely do) then the edge between stones and ground would get messed up. There are various solutions but I don't want to put half baked graphs on here that will quickly turn to a mess. The first one is slightly like that. I do intend to eventually further this. The first graph is just the start.

I went for standard basic red node arrangements in the end because that's a decent starting point with plenty of mileage and I don't think people are generally using that much. The problem is that the powerfractal doesn't allow you to select positions i.e. get position in geometry. Matt has talked of changing that. If it does change then I'll be able to post a whole host of new ways of doing stuff and it will also make sense why we need to select the positions. The blue node arrangement here is partly because we have deficiencies in the powerfractal. Otherwise this stuff could all be done in red nodes ( except if we specifically need the voronoi shape which we might want) or on the other hand if the red node powerfractal was opened up to use just like the blue nodes then we could do it that way using fractals. At present it's a bit either or.
Title: Re: Altitude Blend Distorter
Post by: efflux on March 10, 2012, 06:51:31 AM
Rich.

I actually agree about your point in TG2 being used for object placement. This is partly why I'm starting some threads here. Yes, there are lots of really cool renders full of trees. Lovely alpine scenes etc but I think there is a danger of getting away from sculpting terrains, working on surfacing etc. Objects, even if it trees and plants are a way of hiding bad terrain.
Title: Re: Altitude Blend Distorter
Post by: pixelpusher636 on September 16, 2012, 11:36:01 PM
efflux this is really genius! You really are a fountain of information, and I believe I will learn a great deal from this! Thanks! and  good to see the plague that passed through the forum didn't take you out too!
Title: Re: Altitude Blend Distorter
Post by: TheBadger on September 17, 2012, 01:38:10 AM
QuoteObjects, even if it trees and plants are a way of hiding bad terrain.

^^This is my favorite way to accept/deny the difficult nature of Terragen. But when you say "sculpt" I just cringe. Because Terragen as it is, means sculpting with nodes. Though that would not be a problem if there were not so few nodes built in, requiring everyone to build gigantic node networks just to get one dirt shader TG2 should have come with.
If you spend 2 days building a network for one shader, in this example dirt, then there is not a lot of time to "sculpt" anything else.

Of course, this is a post that agrees with you. But I feel complete empathy with those who can successfully hide a bad terrain.

Title: Re: Altitude Blend Distorter
Post by: Hetzen on September 22, 2012, 06:50:54 PM
Quote from: TheBadger on September 17, 2012, 01:38:10 AM
QuoteObjects, even if it trees and plants are a way of hiding bad terrain.

^^This is my favorite way to accept/deny the difficult nature of Terragen. But when you say "sculpt" I just cringe. Because Terragen as it is, means sculpting with nodes. Though that would not be a problem if there were not so few nodes built in, requiring everyone to build gigantic node networks just to get one dirt shader TG2 should have come with.
If you spend 2 days building a network for one shader, in this example dirt, then there is not a lot of time to "sculpt" anything else.

Of course, this is a post that agrees with you. But I feel complete empathy with those who can successfully hide a bad terrain.

You are also dealing with artists on the cutting edge of what is possible. In any program!!! Sculpting is precisley the right word. TG doesn't just allow you to create great terrains, it allows you the language to make your own rules.
Title: Re: Altitude Blend Distorter
Post by: TheBadger on September 23, 2012, 08:54:20 PM
It allows you and certain other users to make your own rules. It allows me to follow along, a little bit.  ;)