Planetside Software Forums

General => Terragen Discussion => Topic started by: TheBadger on November 20, 2014, 10:33:38 PM

Title: erosion
Post by: TheBadger on November 20, 2014, 10:33:38 PM
Hey again, yet another question.

I have TG and GC2. I have not messed with GC2 very much, but I know it does erosion well.

My question is, I see that the alpine shader does some cool looking erosion also. So should I use TG to do erosion or try to figure out GC2?

Or maybe to be more clear. Can I use the erosion in the alpine node on a non alpine terrain? And if so, what may be the plus side of that way of working?
Also,
If its is better to get erosion maps from GC2, what is the best way if I already have a terrain created in TG? I mean, can I take my terrain into GC2, or do I have to start fresh in CG2 and bring that terrain into TG?

Never really did much with erosion. But for Iceland I think erosion is something I really have to get in my head to end up with a real looking render.

Thanks for some direction on this topic. And I have followed discussion on erosion here. But I need a pragmatic way of making erosion, rather than just thinking about it in theory.
Title: Re: erosion
Post by: AP on November 21, 2014, 01:09:59 AM
I would get into CG2 for erosion if I were you. It is far more diversive and the amount of variations are vast. The control is there also.

The alpine shader fakes erosion using what I think is a slightly iterated and stretched voronoi noise??? It is limited quite a bit, in particular the ways it handles sedimentation. Another limitation is true channel flows. Terragen does have the height field erode node which does more but you are limited to a smaller area due to the fact it works on a height field only basis and is not procedural. Also, you will still get a lot more choices and power out of CG2.

As far as using erosion in the alpine node on a non alpine terrain. I do not think I have ever scene that done for faking erosion along side any other noise like rigid perlin for example.

There is no reason why you could not make a terrain in terragen then import it into CG2. With that, you can use the many erosion filters. Saving erosion maps is easy enough. The rigid mountain filters inside CG2 are similar to terragen's alpine fractal if you want to start in CG2 from scratch.

Iceland has a lot of sedimentary erosion types so focus on lots of sediment dispersion.
Title: Re: erosion
Post by: TheBadger on November 22, 2014, 02:38:52 PM
Its hard. Have to work a flow out for my self. But thank you for some ideas.
DO you happen to have a link to threads that are still online for a TG2 GC2 workflow? As you know, its not supported anymore as CG2. So info is hard to find.
Title: Re: erosion
Post by: AP on November 22, 2014, 04:39:51 PM
I found this.

http://www.planetside.co.uk/forums/index.php?topic=8518.0

http://www.planetside.co.uk/forums/index.php/topic,7542.0.html

http://www.planetside.co.uk/forums/index.php/topic,14117.msg138217.html#msg138217

Title: Re: erosion
Post by: TheBadger on November 23, 2014, 12:09:50 AM
Thank you.
Title: Re: erosion
Post by: AP on November 23, 2014, 03:32:40 PM
No worries.
Title: Re: erosion
Post by: Oshyan on November 24, 2014, 04:03:01 AM
Terragen doesn't generate erosion maps at all at present, and they can be quite handy, so GC2 or World Machine are great for that alone. They also both have more sophisticated erosion tools than TG presently has. The Alpine Fractal is not an erosion *simulation* like CG2 and WM both do, it is an approximation based on noise functions and some creative behind-the-scenes ideas of Matt's. So the results have the advantage of being procedural and thus "infinite" detail, you can zoom in to a centimeter level, or zoom out to see a whole planet and maintain detail the whole way. Heightfields are finite in size and resolution and so don't have that advantage, but they're more "directable", and the operations you can perform on them to customize the look of the terrain are different and in some cases more specific, e.g. different types of real, simulative erosion.

You can get somewhat of the best of both worlds by applying procedural noise functions over heightfield terrains. The Fractal Detail part of Heightfield nodes does exactly this, in a specific way for a subtle result that hopefully complements the base terrain rather than changing its character. But you can add all manner of other displacement to it, subtle or otherwise, and get different effects while still getting some benefits of the source terrain created in another app. The main thing to keep in mind is that the more procedural displacement detail you add, the less accurate and relevant your erosion maps will be, so I'd advise smaller-scale features only.

By the way, one great use for erosion map output from WM and GC2 is for masking objects like trees and bushes (think, for example, of how plants tend to stick to waterways, a stream flowing down a mountain will often have an area of greenery just around it), and for masking displacement for example Fake Stones (think of talus slopes, etc.).

- Oshyan
Title: Re: erosion
Post by: Dune on November 24, 2014, 04:49:50 AM
You could start with an uneroded terrain, derive colors from that using the displacement to scalar, add erosion, derive another color map and subtract these form eachother for some sort of erosion map. I did that a year ago or so in some file, I vaguely remember.
Title: Re: erosion
Post by: Oshyan on November 24, 2014, 01:21:05 PM
Clever Dune! Indeed you could do that. Not sure how well it works but I'd be curious to hear more...

- Oshyan
Title: Re: erosion
Post by: TheBadger on November 24, 2014, 11:23:24 PM
Quote from: Dune on November 24, 2014, 04:49:50 AM
You could start with an uneroded terrain, derive colors from that using the displacement to scalar, add erosion, derive another color map and subtract these form eachother for some sort of erosion map. I did that a year ago or so in some file, I vaguely remember.

