Square Voronoi?

Started by René, July 18, 2019, 12:15:55 pm

Previous topic - Next topic

WAS

July 20, 2019, 02:28:12 am #15 Last Edit: July 20, 2019, 02:42:21 am by WASasquatch
Quote from: Dune on July 20, 2019, 02:18:01 am
And strata is hard edged, and we actually need something like the smooth voronoi.


I am going off of L1 Norm or Manhattan noise as shown in Rene's example and tutorials for blender, substance designer etc. It is hard edges. The illusion of soft edges is from underlying displacement and smoothing via subdivision of actual geometry. These voronoi diagrams are all hard edges. Including voronoi in TG such as fake stones. Normal computing and regular smooth displacement rounds them a bit.

This is our biggest limitation without out-of-the-box noises, cause in TG we can't just go in and compute normal everything and round straights, and than we have the issue of no subdivided edges, so they explode (biggest issue working with lateral). It'd be cool to see this sort of stuff in TG but considering the way it handles subdivision on a simple rock pop.... yeah.
Check out the Terragen Community on Facebook: https://www.facebook.com/groups/Terragen.Galleries/

René

Quote from: WASasquatch on July 19, 2019, 01:43:39 pm
I'm going to leave this right here: https://rosettacode.org/wiki/Voronoi_diagram

I'm afraid I don't know any math. At school, I opted for languages - French, German and English - instead of mathematics, which is something I regret to this day.
The right voronoi looks like a derivative of the left one, as if it has been warped towards squareness. That is probably not the case, but it is something worth trying.

WAS

July 20, 2019, 04:00:38 pm #17 Last Edit: July 20, 2019, 04:03:25 pm by WASasquatch
Quote from: René on July 20, 2019, 03:40:00 pm
Quote from: WASasquatch on July 19, 2019, 01:43:39 pm
I'm going to leave this right here: https://rosettacode.org/wiki/Voronoi_diagram

I'm afraid I don't know any math. At school, I opted for languages - French, German and English - instead of mathematics, which is something I regret to this day.
The right voronoi looks like a derivative of the left one, as if it has been warped towards squareness. That is probably not the case, but it is something worth trying.


It's the different distance operator, for example, you talked about manhattan, which is the right one. It's how the paths are drawn. These are all just based on diagrams just like this, either coloured or grayscale. Some extra math and functions would be needed to shade the diagram like voronoi diff scalar. Finally, the actual displaced geometry would need to be subdivided and edges smooth. This could be done by blurring the voronoi noise somehow, but it will be uniform with crevices etc and blur them together. The first example you posted would likely have inverting gradients heading towards the path points which would create the heightmap illusion of edges coming out, and flats, etc.

I am no good at math either and have been trying to do a manhattan distance formula in TG but I can't convert formulas to functions worth a penny. I'd need help with the base formula to try and do anything with the noise to make it workable.
Check out the Terragen Community on Facebook: https://www.facebook.com/groups/Terragen.Galleries/

Dune

If you mix some (stretched) voronoi diffs you should be getting squares as well as other shapes.

WAS

Quote from: Dune on July 21, 2019, 01:39:14 am
If you mix some (stretched) voronoi diffs you should be getting squares as well as other shapes.



How would you go about doing that? Voronoi doesn't stretch well on Y for lateral. It only seems to stretch a tiny bit and than stops, despite ramping up to let's say 100000 lol

Also when mixing X and Z noise it just creates ribbon overlays which aren't useful for anything rock wise -- also can't seem to rotate it for lateral..
Check out the Terragen Community on Facebook: https://www.facebook.com/groups/Terragen.Galleries/

Dune

July 22, 2019, 01:40:37 am #20 Last Edit: July 22, 2019, 01:43:45 am by Dune
I won't spill all my beans, but you can use a vector as size scalar. If I see people on FB seeking for rock structures, but never posting anything here, I tend to not give away too much. After all, I've spent ages to get where I am.

WAS

July 22, 2019, 01:03:17 pm #21 Last Edit: July 22, 2019, 01:59:22 pm by WASasquatch
Quote from: Dune on July 22, 2019, 01:40:37 am
I won't spill all my beans, but you can use a vector as size scalar. If I see people on FB seeking for rock structures, but never posting anything here, I tend to not give away too much. After all, I've spent ages to get where I am.


