Saturday, November 28, 2009

Its harder then expected

Yes, it is.
I've written articles before, but its surprising hard to find the right words to describe the Depth of Field effect. Much harder then physics ... its optics (a part of physics). The first draft is ready, but not for public yet.

So it will take a few more days till its perfectly done. :)


Greg the Mad

Wednesday, November 25, 2009

Depth of Awesome

So, the DoF shader is done, and I already made a compare with the usual linear interpolation approach of DoF.

... To my surprise does my technique perform better then the linear interpolation thing. What is probably because for mine you only need to draw the scene 3 times, while it is 4 times with the other technique.
Now I only have to figure a way out to put a future tutorial online. Best way would be to put it on my own internet page, ... which does not exist ...
Second best way would be ZiggyWare ... which is hacked by hackers ...
And as I don't have a third way yet, I'll have to look for one.

In that time I could play around a little and try some alpha mapping + DoF ...


Greg the Mad

Sunday, November 22, 2009

The Perfect Depth of Field

Yes, my Depth of Field Shader is working! And this in a most perfect way!

Objects that are in front of the focus point always blur, stuff in focus do not, and background can only blur over Background.

Still, even if that works great with normal opaque stuff. For scenes with elements that use the alpha channel you probably can use the same Shader, but you might have to play around with some RenderTargets. ... What will be my next goal. :)


Greg the Mad

Friday, November 20, 2009

Depth of Field

Its interesting that my last post here was 'Personal low' especially if you know that I actually had a great time in the last weeks. Wrote some lines here, got my Hexamat project back working, started a book, increased the usability of my engine, build a house, raised two kids ... well I did not all of those things but I'm fine. :)

Depth of Field:

The Depth of Field is if you focus your eye or camera on a object, you see everything beyond it blurred. You don't need it for my planed 2D game, but till now does sidetracking only got me forward. And it also taught me some lessons in RenderTargets, PostProcesses and Shaders in basic.

Well how does DoF work in video games? Simple, you render the scene, and render a blurred version of it, later you just render a third picture, were you interpolate between those two scenes based on the distance.

Simple as it gets does this way of DoF just suck. I've seen it and how it looks in Dragon Age Origins and just thought: "Hey, ... honestly? Is that the best way to do?" ... "NO!" I thought. So I grasped the next best DoF tutorial and took it apart. Learned the techniques it uses, cut them out and implanted my own.
Its not finished yet, and I don't know nothing about performance yet (no really ... what does that work mean? ... :p). So I will spend some more hours into it and make a sample, maybe even an tutorial.

I still don't know where I'll post it, as Ziggyware is hacked ... again. But we'll see. If I can build a Lego Mako and put the Manual online, I can do everything.


Tune in again when it says:
Mad Man Making
Greg the Mad