Author Topic: How to Capture/Convert Computed Terrain?  (Read 226 times)

Offline WASasquatch

  • Member
  • *
  • Posts: 2851
  • The Homeless Landscape Artist
How to Capture/Convert Computed Terrain?
« on: November 08, 2018, 07:42:19 PM »
When you use Displacement to Scalar it ignores Patch Sizes / Smoothing.

How can one go about capturing this?

Is there a way to compute scalar/vector input via functions?
« Last Edit: November 08, 2018, 07:56:49 PM by WASasquatch »
Art can be a window into the soul

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3333
  • I'm the crazy one
Re: How to Capture/Convert Computed Terrain?
« Reply #1 on: November 09, 2018, 12:14:46 AM »
Are you using “pancake effect”? Is that where the roundness is coming from?
Just because milk is white doesn't mean that clouds are made of milk.

Offline WASasquatch

  • Member
  • *
  • Posts: 2851
  • The Homeless Landscape Artist
Re: How to Capture/Convert Computed Terrain?
« Reply #2 on: November 09, 2018, 12:48:36 AM »
Are you using “pancake effect”? Is that where the roundness is coming from?

Yeah tallness 1, pancake 2, Compute Normal patch size 0.1 with smoothing on. This can be further offsetted on Normal or Lateral, but you need to mask the area to not effect the surface, which is where the trouble is, as the anything I attempt to use to get a mask is just the original stone, no lateral or smoothing.

<terragen_clip>
   <surface_layer
      name = "Furthr Offset"
      gui_use_node_pos = "1"
      gui_node_pos = "1400 -200 0"
      gui_group = ""
      enable = "1"
      input_node = "/FS River Boulders/River Boulders LX/Compute normal 01"
      gui_use_preview_patch_size = "1"
      gui_preview_patch_size = "15.625 15.625"
      apply_colour = "1"
      diffuse_colour = "0.5 0.5 0.5"
      colour_function = ""
      enable_test_colour = "0"
      test_colour = "1 0 1"
      luminous = "0"
      luminosity_multiplier = "1"
      luminosity_tint = "1 1 1"
      luminosity_function = ""
      displacement_direction = "1"
      displacement_multiplier = "1"
      displacement_function = ""
      displacement_offset = "1"
      smoothing_effect = "0"
      smoothing_amount = "1"
      child_layers = ""
      coverage = "1"
      fractal_breakup = "0"
      breakup_shader = ""
      fractal_contrast = "0.5"
      invert_breakup = "0"
      only_breakup_colour = "1"
      blend_by_shader = "0"
      blending_shader = ""
      invert_blendshader = "0"
      blend_as_coverage = "1"
      limit_maximum_altitude = "0"
      maximum_altitude = "1000"
      max_alt_fuzzy_zone = "200"
      limit_minimum_altitude = "0"
      minimum_altitude = "200"
      min_alt_fuzzy_zone = "200"
      altitude_key = "1"
      use_Y_for_altitude = "0"
      limit_maximum_slope = "0"
      maximum_slope_angle = "60"
      max_slope_fuzzy_zone = "20"
      limit_minimum_slope = "0"
      minimum_slope_angle = "30"
      min_slope_fuzzy_zone = "10"
      slope_key = "0"
      use_Y_for_slope = "0"
      intersect_underlying = "0"
      intersection_mode = "0"
      intersection_zone = "2"
      smoothing_scale = "0"
      intersection_shift = "2"
      min_intersection_shift = "-2"
      fuzzy_zone_softness = "1"
      >
   </surface_layer>
   <fake_stones_shader
      name = "Fake stones shader 01"
      gui_use_node_pos = "1"
      gui_node_pos = "1400 -20 0"
      gui_group = ""
      enable = "1"
      input_node = ""
      gui_use_preview_patch_size = "0"
      gui_preview_patch_size = "1000 1000"
      seed = "1616"
      surface_shader = ""
      stone_scale = "1"
      stone_density = "0.05"
      vary_density = "1"
      density_variation = "1"
      density_seed = "6722"
      density_variation_scale = "10"
      stone_tallness = "1"
      pancake_effect = "2"
      separate_geometry = "0"
      only_displace_upwards = "0"
      apply_colour = "1"
      diffuse_colour = "1 1 1"
      colour_variation = "1"
      variation_in_red = "0.5"
      variation_in_green = "0.5"
      variation_in_blue = "0.5"
      scale_function = ""
      tallness_function = ""
      blend_by_shader = "0"
      blending_shader = ""
      fit_blendshader_to_this = "0"
      invert_blendshader = "0"
      blend_as_stone_density = "1"
      >
   </fake_stones_shader>
   <compute_normal
      name = "Compute normal 01"
      gui_use_node_pos = "1"
      gui_node_pos = "1400 -100 0"
      gui_group = ""
      enable = "1"
      input_node = "Fake stones shader 01"
      gui_use_preview_patch_size = "1"
      gui_preview_patch_size = "15.625 15.625"
      patch_size = "0.1"
      smooth_surface = "1"
      >
   </compute_normal>
</terragen_clip>
« Last Edit: November 09, 2018, 12:51:33 AM by WASasquatch »
Art can be a window into the soul

Offline WASasquatch

  • Member
  • *
  • Posts: 2851
  • The Homeless Landscape Artist
Re: How to Capture/Convert Computed Terrain?
« Reply #3 on: November 09, 2018, 12:55:49 AM »
If one doesn't mind offsetting the terrain and working with that, it sure can yield some beautifully round stones to work with. Nevermind the tiny small scale details being rough, they're effected by the offset as they're currently fed into the Fake Stones Surface Input instead of the Child Input of the offset surface.
Art can be a window into the soul

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3333
  • I'm the crazy one
