YOUR ACCOUNT

Login or Register to post new topics or replies
Zoltan Erdokovy

Posts: 204
Filters: 24
I gaussian blur a white disc on black background, then I use the blurred image as a displacement on a flat 3d plane. The displaced hill's profile looks like the curve on the right.



What I'd like to have is a linear elevation, a profile just like on the left node.

Any ideas how to do that?
  Details E-Mail
uberzev
not lyftzev

Posts: 1890
Filters: 36
What if you turn off the Gaussian setting?

Otherwise you might want to post a snippet.
  Details E-Mail
Zoltan Erdokovy

Posts: 204
Filters: 24
I'd prefer gaussian blur, as the other one looks "blocky".

Anyways, here is a snipett:
ElevationPuzzle.ffxml

The "Target" is what I'd like to make from the plain white disc.
  Details E-Mail
Kraellin
Kraellin

Posts: 12749
Filters: 99
i dont know why, but when i go to save your snippet, zoltan, it changes the .ffxml to just .xml in the save box before i save it. other filters posted on the forum maintain the .ffxml (i just tried it) so, i dont know what's going on with yours. might want to look at it.
If wishes were horses... there'd be a whole lot of horse crap to clean up!

Craig
  Details E-Mail
Zoltan Erdokovy

Posts: 204
Filters: 24
o_O I have no idea whats going on there.

About the puzzle:
I was able to straighten out that gain curve with curve operators. Adding a bit to the bottom and taking off a bit from the top so it becomes pointy.
Probably the same should be done on the blurred disc but I don't see yet how.
  Details E-Mail
uberzev
not lyftzev

Posts: 1890
Filters: 36
I figured it out. Please stand by. smile:D
  Details E-Mail
Zoltan Erdokovy

Posts: 204
Filters: 24
Oh, you teaser... smile:)
  Details E-Mail
uberzev
not lyftzev

Posts: 1890
Filters: 36
ok, nevermind smile:|

I ran into a bug

In the mean time if you want a soft disk try a round frame component with a circle curve plugged in.
  Details E-Mail
Zoltan Erdokovy

Posts: 204
Filters: 24
Thanks anyway. smile:)

I need more than a soft disc. I'd like to have a general solution which would work with an arbitrary blurred shape with any blur radius.
  Details E-Mail
Zoltan Erdokovy

Posts: 204
Filters: 24
By using a Gaussian curve I was able to turn a soft disc into something like a blurred disc looks like. Not extremely precise, but close enough.
It looks like this.

But now I have no idea how to reverse the process. (Ie: making a soft disc from the blurred one.) Inverting or flipping the curve didn't help. smile:?:
  Details E-Mail
Zoltan Erdokovy

Posts: 204
Filters: 24
I think I know what I need:



To make the same thing to the gaussian curve that happens to the left gain.
(In the case of the gain curves, the gain value was multiplied by -1.)
  Details E-Mail
uberzev
not lyftzev

Posts: 1890
Filters: 36
Here's the EXACT curve you need:



I've done my best to recreate it...

unGaussian.ffxml
  Details E-Mail
Zoltan Erdokovy

Posts: 204
Filters: 24
Very cool uberzev, I really appreciate it! smile:)
  Details E-Mail
Zoltan Erdokovy

Posts: 204
Filters: 24
From a gamma and a gaussian curve's difference I managed to create a curve which made the blurred disc kinda linear. (The top has the greatest error, it isn't pointy.)

I thought I nailed it until I tried on a blurred vertical bar: it doesn't really work with that. It's not a steady curve but bumpy. It is probably caused by the fact that each pixel column has the same value. The gaussian blur will find the same value vertically regardless of the radius. Or something.

So what worked for the disc, looks crap on a bar. (Not to mention that I'd need to adjust 5 parameters whenever the blur radius changes.)

So I started to wonder if it is a solvable problem. Or maybe since the gaussian blur samples from all around, it produces many different elevations, so there is no "one curve fits all" way to solve this.
  Details E-Mail
uberzev
not lyftzev

Posts: 1890
Filters: 36
Post a snippet Zoltan.


Update...

unGaussian v1.1.ffxml
  Details E-Mail
Zoltan Erdokovy

Posts: 204
Filters: 24
Here is where I'm at right now

DeGauss

What you see with the default settings is the grossly exaggerated difference between the reference soft disc and a blurred one with a tone curve applied. The top is still too soft, but I could live with that.

However, if you uncheck Disc, so the input image becomes a bar, the difference skyrockets.

One problem with this test method is that I rely on the soft disc to check the elevation against. This means that when changing the blur radius, the white disc's radius also need to be changed, so it covers the same area as the reference soft disc.
I'm working on a way to visualize the cross section of a chosen pixel row in the result image. This way I could see clearly how parameters change the elevation, without the need of a reference (which does not exist when using an arbitrary shape).

The controls are prioritized, so the top 4 is what I massaged most of the time.

Ps: Does this file lose its .ffxml extension as well? It works for me, although instead of opening it in FF, FFox just shows the plain text. o_O
  Details E-Mail
uberzev
not lyftzev

Posts: 1890
Filters: 36
Quote
Zoltan Erdokovy wrote:
Ps: Does this file lose its .ffxml extension as well? It works for me, although instead of opening it in FF, FFox just shows the plain text. o_O

Still has proper extension, but opens as text in FF.
  Details E-Mail
Zoltan Erdokovy

Posts: 204
Filters: 24
Weird. Maybe some encoding issue...

Anyway, here is the latest:

DeGauss2

(I used bits from Mike Blackney's pixel color and uberzev's Curve to shape filters.)

SourceType picks from Disc/Bar/Noise1/Noise2
NoCorrection removes the "degauss" curve
CrossSection shows the elevation at a given pixel row
CrossSectionPos changes the sampled row

When the base shape is not a simple one then it gets kinda confusing. In case of a noise I don't really know how a linear elevation should look like.
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
Here's an alternate "close enough" version. It clips the last 1% from both end thus giving a clear edge at both black and white ends, and avoids the issues which take place near the zero-division extremes.

Ungaussian Elevation 2.ffxml
  Details E-Mail
ThreeDee
Lost in Space

Posts: 1672
Filters: 112
This is how it looks.

  Details E-Mail
Zoltan Erdokovy

Posts: 204
Filters: 24
Bloody hell.... :o It's soo simple... I spent two days on this problem and made ridiculously complex curves for the Tone Curve node... I feel silly. smile:)
This is awesome! You've just made my day (and fixed a feature in one of my filters). smile:D
Also, applying a tone curve to the result makes an erode effect. Very cool.
Great job ThreeDee.
  Details E-Mail

Join Our Community!

Filter Forge has a thriving, vibrant, knowledgeable user community. Feel free to join us and have fun!

33,711 Registered Users
+18 new in 30 days!

153,533 Posts
+38 new in 30 days!

15,348 Topics
+73 new in year!

Create an Account

Online Users Last minute:

42 unregistered users.