So, you've figured out square blocky rock displacement? I haven't seen you ever use anything beyond basic voronoi mixes. And if it's something you discovered from incentive from a community topic trying to discover better rock noise, humm.

Constant Vector doesn't help with Y issue, either. Where, let's say a vector at 100 for normal creates straight strata outcrops, the same on Y is just voronoi with the slightest stretch. Seems the only way voronoi work stretched on Y is literally straight sheet 90 degree cliff.

I'm just confused what you're going on. It seems like you made a pitch like you know what and how to achieve the correct blocky noise but pitching same deal we always do. Sure, it's edged, but no blocks.
Check out the Terragen Community on Facebook: https://www.facebook.com/groups/Terragen.Galleries/

Dune


René

July 23, 2019, 06:28:39 am #23 Last Edit: July 23, 2019, 06:32:08 am by René
With voronoi, horizontal and vertical stretched and merged, very interesting textures are certainly possible. With a lot of hassle I managed to get close to square noise a few times. The problem was that the quality depended on the point of view, i.e. you had to find a spot where the texture worked well. It also happened that the texture was not applicable to a new terrain, although you could get lucky.
When voronoi is stretched, its inherent shape becomes a problem; you get very pointed angles in some places.

WAS

July 23, 2019, 12:32:39 pm #24 Last Edit: July 23, 2019, 12:40:32 pm by WASasquatch
I guess our ideas of "blocks" are different. There is no way to achieve this with Voronoi stretched from my end, whether a small stretch or long stretch, and again, if your cliff isn't a sheer 90 degree angle you'll just end up with voronoi angles/ends (those points you mentioned). and deep lines  on X and Z; ribbons. '

You can use lowest cut away for some block like features, but again, they don't work well on Y due to cliff angle, still get the deep channels that end to hard which can create weird inverted creases if not careful. You'd have better luck with infinite X and Z or Y merged lines, like the square noise function.

This preview is on X and Z though, which looks nice in illusion, but as soon as you go lateral, you got basic voronoi shapes mixed in with blocks on X lol
Check out the Terragen Community on Facebook: https://www.facebook.com/groups/Terragen.Galleries/

Dune

You'd have to use either cylindrical or mask sets by normal.

archonforest

After of 2 pages of figure-figure and go nowhere can perhaps Matt say something about this? I am sure he knows the correct answer.

Not to make wrong anybody but on the Blender forum we would have a solution for a mystery like this in about 24 hrs. Not just in writing but with videos.
Dell T5500 with Dual Hexa Xeon CPU 3Ghz, 32Gb ram
Amiga 1200 8Mb ram, 8Gb ssd

René

I think I should have started this topic in Terragen Discussion instead of here, because Open Discussion is after all for non-Terragen related topics.
Maybe someone can move it to the right place.  ::)

WAS

July 24, 2019, 04:39:41 am #28 Last Edit: July 24, 2019, 01:38:14 pm by WASasquatch
Quote from: archonforest on July 24, 2019, 04:06:48 am
After of 2 pages of figure-figure and go nowhere can perhaps Matt say something about this? I am sure he knows the correct answer.

Not to make wrong anybody but on the Blender forum we would have a solution for a mystery like this in about 24 hrs. Not just in writing but with videos.


It would..not to mention tutorials and documentation on everything between. I had hoped Matt would have already chimed in. Perhaps topic location. Manhattan distance on same voronoi shader in a new shader shouldn't be hard to add too if it can't be explained in functions. It's just the distance operator the algorithm uses, rest stays the same from what I've looked at online in almost every coding language it's been used.
Check out the Terragen Community on Facebook: https://www.facebook.com/groups/Terragen.Galleries/

Hetzen

I made a square noise Worley/Manhatten function out of blues a few years back, it was horribly slow. It also doesn't get around the problem of diamond shapes on surfaces off x or z axis.

The first part of the tree is below. I've taken out the next stage of comparison due it being HORRENDOUSLY sloowww... and just added a few triangles to the pattern.

I've been playing around with another technique which works with surface normals, but don't have anything to show right now, as I'm getting lighting issues on the surfaces that don't look good.