Author Topic: Zdepth with Corona and PS  (Read 22475 times)

2014-04-09, 05:49:13

Alex Abarca

  • Active Users
  • **
  • Posts: 422
  • Corona Certified Instructor
    • View Profile
    • Instagram

2014-04-09, 06:34:24
Reply #1

hairston630

  • Active Users
  • **
  • Posts: 7
    • View Profile
Excellent write up.  I will be experimenting with this in the upcoming days.  Thank you!

*Just took a look at your website.  Some amazing work you have there!  It definitely is inspiring.
« Last Edit: 2014-04-09, 06:38:38 by hairston630 »

2014-04-09, 07:14:23
Reply #2

Alex Abarca

  • Active Users
  • **
  • Posts: 422
  • Corona Certified Instructor
    • View Profile
    • Instagram
Thanks! its the first tutorial I ever write. I am glad someone out there finds it useful.

2014-04-09, 16:32:13
Reply #3

Juraj

  • Active Users
  • **
  • Posts: 4762
    • View Profile
    • studio website
You could alternatively suggest Frischluft for PS, it's night and day better than PS tool :- ). And it's quite cheap if I remember.
Please follow my new Instagram for latest projects, tips&tricks, short video tutorials and free models
Behance  Probably best updated portfolio of my work
lysfaere.com Please check the new stuff!

2014-04-09, 17:25:53
Reply #4

Chakib

  • Active Users
  • **
  • Posts: 787
  • Corona Omnomnomer !
    • View Profile
You could alternatively suggest Frischluft for PS, it's night and day better than PS tool :- ). And it's quite cheap if I remember.

agreed, the ps dof is not good at all.

2014-04-09, 21:42:46
Reply #5

Alex Abarca

  • Active Users
  • **
  • Posts: 422
  • Corona Certified Instructor
    • View Profile
    • Instagram
You could alternatively suggest Frischluft for PS, it's night and day better than PS tool :- ). And it's quite cheap if I remember.

I agree, that's a very good tool. It's fairly cheap in price, but it's still a cost you have to pay. My tutorial is with PS out of the box.

2014-04-09, 21:46:27
Reply #6

Alex Abarca

  • Active Users
  • **
  • Posts: 422
  • Corona Certified Instructor
    • View Profile
    • Instagram
agreed, the ps dof is not good at all.
[/quote]

You'll be surprise, for a subtle effect it does the job without any plug-in, and it surely beats having to render DOF through the frame buffer, because you cant change it later. This method is not written in stone, nevertheless it's a widely accepted method for quick and easy DOF in PS. Cheers

2014-04-10, 04:47:48
Reply #7

HLeandre

  • Active Users
  • **
  • Posts: 61
    • View Profile
    • Arstation
Thank you for your great tutorial Alex !

2014-04-10, 05:23:03
Reply #8

Alex Abarca

  • Active Users
  • **
  • Posts: 422
  • Corona Certified Instructor
    • View Profile
    • Instagram
Thank you, thank you. Your comments are an inspiration, I would like to do more. Sorry my blog is a mess, but thanks for visiting!

2014-04-23, 18:30:13
Reply #9

Alessandro

  • Active Users
  • **
  • Posts: 323
    • View Profile
    • DotLab Srl
The real problem start if the focus is in the second plane. Try to use the same method to have the focus on the distance ;)

Btw, your is a good quick way to control DOF in post, often we use it for some kinds of images, but for catalog images I prefer to obtain DOF directly from the renderer. And you?
My Ducati or a render with Corona.....mmm, hard question!

2014-04-23, 19:22:56
Reply #10

Alex Abarca

  • Active Users
  • **
  • Posts: 422
  • Corona Certified Instructor
    • View Profile
    • Instagram
I prefer the quick way of course, and with subtle Zdepth. However, render artists can definitely tell the difference between ZD and DOF  if you take a magnifying glass and look at the object's edges. But for the most part no one really stares at Zdepth.

2014-07-16, 02:15:12
Reply #11

