Author Topic: To go further with "Set Focus"  (Read 1850 times)

2019-06-12, 15:54:23

Naxos

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 129
    • View Profile
Hello and congrats for v4.0 !

the "set focus" for depth is very usefull, but it could be made better :
Setting the focus on an object, i guess it uses the pivot point, so what about larges objects ?
Maybe a "set focus" mode would be better : with a precise point in the scene to focus on.

And even better, on the same way we can feather a region render, it would be great to have the apperture f/xx set with a few clicks : the main focus point and a range...

Regards

2019-06-12, 16:13:31
Reply #1

Ryuu

  • Corona Team
  • Active Users
  • ****
  • Posts: 577
  • Michal
    • View Profile
In that case it's already better ;) The focus picker uses the exact point on the object you clicked, not its pivot.

2019-06-12, 16:13:45
Reply #2

Ondra

  • Administrator
  • Active Users
  • *****
  • Posts: 8896
  • Turning coffee to features since 2009
    • View Profile
Hi,
set focus indeed ray traces, and sets focus to exact point, not pivot ;)
Rendering is magic.
Private scene uploader | How to get minidumps for crashed/frozen 3ds Max | Sorry for short replies, brief responses = more time to develop Corona ;)

2019-06-12, 16:24:46
Reply #3

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 5793
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Instantly solved :]
I'm not Corona Team member. Everything i say, is my personal opinion only.

2019-06-12, 16:50:26
Reply #4

Naxos

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 129
    • View Profile
Hi,
set focus indeed ray traces, and sets focus to exact point, not pivot ;)

Ok, my bad, so what about the second part ?
To set a range in addition to the focus point, so the F/stop value sets itself accordingly ?

2019-06-12, 17:15:40
Reply #5

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9056
  • Marcin
    • View Profile
Clarification:
- "Set focus to this point" in the VFB is raytraced and sets focus to the specific point on surface.
- Corona Camera > DOF > Override > Object sets the focus point to the selected object's pivot

About a "range" for DOF:
We have another request about this from a different user, but I am really not sure how exactly this would work. DOF is sharp only based on a plane from the camera (it has no thickness) so in reality there is no "sharpness zone" there is only "more or less blurry". How exactly would those ranges decide what is "sharp enough" and what is "too blurry"? It would also look different in different resolutions, etc.

2019-06-12, 17:37:58
Reply #6

Naxos

  • Primary Certified Instructor
  • Active Users
  • ***
  • Posts: 129
    • View Profile
Clarification:
- "Set focus to this point" in the VFB is raytraced and sets focus to the specific point on surface.
- Corona Camera > DOF > Override > Object sets the focus point to the selected object's pivot

About a "range" for DOF:
We have another request about this from a different user, but I am really not sure how exactly this would work. DOF is sharp only based on a plane from the camera (it has no thickness) so in reality there is no "sharpness zone" there is only "more or less blurry". How exactly would those ranges decide what is "sharp enough" and what is "too blurry"? It would also look different in different resolutions, etc.

I think this is something that can be mathematically set, as regarding of the distance to the focus point, and the f/stop, we can make some maths to tell that after xx cm the blur will be near zero, can't we ?

Here is a way to calculate the DOF (in french) : http://www.galerie-photo.com/profondeur_de_champ_calcul.html
Here in english : https://javascriptsource.com/field-depth/ <- does not seams to work, but you have here the translation from french'one.
Maybe it could help.

2019-06-12, 19:25:35
Reply #7

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 5793
  • Let's move this topic, shall we?
    • View Profile
    • My Models
About a "range" for DOF:
We have another request about this from a different user, but I am really not sure how exactly this would work. DOF is sharp only based on a plane from the camera (it has no thickness) so in reality there is no "sharpness zone" there is only "more or less blurry". How exactly would those ranges decide what is "sharp enough" and what is "too blurry"? It would also look different in different resolutions, etc.

It's pretty simple, DOF range is defined by the circle of confusion CoC. For each sensor/film size, there is certain CoC size, below which, image is considered in focus and above, is defocused, blurry.
I'm not Corona Team member. Everything i say, is my personal opinion only.

2019-06-13, 01:05:27
Reply #8

SairesArt

  • Active Users
  • **
  • Posts: 677
  • Pizza | The Cheesen One
    • View Profile
    • SairesArt Portfolio
will be near zero, can't we ?
Yeah, the point of sharpness remains an infinitely small plane, as it is in real life.
You can get around this by doing what game engines do: Render 3 images and composite based on the depth pass. (some engine's call it focal regions I believe, it is done because purely DoF from depth has edge blending problems)
If you want perfect sharpness between 20cm and 50cm, you set focal point to 20cm and render. Then you set focal point to 50cm and render. And lastly one render without DoF.
In Photoshop you blend all three based in depth. 20cm, only in brightness regions smaller than 20cm, the no DoF image in between and the 50cm image from 50cm and more. This will make the 20cm-50cm region perfectly sharp with proper transitions to the other out of focus regions. Also, edge blending problems can occur depending on how your geometry is layed out.

All of this is obviously a fake.

2019-06-13, 12:26:37
Reply #9

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9056
  • Marcin
    • View Profile
About a "range" for DOF:
We have another request about this from a different user, but I am really not sure how exactly this would work. DOF is sharp only based on a plane from the camera (it has no thickness) so in reality there is no "sharpness zone" there is only "more or less blurry". How exactly would those ranges decide what is "sharp enough" and what is "too blurry"? It would also look different in different resolutions, etc.

It's pretty simple, DOF range is defined by the circle of confusion CoC. For each sensor/film size, there is certain CoC size, below which, image is considered in focus and above, is defocused, blurry.

Thanks, I guess this answers on all questions! I will log it as a feature request.

2019-06-14, 16:44:42
Reply #10

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9056
  • Marcin
    • View Profile