Wax78's Depth of field software
Wax78's Depth of field software
Hello to everyone,
I've recently made a little software that i'd like to share with you because it make me gain some times when rendering with KT of another program. U'll probably tell me there's others one that work pretty well i know, but i'd like to learn the technics beside ...
That program enable you to input an image and his depth map to compute a simple but enough effective for my eyes Depth of Field effect.
- You can change the distance point, the amount of ray deviation, and number of samples.
- Make animation with distance that change on each frames. (BMP export).
- Use the "realtime" module (GPU) to check in realtime the params effects.
You can download it by looking at my website http://renaud.warnotte.be/ or directly by http://renaud.warnotte.be/Projects/DOFPro/. (browser for latest version).
Thanks you for your listen.
Notes :
You need java 1.6 and windows (should work on other os but don't have time to try/release stg).
You also need a graphics cards with OPENGL and shaders support because there's a preview mode that enable you to see in realtime the effect of each parameters. (not really accurate, but really more fast than cpu).
I've recently made a little software that i'd like to share with you because it make me gain some times when rendering with KT of another program. U'll probably tell me there's others one that work pretty well i know, but i'd like to learn the technics beside ...
That program enable you to input an image and his depth map to compute a simple but enough effective for my eyes Depth of Field effect.
- You can change the distance point, the amount of ray deviation, and number of samples.
- Make animation with distance that change on each frames. (BMP export).
- Use the "realtime" module (GPU) to check in realtime the params effects.
You can download it by looking at my website http://renaud.warnotte.be/ or directly by http://renaud.warnotte.be/Projects/DOFPro/. (browser for latest version).
Thanks you for your listen.
Notes :
You need java 1.6 and windows (should work on other os but don't have time to try/release stg).
You also need a graphics cards with OPENGL and shaders support because there's a preview mode that enable you to see in realtime the effect of each parameters. (not really accurate, but really more fast than cpu).
Last edited by Wax on Sun Feb 07, 2010 3:09 pm, edited 2 times in total.
Re: Wax78's Depth of field software
Works great, but the resulting image looks a little fuzzy.
- Attachments
-
- resultdepth.png (224.27 KiB) Viewed 14504 times
My portfolio: http://www.solosplace.com
Re: Wax78's Depth of field software
Cool, nice to see someone interested
Did you changed the sample value ? How much do you put ? (You can double click on the "slider controler" to have an edit box where you can enter values manually).
Anyway, my current algorithm is a little tricky to. I used random values to do modulation instead of calculating the "real optical value" if i can see it like that has i'm not ultra specialist.
Note : Can you try with another image more complex or with a lot of cube, like the one in samples. To understand exactly, thanks.
Did you changed the sample value ? How much do you put ? (You can double click on the "slider controler" to have an edit box where you can enter values manually).
Anyway, my current algorithm is a little tricky to. I used random values to do modulation instead of calculating the "real optical value" if i can see it like that has i'm not ultra specialist.
Note : Can you try with another image more complex or with a lot of cube, like the one in samples. To understand exactly, thanks.
Re: Wax78's Depth of field software
Hello everyone again,
I made this little video (badly compressed by youtube ) to show the result of my software.
I've made a simple photo of my dog. Then I made a depth map by hand with photoshop (this depth map is not really accurate has done by hand ultra quickly).
Then I used my software to produce the animation, here's result
[youtube]http://www.youtube.com/watch?v=ls2FiAU9zA0[/youtube]
*edit by Fletch - for some reason, to use the youtube tags, you must delete most of the link until you get just the video number AFTER the "=" sign.like this:
I made this little video (badly compressed by youtube ) to show the result of my software.
I've made a simple photo of my dog. Then I made a depth map by hand with photoshop (this depth map is not really accurate has done by hand ultra quickly).
Then I used my software to produce the animation, here's result
[youtube]http://www.youtube.com/watch?v=ls2FiAU9zA0[/youtube]
*edit by Fletch - for some reason, to use the youtube tags, you must delete most of the link until you get just the video number AFTER the "=" sign.like this:
Code: Select all
[youtube]ls2FiAU9zA0[/youtube]
Re: Wax78's Depth of field software
If you download the trial version of Twilight, and do a test yourself by rendering a simple scene, and it's depth mask, you can create a good tutorial for us all.
I want to remind folks that animating DOF in Twilight is easy and very possible already.
How to get DOF (Depth of Field) in your image [Video]
See the video
still shot
I want to remind folks that animating DOF in Twilight is easy and very possible already.
How to get DOF (Depth of Field) in your image [Video]
See the video
still shot
Re: Wax78's Depth of field software
Seems a nice idea Fletch. So i've made a little screenshots and explanation on how to render a scene in Twillight (i'm not expert at twillight) and use my software after. I hope that's what you were suggesting
Of course, using the DOF of twillight (or another "tracer") will give far better result but in more time i think. (Correct me if I'm wrong please .
Anyway here's my instructions on how to use twillight with my soft :
1) First load Twillight render and create/load your scene,
.
Then choose the Render method to Depth Map [Specialized] and render the image.
Result should look like this, so save that image somewhere.
Of course, using the DOF of twillight (or another "tracer") will give far better result but in more time i think. (Correct me if I'm wrong please .
Anyway here's my instructions on how to use twillight with my soft :
1) First load Twillight render and create/load your scene,
.
Then choose the Render method to Depth Map [Specialized] and render the image.
Result should look like this, so save that image somewhere.
Last edited by Wax on Sat Oct 03, 2009 11:16 am, edited 1 time in total.
Re: Wax78's Depth of field software
2) Then make the same to render the image in the way you want (Photon map, MLT, ...) and save it somewhere too.
You have now the colored image and his depth map.
3) Load my little DOF software, then load the 2 images (Menu->File->Load...) You'll obtain 3 images inside GUI (The original image, his map, and the result).
.
4) Then you'll have to change the 3 parameters.
Params description :
1. Distance : The reference distance (0 for very near to 256 very far). This will be used to determine where the focus will be on.
2. Deviance : The amount each pixel will be "deviating" his original position when far for the "Focus point".
3. Samples : Amount of pixel to use for each pixel (Smaller is faster but uglier). (Notes : with GLSL don't hesitate to multiply this by 4 or 8).[/list]
After that you can make 3 operations :
4. Compute the image to obtain the result image with CPU algorithm.
5. Show a little window where you can preview effect of parameter on the result. Using GPU to "simulate" fastly the CPU algorithm. (Not very beautyfull but usefull).
6. Make an animation : When pressed go and take a coffee somewhere ... This button will generate 256 or 512 Image with Distance raising from 0 to 256 or 512.
Note that the output will be BMP file in the outs folder.
You have now the colored image and his depth map.
3) Load my little DOF software, then load the 2 images (Menu->File->Load...) You'll obtain 3 images inside GUI (The original image, his map, and the result).
.
4) Then you'll have to change the 3 parameters.
Params description :
1. Distance : The reference distance (0 for very near to 256 very far). This will be used to determine where the focus will be on.
2. Deviance : The amount each pixel will be "deviating" his original position when far for the "Focus point".
3. Samples : Amount of pixel to use for each pixel (Smaller is faster but uglier). (Notes : with GLSL don't hesitate to multiply this by 4 or 8).[/list]
After that you can make 3 operations :
4. Compute the image to obtain the result image with CPU algorithm.
5. Show a little window where you can preview effect of parameter on the result. Using GPU to "simulate" fastly the CPU algorithm. (Not very beautyfull but usefull).
6. Make an animation : When pressed go and take a coffee somewhere ... This button will generate 256 or 512 Image with Distance raising from 0 to 256 or 512.
Note that the output will be BMP file in the outs folder.
Re: Wax78's Depth of field software
nice tutorial.... I'll try it sometime
Re: Wax78's Depth of field software
Here are some news for this project...
I've just finished debbugging the alpha stage of the new GPU version of the software. It's about 50 * faster than with the CPU.
There's no GUI for the moment or something usable for everyone but it'll come soon.
So here are 2 new video of my dof software result : (From far to near or the invert).
[youtube]http://www.youtube.com/watch?v=lPtteWUMlk4[/youtube]
[youtube]http://www.youtube.com/watch?v=QHVPxkkASrM[/youtube]
Enjoy
I've just finished debbugging the alpha stage of the new GPU version of the software. It's about 50 * faster than with the CPU.
There's no GUI for the moment or something usable for everyone but it'll come soon.
So here are 2 new video of my dof software result : (From far to near or the invert).
[youtube]http://www.youtube.com/watch?v=lPtteWUMlk4[/youtube]
[youtube]http://www.youtube.com/watch?v=QHVPxkkASrM[/youtube]
Enjoy
Re: Wax78's Depth of field software
I was just looking for a GIMP plugin that did this. I thought for sure it'd be an easy enough task to affix the focus on any point in the gradient and figured someone else had already thought the same thing. I suppose the difference is that no many people work with a grayscale depthmap like we can in renderings.
Who is online
Users browsing this forum: No registered users and 34 guests