druwee

  • Active Users
  • **
  • Posts: 39
    • View Profile
Good clean workflow tip. Thanks a lot for that.  It's well consolidated. And on a side note the visuals on your blog are great!

2015-01-22, 11:16:37
Reply #12

philippelamoureux

  • Active Users
  • **
  • Posts: 218
    • View Profile
Is it better to do effects like DoF in post or directly in Corona with appropriate camera settings? Other than saving render time is there an advantage?

2015-02-03, 09:52:52
Reply #13

FrostKiwi

  • Active Users
  • **
  • Posts: 686
    • View Profile
    • YouTube
Is it better to do effects like DoF in post or directly in Corona with appropriate camera settings? Other than saving render time is there an advantage?
Since rendering CoronaDoF is still kinda slow and DOF in general anyways, we are speaking of a time increase in the range of at least x4 per frame if you're are lucky. Once you go to Animation, a Night job render quickly becomes a week long task.
Using a supersampled zdepth pass with 32-bit float exr's gives you the same result as rendering the image for an eternity with almost invisible artifacts and once you add motion, with completely invisible artifacts, unless you go to a stillframe. With deepEXR support, which corona still lacks, artifacts would be a thing of the past.
AND you can still Refocus, if you didnt pull enough focus in 3dsmax.
Before I sound like billy mais, once we get into refraction you are screwed...
« Last Edit: 2015-02-03, 09:57:20 by SairesArt »
I'm 🐥 not 🥝, pls don't eat me ( ;  ;   )

2015-02-03, 13:51:19
Reply #14

Ricky Johnson

  • Active Users
  • **
  • Posts: 108
    • View Profile
Is it better to do effects like DoF in post or directly in Corona with appropriate camera settings? Other than saving render time is there an advantage?

I think it's worth mentioning for completeness that for the time being (disregarding any advances that deepEXR might provide in the future for post production) DOF simulated in Corona is very different in its mechanism from a DOF effect that is mimicked in post production.

Somebody please correct if I'm wrong but as I understand it when you calculate DOF in Corona or Vray you are simulating the de-focus by literally shifting the camera's position a number of times for each pixel and therefore information gathered may be incorporating information from objects at multiple depth levels and angles (this is particularly noticeable at the blurred edges of objects). When you use a Z-Depth pass to achieve a DOF effect in post you are only mimicking this type of blurring - because at this point you have lost the real 3D information that makes a true simulation of the photo-real defocus impossible. This is why the quality of in-render DOF is of a difference to post-render DOF. Various filters/plug-ins have different ways of trying to mimic the result but they literally don't have the information needed to create the same thing.

I'm not saying that the final result is incomparable in situations when DOF is slight but if you are looking to create images with the highest level of photo-real DOF and render times are not a huge issue then it's worth knowing the difference in the mechanism.


2015-02-03, 14:04:41
Reply #15

FrostKiwi

  • Active Users
  • **
  • Posts: 686
    • View Profile
    • YouTube
I'm not saying that the final result is incomparable in situations when DOF is slight but if you are looking to create images with the highest level of photo-real DOF and render times are not a huge issue then it's worth knowing the difference in the mechanism.
No, DOF is being rendered by Randomly placing samples in a radius around a given pixel and avereaging them, which takes a bullshit amount of time.
In post you just average the already existing data per pixel in a given radius. Disregarding Coverage and refraction, you get a 1:1 same exact result in both cases with 32 bit exrs or hdrs.
I'm 🐥 not 🥝, pls don't eat me ( ;  ;   )

2015-02-03, 14:51:50
Reply #16

Alessandro

  • Active Users
  • **
  • Posts: 323
    • View Profile
    • DotLab Srl
I'm not saying that the final result is incomparable in situations when DOF is slight but if you are looking to create images with the highest level of photo-real DOF and render times are not a huge issue then it's worth knowing the difference in the mechanism.
No, DOF is being rendered by Randomly placing samples in a radius around a given pixel and avereaging them, which takes a bullshit amount of time.
In post you just average the already existing data per pixel in a given radius. Disregarding Coverage and refraction, you get a 1:1 same exact result in both cases with 32 bit exrs or hdrs.

