Login - Create Account
Bookmark and Share

Integral Component

Login or Register to post new topics or replies
Betis
The Blacksmith

Posts: 1104
Filters: 74
Yeah we have the derivative component. Powerful and incredibly badass.

However I want to make a Normal Map to Height Map converter. Bump to Normal requires a derivative be taken, which in the current toolset is very easily done, however an inverse function would requre that we integrate the image, which is not so easily done.

Thoughts? smile:)
Roses are #FF0000
Violets are #0000FF
All my base are belong to you.
  Details E-Mail
Indigo Ray

Posts: 979
Filters: 71
Taking the derivative gives you the slope of a function, or in this case an image by breaking it up into lines (hence the angle input). Very powerful and useful. But what would an integral component do? The area under the lines? What would that look like?
"Time flies like an arrow; Fruit flies like a banana." -Groucho Marx
  Details E-Mail
Betis
The Blacksmith

Posts: 1104
Filters: 74
Well I think it should add up the pixels in a certain direction, keeping the angle input. Constants would become linear gradients and if derivatives were plugged in they would return their original values.
Roses are #FF0000
Violets are #0000FF
All my base are belong to you.
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1346
Filters: 38
Its a tough one - many samples need to be collected and which interval should be used?
I don't think we will see this beeing added - also because it has a very narrow purpose. Lets hope we get a bitmap based script component in V3.. then it shouldn't be hard to make..
Njyldgarkn sample cache!
  Details E-Mail
Mike Blackney

Posts: 352
Filters: 54
It's a tricky one. It would be super useful (for starters, you could use it for normal maps to generate a height map) but for sure it would need lots of samples. Also, it'd break very easily for tiling images.

I wonder how much work it would be to make a script that did it. Or even if it would be feasible without dying from slowness.
  Details E-Mail
inujima

Posts: 111
Filters: 20
Even now integration can be achieved by using the Blur component.
As an example, I made the filter that convert a height map to a normal map and returnd it to a height map again.
However, because the error margin is large, it is not to be able to make a height map well from general normal map input.

#bump to normal to bump.ffxml
  Details E-Mail
Betis
The Blacksmith

Posts: 1104
Filters: 74
Woah, that's strange how that works. Well I still don't know how it does but dang, did you come up with that yourself? The baffling part is when you take the muliplied derivative of the normal map and blur it by 50, resulting in an offset version of the original image
Roses are #FF0000
Violets are #0000FF
All my base are belong to you.
  Details E-Mail
inujima

Posts: 111
Filters: 20
This is a rough explanation of how to create a integral function in FF. smile:D

  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1346
Filters: 38
Impressive work inujima!

I tried the normal to bump part with this image:
http://www.pinwire.com/content_images...malMap.jpg

However it seems there is something wrong here.. any ideas?
Njyldgarkn sample cache!
  Details E-Mail
SpaceRay
SpaceRay

Posts: 6394
Filters: 12
WOW !! This is a great work of explanation, I am "happy" that I "understand" everything that you have written smile:D smile:D


well, really and truly I do not understand nothing about science and complex maths like this smile:D and want to give my congratulations for such awesome knowledge you have about maths
  Details E-Mail
Betis
The Blacksmith

Posts: 1104
Filters: 74
I just took AP Calculus but it's summer and midnight so I don't want to decipher that lol but it looks amazing
Roses are #FF0000
Violets are #0000FF
All my base are belong to you.
  Details E-Mail
inujima

Posts: 111
Filters: 20
To Sphinx.
Because a general normal map image is low accurate, it is impossible in this way to restore it to a height map.
  Details E-Mail
inujima

Posts: 111
Filters: 20
I made an one more example filter using an integral function.
This is flat blur filter (not gaussian blur) that is able to set radiuses as a map.

Mapped Radius Blur (Flat Blur).ffxml
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1346
Filters: 38
Sweet! This method reminds me of summed area table texture mapping.. very cool solution!
Njyldgarkn sample cache!
  Details E-Mail
Betis
The Blacksmith

Posts: 1104
Filters: 74
I didn't understand any of the inside of that filter. I even did some heavy multiplies on some of the really low-value components to see if I could visualize anything but to no avail. Your work is astounding smile8)
Roses are #FF0000
Violets are #0000FF
All my base are belong to you.
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1346
Filters: 38
Betis, here is a good explanation:

http://http.developer.nvidia.com/GPUG..._ch08.html

Scroll down to "8.5 Summed-Area Variance Shadow Maps"

inujima uses a zero outer region to calculate the summed area table, i.e. all the outer non visible 0 value samples influences the blur result in a way that makes up a summed area table. Very smart smile:-)
Njyldgarkn sample cache!
  Details E-Mail
Sphinx.
Filter Optimizer

Posts: 1346
Filters: 38
Here is a simplified version of the variable box blur filter.

SAT Blur.ffxml
Njyldgarkn sample cache!
  Details E-Mail
inujima

Posts: 111
Filters: 20
This is very convenient, Sphinx.
I made a filter using a this script with arranged a little .

  Details E-Mail
inujima

Posts: 111
Filters: 20
This filter is here.

#Frozen Window v1.ffxml
  Details E-Mail
SpaceRay
SpaceRay

Posts: 6394
Filters: 12
useful

Image
  Details E-Mail

Join Our Community!

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

15,504 Registered Users
+8 new last day!

113,334 Posts
+70 new last day!

10,181 Topics
+9 new last day!

Online Users Last minute:

5 unregistered users.

Recent Wiki Edits:

Follow filterforge on Twitter