soft maximum/minimum

Started by Dune, December 04, 2015, 03:14:45 AM

Previous topic - Next topic

j meyer

Yes,please,a working example would be very helpful.

bobbystahr

something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

Matt

#17
Quote from: Dune on December 08, 2015, 10:06:18 AM
I assume the fractal softness needs to have a minimum of a value above black for the least bit of softness

It's OK for the softness to be 0. Then it just gives the (hard) maximum.

Quote
1 being max?

There is no upper limit on the softness you can use. If you are calculating the soft maximum of functions that produce very large values, then you probably want to use large softness values.

By the way, you can leave the softness input empty. It defaults to softness 1.

Quote
I was just trying to get it to work (smoothing the lowest areas of a fractal terrain into a valley), but the terrain only doubled in height  :(

That could happen if the softness value is too large for the functions you're working with. If you have colours that range from 0 to 1, you want a softness value much lower than 1. Perhaps start with 0.1.

I've attached an example project that shows how to use Soft Maximum to merge a terrain displacement with a constant to create a plain that smoothly transitions into the original terrain.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

bobbystahr

Thanks very much Matt...will dig into this when my Swamp Test with the Ulco cypress' finishes test rendering....
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

AP

A better understanding certainly helps as this is what i'm currently experimenting with trying to make V and U shaped valleys, i might be missing some other functions for such features. Even larger valleys for softer transitions. I was using large values for the mountain ranges i'm working on so it is interesting to see the results of what those higher value capabilities are.

I'm thinking for U shaped valleys, more of a bell curve-like profile is needed.

fleetwood


Dune

Great, Matt, thanks very much.

AP

Oh and yes, much appreciative.

Tangled-Universe

I used the regular clamp before to create a flat bottom for a canyon, but it gives artefacts at the intersections.
This new clamp function does it in a much nicer way.

Matt's example also demonstrates nicely that you can create large shallow mountain lakes, where you can see stones being refracted in the water :)


WAS

I'm going to have this another go. I wonder if you could achieve a softer look by stepping a function with transform input and using soft maximum/minimum to create a soft "gradient" of the terrain. I am focused on nothing but blurring right now as I've now been in several vector based programs that can do it. Even WM2 can blur your vector-based drawing.

Kadri

#26

Sometimes there are topics i can not understand.Like this blurring problem (not directly about the question in this thread).

We don't have a gradient kind of feature but you can use other ways to archive some similar things.
Just when you open the default scene and use the "Simple shape shader" and use the "Edge profile" option with a "Edge width" of your desire and play with the main color what you get is a blurring (technically correct or not i don't know) of the fractal terrain by masking.

And isn't playing with the "Displacement roughness" and "Displacement spike limit" actually the same as blurring the Fractal terrain node output too?

If you use those things together with nodes like "Merge" and-or surface restrictions,image masks etc.you could archive many things.

As i said i don't see the exact problem. I will be happy if you show me what i don't understand guys (no sarcasm)?




Oshyan

WASasquatch, applying a gradient to the edge of a vector is not the same as "blurring". And if it's really "blurring", then it must be a raster function in WM (WM is fundamentally a raster-oriented app, even though it has vector/spline functions). If you're seeing a true, *generalized* "procedural blur" capability somewhere I'd certainly be interested in seeing it. Things like particular settings of a procedural function that create blur-like effects are really just *capabilities* of that particular shader and function. The thing about blurring is ideally it *should not care about what the input data is or where it came from*, it should just be able to blur it, globally and uniformly. If it can't do that, I wouldn't really call it "blur" but "blur-like", and likely very context-specific (which, of course, greatly limits its usefulness).

- Oshyan

WAS

#28
Quote from: Kadri on December 09, 2015, 03:04:36 PM

Sometimes there are topics i can not understand.Like this blurring problem (not directly about the question in this thread).

We don't have a gradient kind of feature but you can use other ways to archive some similar things.
Just when you open the default scene and use the "Simple shape shader" and use the "Edge profile" option with a "Edge width" of your desire and play with the main color what you get is a blurring (technically correct or not i don't know) of the fractal terrain by masking.

And isn't playing with the "Displacement roughness" and "Displacement spike limit" actually the same as blurring the Fractal terrain node output too?

If you use those things together with nodes like "Merge" and-or surface restrictions,image masks etc.you could archive many things.

As i said i don't see the exact problem. I will be happy if you show me what i don't understand guys (no sarcasm)?

The SSS approach can create a "Intensity" gradient, but isn't actually smoothing/blurring anything.

The roughness is only the detail on top of the main displacement, so without it, you can plainly see the vector peaks/angles.

I'm not sure how it would be done in TG but from all I'm seeing in other programs and threads about the topic, it's basically a combination of gradienting the edges, as well as transforming the input to manually blur.

This could possibly be done with TG3 as is now by stepping and scaling the border and it's intensity (colour) and tons of Merge Shaders. But I'm not sure where to begin with that. From what I can tell, this would be done manually without extensive knowledge of functions. And by doing so you need a 0 - 1 range and every 0.001 (or so) range in between for softness on every scale step. Not sure, but that seems like over 1000+ nodes.


___


Here is a small testing jumping by 0.1 scale on softness and size scale. Need to compensate for radial effect with translation I believe but it does make for a softer look then the default softness of the PF. Merge shaders set to subtract Input - A.



Besides the radial issue and finding correct translation settings, it does make for a soft final power fractal with absolutely NO hard angles/edges. This version has 6 total phases with multiplication of -0.1 on each step to a total of  -0.6 translation, 1.6 scale and 0.6 softness.



So it seems possible to blur further, this method, however is more of a radial blur, unfortunately.

Dune

No hard edges in this extremely basic setup, so I don't understand what you're after either.