This is not fully correct. Try to get this very simple result in post. Of course maybe you can, but it's not so easy, it's hard just to imagine the result...
In most case I have no doubts, dof in render.
My Ducati or a render with Corona.....mmm, hard question!

2015-02-03, 15:03:44
Reply #17

Ricky Johnson

  • Active Users
  • **
  • Posts: 108
    • View Profile
No, DOF is being rendered by Randomly placing samples in a radius around a given pixel and avereaging them, which takes a bullshit amount of time.
In post you just average the already existing data per pixel in a given radius. Disregarding Coverage and refraction, you get a 1:1 same exact result in both cases with 32 bit exrs or hdrs.

Well, if that's the way Corona does it then agreed but I would have expected it to work similar to Vray which moves the camera
(again, this info I took from Chaos Group forum a few years back so I could be wrong but it seems like a logical explanation and I've always taken it to be the case).

If Corona is placing samples in a radius around a given pixel then you wouldn't be able to see through defocused edges on foreground objects to details beyond would you?
The system you're describing sounds like a simple type of blur.

2015-02-03, 15:06:19
Reply #18

Fibonacci

  • Active Users
  • **
  • Posts: 269
  • 3Dmanufaktura
    • View Profile
Hmmm....this case if you have an 32bit ZDepth pass, than you have a good chance to modifying the ZDepth's range, with simple use the levels modifier on it. Or to the 32bit passes use the  CameraRaw's CURVES.
Just convert to SmartObject, like always, then use Levels or Camera Raw and after use LensBlure. Try it. You will see, tha ZDepth pass is a really valuable pass in PS or Fusion or others...

Cheers mate!
Holy Corona : the materials is the clue.

2015-02-03, 15:13:54
Reply #19

Alessandro

  • Active Users
  • **
  • Posts: 323
    • View Profile
    • DotLab Srl
Hmmm....this case if you have an 32bit ZDepth pass, than you have a good chance to modifying the ZDepth's range, with simple use the levels modifier on it. Or to the 32bit passes use the  CameraRaw's CURVES.
Just convert to SmartObject, like always, then use Levels or Camera Raw and after use LensBlure. Try it. You will see, tha ZDepth pass is a really valuable pass in PS or Fusion or others...

Cheers mate!
Are you writing to me? In this case, enjoy yourself with the scene and try to obtain the same rendered result ;)

My Ducati or a render with Corona.....mmm, hard question!

2015-02-03, 20:14:32
Reply #20

FrostKiwi

  • Active Users
  • **
  • Posts: 686
    • View Profile
    • YouTube
I ment having the image being 32-bit, to have correct lightvalues for the bokeh.
Are you writing to me? In this case, enjoy yourself with the scene and try to obtain the same rendered result ;)
Challenge accepted
I'm 🐥 not 🥝, pls don't eat me ( ;  ;   )

2015-02-04, 11:41:45
Reply #21

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 9048
  • Turning coffee to features since 2009
    • View Profile
Theory: Pinhole camera with no DOF shoots all rays from single point. Camera with DOF shoots ray randomly originating from a shape of the aperture (circle, n-gon, custom image). Only the ray origin moves, ray direction is constructed so that all rays for single pixel created from all positions on the aperture intersect in a single point in the focal distance.

Comparison: Rendered DOF is the correct solution with MUCH better quality. Post-pro DOF is fake with inferior results - but much faster, with the option to re-focus, so it is a tradeoff. Rendered DOF is better quality, postpro DOF is faster, siple. Deep data/OpenEXR 2.0 helps, but probably does not solve the problem completely.
Rendering is magic.How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2015-02-04, 12:18:26
Reply #22

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 12752
  • Marcin
    • View Profile
There is also this. ;)
https://pictures.lytro.com/
Marcin Miodek | chaos-corona.com
3D Support Team Lead - Corona | contact us