Author Topic: Combining two compute terrains with different gradient patch sizes  (Read 202 times)

Offline Hannes

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 4097
For my ocean setup I want to create two foam layers, that work with intersect underlying (with different settings each). I have two white surface layers with different compute terrains and different gradient patch sizes to get medium sized crests and very fine crests with the other one. Each one of them alone works great (see image below), but I want them both combined, so that I have both foam patterns together.
I tried everything with a merge shader, but no matter what I do, it doesn't work. Putting them in a line doesn't work either. It seems the larger patch size overlays the other one.  >:(

I attached the file. Maybe one of you has an idea?

Offline Dune

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 14046
    • www.ulco-art.nl
Re: Combining two compute terrains with different gradient patch sizes
« Reply #1 on: August 18, 2018, 01:41:04 PM »
I would do it like this. Quick setup, so needs work.

Offline Hannes

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 4097
Re: Combining two compute terrains with different gradient patch sizes
« Reply #2 on: August 18, 2018, 03:37:52 PM »
Thanks a ton, Ulco!!! I could use elements of your file with some of mine to get at least something similar (see image below).
The displacement to scalar/color adjust solution creates some crests, but I desperately want to have these finer medium resolution foam crests you can see in the quick test movie I've attached. And I desperately want to have them combined with the subtle fine resolution crests.
So, is there any other way to combine these two surface layers with different patch sizes?
« Last Edit: August 18, 2018, 04:35:40 PM by Hannes »


Offline WASasquatch

  • Member
  • *
  • Posts: 2340
  • to = ( be ) ? be : not;
Re: Combining two compute terrains with different gradient patch sizes
« Reply #4 on: August 18, 2018, 05:32:51 PM »
I would do it like this. Quick setup, so needs work.

I find it amusing after your long argument of using Height Limits that your argued is exactly the same and should be used, you use my method. xD

It'd be cool to see this mixed with some actual surface foam that spreads about, similar to how I used diff sized Voronoi Diff Scalar (https://planetside.co.uk/forums/index.php?action=dlattach;topic=25377.0;attach=83942;image), one inveerted for gathered foam boundaries, and one for the internal stretches between gathering foams. Sorta a bad example as fractal scales are all wrong for warping but hopefully you get what I mean from real world effects.
« Last Edit: August 18, 2018, 05:38:03 PM by WASasquatch »
Art can be a window into the soul

Offline Hannes

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 4097
Re: Combining two compute terrains with different gradient patch sizes
« Reply #5 on: August 19, 2018, 05:06:37 AM »
Seems I found a rather weird solution for my problem. Since I couldn't find a way to combine the two layers with different patch sizes, I duplicated the plane and disabled one layer in the first one and the other layer in the second one. I didn't expect that to work, but surprisingly it did. I had to move the plane with the smaller patch size a tiny little bit downwards, because for some reason I don't know, the second plane only showed up half. Like split diagonally. No idea, why this works...
Unfortunately this almost doubles rendertimes. >:(
I would have preferred another solution, but at least I got what I wanted.

Jordan, using some additional procedural foam patterns or even image maps doesn't look good, as far as I've tested it. Even when I use an input warp shader that's fed by the displacement via a redirect shader, the pattern's distortion doesn't really move in sync with the mesh's distortion.

Offline Hannes

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 4097
Re: Combining two compute terrains with different gradient patch sizes
« Reply #6 on: August 19, 2018, 05:12:41 AM »
Actually for animations it doesn't look good so far. For stills this might work of course.

Offline Dune

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 14046
    • www.ulco-art.nl
Re: Combining two compute terrains with different gradient patch sizes
« Reply #7 on: August 19, 2018, 05:48:33 AM »
Quote
you use my method.
I don't know anything about 'your method'; I've used setups like this for ages.

Offline WASasquatch

  • Member
  • *
  • Posts: 2340
  • to = ( be ) ? be : not;
Re: Combining two compute terrains with different gradient patch sizes
« Reply #8 on: August 19, 2018, 05:03:46 PM »
Quote
you use my method.
I don't know anything about 'your method'; I've used setups like this for ages.

Ok. You argued very passionately that there is no reason to use disp to scalar to get wave form peak scales and a surface layer is the same. You're doing the same exact thing you argued against, that I tied to suggest making me look bad.

Actually for animations it doesn't look good so far. For stills this might work of course.

I see what you mean. I'd make I a challenge to get it to play right cause as is while very interesting, it's also not realistic. Too much gradienting. More like something you'd see in a completely churned waterfall, or like a boats prop churning the water behind it like ferries, but still missing topical foam.
« Last Edit: August 19, 2018, 05:43:39 PM by WASasquatch »
Art can be a window into the soul

Offline Hannes

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 4097
Re: Combining two compute terrains with different gradient patch sizes
« Reply #9 on: August 20, 2018, 12:18:03 PM »
Yes, of course, the coloring is totally exaggerated. Just to see, what can be done. In the end it should look different.