Just an image of the result would be cool.
Title: Re: erosion
Post by: Dune on November 25, 2014, 01:46:44 AM
Yeah, but I might not be able to easily find it, so don't hold your breath. You can just try it, though  :P
Title: Re: erosion
Post by: TheBadger on November 25, 2014, 01:49:31 AM
There is nothing I could not try. But Why try to invent the wheel if its already been done?  :P :P
Title: Re: erosion
Post by: TheBadger on December 07, 2014, 11:02:42 PM
OK, I see lots of things here and about to get from GC2 to one soft or another. But not much (anything really) to get from TG3 to GC2 in the first place.

I have a terrain I created with a DEM. I want to take the part that is visible to my camera (or the whole DEM if I must?) to GC to add some effects. But the only way I know to get a terrain out of TG is the micro exporter. But this does not seem right since that produces an object, I need a 2d file for this, don't I?

Also, from what I read, I will want to export a .ter file to get back to TG, is that still the right best way?

And one last thing. When I was looking through the GC2 UI, I saw no option to just import the DEM there. Did I miss it or there is no option in GC2 to import a DEM? I think that I only need a part of the file though so anyway, what to do?
Title: Re: erosion
Post by: Oshyan on December 07, 2014, 11:15:05 PM
Right-click your Geog Heightfield node, Save File As, give it a name, make sure it has .ter at the end. Load into GC2. When you're done, save as .ter. Win!

GC2 is not big on GIS/DEM data import, I don't think.

- Oshyan
Title: Re: erosion
Post by: TheBadger on December 07, 2014, 11:29:04 PM
Oh thank heavens! That is nice and easy. Im really quite tired of super complex this or that, so what you wrote is beautiful music!
Title: Re: erosion
Post by: TheBadger on December 08, 2014, 03:24:45 PM
 :-[
When I export from TG I get a warning that my XYZ are not the same, and that older versions and other software may not like it.
When I try to load it into GC2 I get  bounced. It say the size is not an allowed size for the .ter 10,??? something.

Any ideas?
Title: Re: erosion
Post by: Oshyan on December 08, 2014, 03:40:22 PM
It's saying the dimensions are not "power of two+1", which was a limitation in TG Classic but has since been removed. So valid "original" TER format sizes are square (x and y dimension the same) and one of these numbers of points to a side: 129, 257, 513  2049, 4097, 8193. So what you need to do is change your heightfield under "Number of Points" to be one of those dimensions, e.g. 2049x2049. In the case of an imported DEM terrain you would need to use a Heightfield Resize operator and use the "Resample pixels" option. To maintain resolution and detail I'd recommend 4097x4097.

- Oshyan
Title: Re: erosion
Post by: TheBadger on December 08, 2014, 09:27:04 PM
Thanks man. I understand you.

The last thing I wanted to ask is about the total size of the DEM VS the part of the terrain that I actually am interested in. If I add a simpShape to the network and isolate the general area I want, will that make it through the save as part? I mean do I have to take the whole terrain (which is massive) or can I just take the part I want, similar to when making a terrain object?
I see that the camera has no effect here. But I was just wondering about it having that control.
My understanding is that what you wrote is only about the file not whats in the file.

And really lastly, more generally, can I also save a .ter in this same way, from an imported vectorDisplacement? I am thinking that I can. But if you know that I cannot please let me know.

Thanks again for your help.
Title: Re: erosion
Post by: Oshyan on December 08, 2014, 10:08:26 PM
Simple Shape won't help you. You need to constrain the export area. Since you can't do this with the Geog Heightfield Shader itself, you have to use a sneaky workaround. I'm pretty sure it will work, but no guarantees of quality, etc. You'll just have to try it. So...

Take your scene with the geog Heightfield in it, now below it in the network add a Heightfield Generate. Then, feed the output of the Heightfield Shader that the Geog Heightfield is plugged into, feed that into the Shader input of the Heightfield Generate. You're connecting a *red* node to the input port of a *green* one here, that's critical. And it has to go into the Shader input, on the right side, not the generic "Input" one on the left. Then, move the heightfield to the center of the area you want to export, then set the size of the heightfield *in meters* (not "number of points") to cover the area you want to export. Basically you're moving this new, second heightfield, and using it as a sort of bounding box for your heightfield export. Then, set the Number of Points to be one of those power-of-two+1 variants I listed above, click Generate, and then you can do the Save As routine on it as before. That *should* get you a heightfield that is *just* the area you wanted to export.

Vector Displacement, any displacement applied to the terrain, can be saved as TER. BUT BUT BUT, you will LOSE overhangs and any non-planar features, AND you have the potential/likelihood of losing resolution/detail. Try it, if you get good results then great, but don't *expect* good results. It is *not* a workflow I would recommend.

Instead, IF your v-disp is planar, i.e. no overhangs, then it's essentially a heightfield already. Export it as an image format, import it into TG, save as TER (or import it into any terrain app that supports standard image formats). In other words if you are actually having to use vdisp, you probably can't accurately reflect the features in a heightfield, because the whole point of vdisp is it gets you non-planar features.

- Oshyan
Title: Re: erosion
Post by: TheBadger on December 08, 2014, 11:02:20 PM
Thank you for the in depth answer. I am trying this tonight.

About the vector question, Thanks for the extra ideas. Those will help too. good to have options!