Betis
![]() |
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? ![]() Roses are #FF0000
Violets are #0000FF All my base are belong to you. |
|
Posted: April 2, 2011 5:14 pm | ||
Indigo Ray
![]() |
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?
|
|
Posted: April 4, 2011 8:18 pm | ||
Betis
![]() |
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. |
|
Posted: April 4, 2011 8:24 pm | ||
Sphinx.
![]() |
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.. |
|
Posted: April 5, 2011 1:27 am | ||
Mike Blackney
![]() |
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. |
|
Posted: April 11, 2011 9:21 pm | ||
inujima
![]() |
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 |
|
Posted: July 7, 2011 5:43 pm | ||
Betis
![]() |
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. |
|
Posted: July 7, 2011 8:50 pm | ||
inujima
![]() |
||
Posted: July 10, 2011 7:41 am | ||
Sphinx.
![]() |
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? |
|
Posted: July 11, 2011 1:27 am | ||
SpaceRay
![]() |
WOW !! This is a great work of explanation, I am "happy" that I "understand" everything that you have written
![]() ![]() well, really and truly I do not understand nothing about science and complex maths like this ![]() |
|
Posted: July 11, 2011 1:44 am | ||
Betis
![]() |
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. |
|
Posted: July 11, 2011 1:52 am | ||
inujima
![]() |
To Sphinx.
Because a general normal map image is low accurate, it is impossible in this way to restore it to a height map. |
|
Posted: July 13, 2011 1:34 am | ||
inujima
![]() |
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 |
|
Posted: July 13, 2011 2:03 am | ||
Sphinx.
![]() |
Sweet! This method reminds me of summed area table texture mapping.. very cool solution!
|
|
Posted: July 13, 2011 3:01 am | ||
Betis
![]() |
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
![]() Roses are #FF0000
Violets are #0000FF All my base are belong to you. |
|
Posted: July 13, 2011 4:34 am | ||
Sphinx.
![]() |
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 ![]() |
|
Posted: July 13, 2011 5:51 am | ||
Sphinx.
![]() |
||
Posted: July 14, 2011 4:13 am | ||
inujima
![]() |
||
Posted: July 22, 2011 10:35 pm | ||
inujima
![]() |
||
Posted: July 22, 2011 10:36 pm | ||
SpaceRay
![]() |
useful
![]() |
|
Posted: August 9, 2012 3:22 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,531 Posts
+36 new in 30 days!
15,347 Topics
+72 new in year!
13 unregistered users.