Ikono
12-03-2009, 09:03 AM
Hmmm...
So, I'm attempting to use a Sobel filter to detect edges based on the SceneDepth in a post-process material.
Beginning from a SceneDepth sample, and then dividing that by 10000 to get a decent range I plug it into the Sobel filter, offsetting the depth sample and such.
Anyway, material stuff aside, I'm getting some interesting and frustrating issues.
Basically, any details close to the player are getting completely lost, and the base of the character model is fading out too.
And anything too far away from the player, or sometimes too close, is being painted pure black.
Here are some examples:
http://i769.photobucket.com/albums/xx334/nekoikono/outline_wip1.png
Basically, the "sea" area of the DM-Sanctuary map is being painted pure black at the extreme depths toward the edge of the map.
http://i769.photobucket.com/albums/xx334/nekoikono/outline_wip2.png
And here, all detail near the player is washed out in white.
I really am not sure why this is happening...
So, just wondering if anyone has any clues what's causing this?
Thanks. ^^
Update:
Just changed the filter around a bit so it uses less operations and determines edges based on a diagonal offset. The edge detection is working MUCH better now, but the issue with flat surfaces is still there and it still removes detail at close range.
http://i769.photobucket.com/albums/xx334/nekoikono/outline_wip3.png
As you can see here~
Blargh~! ^^';;
So, I'm attempting to use a Sobel filter to detect edges based on the SceneDepth in a post-process material.
Beginning from a SceneDepth sample, and then dividing that by 10000 to get a decent range I plug it into the Sobel filter, offsetting the depth sample and such.
Anyway, material stuff aside, I'm getting some interesting and frustrating issues.
Basically, any details close to the player are getting completely lost, and the base of the character model is fading out too.
And anything too far away from the player, or sometimes too close, is being painted pure black.
Here are some examples:
http://i769.photobucket.com/albums/xx334/nekoikono/outline_wip1.png
Basically, the "sea" area of the DM-Sanctuary map is being painted pure black at the extreme depths toward the edge of the map.
http://i769.photobucket.com/albums/xx334/nekoikono/outline_wip2.png
And here, all detail near the player is washed out in white.
I really am not sure why this is happening...
So, just wondering if anyone has any clues what's causing this?
Thanks. ^^
Update:
Just changed the filter around a bit so it uses less operations and determines edges based on a diagonal offset. The edge detection is working MUCH better now, but the issue with flat surfaces is still there and it still removes detail at close range.
http://i769.photobucket.com/albums/xx334/nekoikono/outline_wip3.png
As you can see here~
Blargh~! ^^';;