Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

#ActualCukyDoh

Posted 16 June 2012 - 04:36 AM

I'll agree with everyone else and say the more interesting approaches would be:
  • Inferred-lighting style dithered depth
    • Only draw transparency to some pixels and then resolve after DoF.
    • Should "just work" and give particle lighting (See Volition's rain for an example), but likely low quality.
  • Draw particles after DoF and apply manually
    • I've played with this myself but never had the best results. This solves two issues though, one the DoF destroying your particles, and 2 your particles not getting the correct DoF.
    • Draw the particles and scale and blur them (or cheat with mips and pre-blurred textures) after your DoF pass.
    • You can have some fun putting e.g. a hexagon in the lower mips of a flame ember particle; Gives interesting results!
  • DoF pass per render batch
    • Another I've played with and had interesting (but expensive) results. This works well for larger and rare objects, e.g. a glass window.
    • When drawing the window, apply DoF on the background based on the window to previous depth distance. Allow the window to depth write and then apply post DoF as usual.
    • This will give a fairly correct layered DoF when the far original layer written will accumulate layers of DoF.
    • Using a layered depth buffer approach is likely much cheaper, correct and flexlible though! ;-)
For the most part this is still just an "unsolved" issue though in most major engines, e.g. CryEngine and Unity both exhibit the artifact. Even the latest Unreal 4 screenshots show this problem, which means they've haven't found a robust real-time solution yet.

Note how most of the below particles are actually in the foreground:

Posted Image

Posted Image

#3CukyDoh

Posted 16 June 2012 - 04:30 AM

I'll agree with everyone else and say the more interesting approaches would be:
  • Inferred-lighting style dithered depth - Only draw transparency to some pixels and then resolve after dof. Should "just work" and give particle lighting (See Volition's rain for an example), but likely low quality.
  • Draw particles after DoF and apply manually - I've played with this myself but never had the best results. This solves two issues though, one the DoF destroying your particles, and 2 your particles not getting the correct DoF. Draw the particles and scale and blur them (or cheat with mips and pre-blurred textures) after your DoF pass. You can have some fun putting e.g. a hexagon in the lower mips of a flame ember particle; Gives interesting results!
  • DoF pass per render batch - Another I've played with and had interesting (but expensive) results. This works well for larger and rare objects, e.g. a glass window. When drawing the window, apply DoF on the background based on the window to previous depth distance. Allow the window to depth write and then apply post DoF as usual. This will give a correct layered DoF, but using layered depth buffer approaches is likely much cheaper and flexlible! ;-)

For the most part this is still just an "unsolved" issue though in most major engines, e.g. CryEngine and Unity both exhibit the artifact. Even the latest Unreal 4 screenshots show this problem, which means they've haven't found a robust real-time solution yet.

Note how most of the below particles are actually in the foreground:

Posted Image

Posted Image

#2CukyDoh

Posted 16 June 2012 - 04:26 AM

I'll agree with everyone else and say the more interesting approaches would be:
  • Inferred-lighting style dithered depth - Only draw transparency to some pixels and then resolve after dof. Should "just work", but likely low quality.
  • Draw particles after DoF and apply manually - I've played with this myself but never had the best results. This solves two issues though, one the DoF destroying your particles, and 2 your particles not getting the correct DoF. Draw the particles and scale and blur them (or cheat with mips and pre-blurred textures) after your DoF pass.
  • DoF pass per render batch - Another I've played with and had interesting (but expensive) results. This works well for larger and rare objects, e.g. a glass window. When drawing the window, apply DoF on the background based on the window to previous depth distance. Allow the window to depth write and then apply post DoF as usual. This will give a correct layered DoF, but using layered depth buffer approaches is likely much cheaper and flexlible! ;-)
For the most part this is still just an "unsolved" issue though in most major engines, e.g. CryEngine and Unity both exhibit the artifact. Even the latest Unreal 4 screenshots show this problem, which means they've haven't found a robust real-time solution yet.

Note how most of the below particles are actually in the foreground:

Posted Image

Posted Image

#1CukyDoh

Posted 16 June 2012 - 04:24 AM

I'll agree with everyone else and say the more interesting approaches would be:
  • Inferred-lighting style dithered depth - Only draw transparency to some pixels and then resolve after dof. Should "just work", but likely low quality.
  • Draw particles after DoF and apply manually - I've played with this myself but never had the best results. This solves two issues though, one the DoF destroying your particles, and 2 your particles not getting the correct DoF. Draw the particles and scale and blur them (or cheat with mips and pre-blurred textures) after your DoF pass.
  • DoF pass per render batch - Another I've played with and had interesting (but expensive) results. This works well for larger and rare objects, e.g. a glass window. When drawing the window, apply DoF on the background based on the window to previous depth distance. Allow the window to depth write and then apply post DoF as usual. This will give a correct layered DoF, but using layered depth buffer approaches is likely much cheaper and flexlible! ;-)

For the most part this is still just an "unsolved" issue though in most major engines, e.g. CryEngine and Unity both exhibit the artifact. Even the latest Unreal 4 screenshots show this problem, which means they've haven't found a robust real-time solution yet:

Posted Image

Note how most of those DoF particles are actually in the foreground....

PARTNERS