Re: How to Capture/Convert Computed Terrain?
« Reply #4 on: November 09, 2018, 04:38:44 AM »
The result of the Displacement to Vector might be correct - you just don't see the lateral displacement until it's.. um... used to displace something. Have you tested it by previewing a Vector Displacement Shader whose displacement is generated by the output of the Displacement to Vector?
Just because milk is white doesn't mean that clouds are made of milk.

Offline WASasquatch

  • Member
  • *
  • Posts: 2851
  • The Homeless Landscape Artist
Re: How to Capture/Convert Computed Terrain?
« Reply #5 on: November 09, 2018, 07:21:23 AM »
The result of the Displacement to Vector might be correct - you just don't see the lateral displacement until it's.. um... used to displace something. Have you tested it by previewing a Vector Displacement Shader whose displacement is generated by the output of the Displacement to Vector?

Oh, that it does, but I'm trying to capture the boundaries of these effect fake stones for masking purposes. Neither can provide the computed displacement in scalar form. Even if you convert the vector displacement you'll get a even more bizarre scalar than just the offset surface to scalar.

Even though, when the rock is offsetted by "Normal" there is "Normal" boundaries it should be seeing by my logic if it was recomputed. So it seems to be acting like lateral displacement, even when "Normal" is just lateral and invisible.
Art can be a window into the soul

Offline Dune

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 14295
    • www.ulco-art.nl
Re: How to Capture/Convert Computed Terrain?
« Reply #6 on: November 09, 2018, 07:32:49 AM »
You can get some interesting results if you change vectors before vector displacing again.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3333
  • I'm the crazy one
Re: How to Capture/Convert Computed Terrain?
« Reply #7 on: November 09, 2018, 09:07:01 AM »
If the thing you’re masking uses terrain/texture coordinates, you don’t need to. The lateral displacement displaces the whole surface, masked shader and all.
Just because milk is white doesn't mean that clouds are made of milk.

Offline WASasquatch

  • Member
  • *
  • Posts: 2851
  • The Homeless Landscape Artist
Re: How to Capture/Convert Computed Terrain?
« Reply #8 on: November 10, 2018, 12:50:21 AM »
If the thing you’re masking uses terrain/texture coordinates, you don’t need to. The lateral displacement displaces the whole surface, masked shader and all.

To get the ultimately smooth finished rock, there is a secondary surface layer after the compute normal, which offsets the rocks on normal, completing the roundness effect, than the child of that surface layer can be used to apply actual surface details to the rock since they will be distorted by the compute normal and offset if fed into the originating fake stones surface input (You can see that in the last preview I posted, where the surface detail is pinched by the offset on normal, and barely visible in some areas altogether. .
Art can be a window into the soul

Offline Matt

  • Planetside Staff
  • *
  • Posts: 3333
  • I'm the crazy one
Re: How to Capture/Convert Computed Terrain?
« Reply #9 on: November 10, 2018, 02:50:52 AM »
I'm not sure whether you can use the Displacement Shader to Vector as a mask in this situation, but I don't see why not. It's best to describe complex situations like this with a TGD file, and then I'll know for sure.
Just because milk is white doesn't mean that clouds are made of milk.

Offline WASasquatch

  • Member
  • *
  • Posts: 2851
  • The Homeless Landscape Artist
Re: How to Capture/Convert Computed Terrain?
« Reply #10 on: November 10, 2018, 03:28:39 AM »
The vector map clamps the fake stones preventing the offset it seems.

Normalizing helps a bit but not exact.
« Last Edit: November 10, 2018, 03:30:32 AM by WASasquatch »
Art can be a window into the soul

Offline Dune

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 14295
    • www.ulco-art.nl
Re: How to Capture/Convert Computed Terrain?
« Reply #11 on: November 11, 2018, 06:56:31 AM »
Interesting anyway to manipulate the vectors of a fake stone setup before displacing again.

Offline Tangled-Universe

  • Terrevangelist
  • *
  • Posts: 6156
    • CGScenery.com - Terragen Tutorials!
Re: How to Capture/Convert Computed Terrain?
« Reply #12 on: November 11, 2018, 10:59:11 AM »
That looks like quite a complicated setup to just have the stones lean into a direction? Especially that the vector displacement shader has a fake stones shader into its input as well, next to the modulated one as function input, is confusing and seems unnecessarily complicated.
Can't this be achieved by feeding the first compute normal through a "displacement shader to vector" and plug that straight into a vector displacement shader and simply tweak the X/Y/Z weights?
I don't see the use of rotating a vector if the initial surface is flat, that's why I'm confused by this setup. Changing the weights for X and Z in the vector displacement shader is effectively the same and uses much less nodes and is more straightforward.
« Last Edit: November 11, 2018, 11:01:16 AM by Tangled-Universe »

Offline Dune

  • Terragen Alpha Tester (Win)
  • ***
  • Posts: 14295
    • www.ulco-art.nl
Re: How to Capture/Convert Computed Terrain?
« Reply #13 on: November 11, 2018, 11:15:12 AM »
It's not to be taken too seriously! Just another way of handling stuff, and I didn't look for effectiveness at all, just plugged some stuff in and decided to post. And in fact I did what you described; feeding the compute normal into a displacement to vector and then by multiplying, mixing and adding vectors I manipulate the different values for XYZ.
Just meaning to wake up (some) users and illustrate that you can do stuff by vectors.