## How to Capture/Convert Computed Terrain?

Started by WAS, November 08, 2018, 03:42:19 pm

#### WAS

##### November 08, 2018, 03:42:19 pmLast Edit: November 08, 2018, 03:56:49 pm by WASasquatch
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?

#### Matt

##### November 08, 2018, 08:14:46 pm #1
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.

#### WAS

##### November 08, 2018, 08:48:36 pm #2 Last Edit: November 08, 2018, 08:51:33 pm by WASasquatch
Quote from: Matt on November 08, 2018, 08:14:46 pm
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"
fractal_contrast = "0.5"
invert_breakup = "0"
only_breakup_colour = "1"
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>
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"
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_as_stone_density = "1"
>
<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>

#### WAS

##### November 08, 2018, 08:55:49 pm #3
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.

#### Matt

##### November 09, 2018, 12:38:44 am #4
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.

#### WAS

##### November 09, 2018, 03:21:23 am #5
Quote from: Matt on November 09, 2018, 12: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?

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.

#### Dune

##### November 09, 2018, 03:32:49 am #6
You can get some interesting results if you change vectors before vector displacing again.

#### Matt

##### November 09, 2018, 05:07:01 am #7
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.

#### WAS

##### November 09, 2018, 08:50:21 pm #8
Quote from: Matt on November 09, 2018, 05: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.

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. .

#### Matt

##### November 09, 2018, 10:50:52 pm #9
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.

#### WAS

##### November 09, 2018, 11:28:39 pm #10 Last Edit: November 09, 2018, 11:30:32 pm by WASasquatch
The vector map clamps the fake stones preventing the offset it seems.

Normalizing helps a bit but not exact.

#### Dune

##### November 11, 2018, 02:56:31 am #11
Interesting anyway to manipulate the vectors of a fake stone setup before displacing again.

#### Tangled-Universe

##### November 11, 2018, 06:59:11 am #12 Last Edit: November 11, 2018, 07:01:16 am by Tangled-Universe
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.

#### Dune

##### November 11, 2018, 07:15:12 am #13
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.