Zoltan Erdokovy
![]() |
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? |
|||
Posted: April 10, 2009 6:13 am | ||||
uberzev
![]() |
What if you turn off the Gaussian setting?
Otherwise you might want to post a snippet. |
|||
Posted: April 10, 2009 6:47 am | ||||
Zoltan Erdokovy
![]() |
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. |
|||
Posted: April 10, 2009 7:38 am | ||||
Kraellin
![]() |
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 |
|||
Posted: April 10, 2009 7:46 am | ||||
Zoltan Erdokovy
![]() |
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. |
|||
Posted: April 10, 2009 8:54 am | ||||
uberzev
![]() |
I figured it out. Please stand by.
![]() |
|||
Posted: April 10, 2009 9:37 am | ||||
Zoltan Erdokovy
![]() |
Oh, you teaser...
![]() |
|||
Posted: April 10, 2009 10:23 am | ||||
uberzev
![]() |
ok, nevermind
![]() 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. |
|||
Posted: April 10, 2009 11:17 am | ||||
Zoltan Erdokovy
![]() |
Thanks anyway.
![]() 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. |
|||
Posted: April 10, 2009 11:57 am | ||||
Zoltan Erdokovy
![]() |
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. ![]() |
|||
Posted: April 11, 2009 11:46 am | ||||
Zoltan Erdokovy
![]() |
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.) |
|||
Posted: April 11, 2009 12:36 pm | ||||
uberzev
![]() |
||||
Posted: April 11, 2009 2:46 pm | ||||
Zoltan Erdokovy
![]() |
Very cool uberzev, I really appreciate it!
![]() |
|||
Posted: April 11, 2009 3:57 pm | ||||
Zoltan Erdokovy
![]() |
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. |
|||
Posted: April 12, 2009 5:44 am | ||||
uberzev
![]() |
||||
Posted: April 12, 2009 5:49 am | ||||
Zoltan Erdokovy
![]() |
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 |
|||
Posted: April 12, 2009 7:32 am | ||||
uberzev
![]() |
Still has proper extension, but opens as text in FF. |
|||
Posted: April 12, 2009 8:07 am | ||||
Zoltan Erdokovy
![]() |
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. |
|||
Posted: April 12, 2009 8:33 am | ||||
ThreeDee
![]() |
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 |
|||
Posted: April 14, 2009 6:58 am | ||||
ThreeDee
![]() |
This is how it looks.
![]() |
|||
Posted: April 14, 2009 7:04 am | ||||
Zoltan Erdokovy
![]() |
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.
![]() This is awesome! You've just made my day (and fixed a feature in one of my filters). ![]() Also, applying a tone curve to the result makes an erode effect. Very cool. Great job ThreeDee. |
|||
Posted: April 14, 2009 7:55 am |
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!
42 unregistered users.