Author Topic: Direct Visibility Override  (Read 7238 times)

2020-02-14, 21:21:39

Designerman77

  • Active Users
  • **
  • Posts: 507
    • View Profile
Hi developers.

In C4D, every time when I switch on DOF in there camera, the background generated from Direct Visibility Override gets totally blurred out, unless you set the F-Stop to a super high number.

Sorry, if this topic maybe already exists somewhere.

Does this issue in Corona 5 still exist?
I have not updated yet fron 4 to 5.

2020-02-14, 22:19:37
Reply #1

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5434
    • View Profile
Wouldn't this be correct? If anything is far enough away in your scene to get blurred, the background (which is further) inevitably gets blurred and even more. Also, the blurring happens with a Corona Sky too, so with regular visible environment and not just with the override? (does for me). The direct visibility override is still treated as an environment, just one that doesn't actually cast light into the scene (while the regular env is both visible and casts light).

For not treating it as an env in the 3D scene (and so, not have any blurring), any such background would have to be replaced in post. This is the same in 3ds Max btw.
Tom Grimes | chaos-corona.com
Product Manager | contact us

2020-02-14, 22:22:34
Reply #2

Designerman77

  • Active Users
  • **
  • Posts: 507
    • View Profile
Hi Tom, thanks a lot for your reply.

From photographing, I cannot remember to ever have seen a totally disappearing / blurred out background when using F-stop like 12.
such effect you have with small F-stops and focusing very close objects.


Attached you will see the same render, first one with DOF and F-stop 12. Second one without DOF active.
« Last Edit: 2020-02-14, 22:31:06 by Designerman77 »

2020-02-14, 22:32:04
Reply #3

TomG

  • Administrator
  • Active Users
  • *****
  • Posts: 5434
    • View Profile
Ah so it might be a question of the blur being too strong, rather than "should be no blur at all"?
Tom Grimes | chaos-corona.com
Product Manager | contact us

2020-02-14, 22:56:10
Reply #4

Designerman77

  • Active Users
  • **
  • Posts: 507
    • View Profile
Hey Tom, yes, exactly! :)

2020-02-14, 23:39:56
Reply #5

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
AFAIK background is always treated by Corona as being at infinity and is bluring accordingly (physically correct). If you didn't change film width, then the other factor that controls DOF besides apperture is focus distance. Set your focus distance farther from camera and background will come more into focus.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-02-15, 00:07:44
Reply #6

Designerman77

  • Active Users
  • **
  • Posts: 507
    • View Profile
AFAIK background is always treated by Corona as being at infinity and is bluring accordingly (physically correct). If you didn't change film width, then the other factor that controls DOF besides apperture is focus distance. Set your focus distance farther from camera and background will come more into focus.


If you want the background to be not totally blurry at - let´s say F-stop 4... your focus must be extremely far away... in Corona.
But what if I don't want a focus point that's far away?
Then the blur is so extreme that the background (override) is totally washed out...
In reality it would be blurry... but not that strong.


EDIT:
I percept the sense of Direct Visibility Override for placing a background pic like a garden, a landscape, etc... without using a plane or cylinder in the scene itself.
Gardens and landscapes are normally not "infinitely" far away... :)




As you said: the problem is that Corona treats the background override as "infinitely" far away.
In real world, the horizon is not infinitely far away. No photo camera will produce such an effect.
I was photographing a couple of years fully manually and understand the basics of this.

« Last Edit: 2020-02-15, 00:12:30 by Designerman77 »

2020-02-15, 11:15:36
Reply #7

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
If you want the background to be not totally blurry at - let´s say F-stop 4... your focus must be extremely far away... in Corona.
But what if I don't want a focus point that's far away?
Then the blur is so extreme that the background (override) is totally washed out...
In reality it would be blurry... but not that strong.

Focus doesn't needs to be extremely far away, it needs to be at the hyperfocal distance (the point in space at which your lense is providing maximum DOF at current configuration). You can find focal distance for each lens configuration at online DOF calculators, just make sure that you choose the camera with right size sensor (Canon 5D is the right choise for default 3ds Max and Corona cameras). https://www.dofmaster.com/dofjs.html

EDIT:
I percept the sense of Direct Visibility Override for placing a background pic like a garden, a landscape, etc... without using a plane or cylinder in the scene itself.
Gardens and landscapes are normally not "infinitely" far away... :)

As you said: the problem is that Corona treats the background override as "infinitely" far away.
In real world, the horizon is not infinitely far away. No photo camera will produce such an effect.
I was photographing a couple of years fully manually and understand the basics of this.

This is not a problem, but the only logical way to treat background. Corona can't guess whether your background represents nearby wall of the room, a garden at moderate distance, or a sky at "infinity". And to be honest, it's relatively rear that background image would represent objects all located at the same distance. If you want that your background wouldn't be at "infinity", then you need to place it on a actual geometry in the scene.

I recall that i was requesting few years ago to tie background distance to "enviro distance" setting in dev/debug rollout. My request was denied and now i see, that it was done with a good reason.

P.S. why this topic is in the bug reporting board?
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-02-15, 19:23:19
Reply #8

Designerman77

  • Active Users
  • **
  • Posts: 507
    • View Profile
Romulus, thanks for your reply.
I tested it before writing the bug report. The focus must be extremely far away to regain a bit of sharpness of the Corona overriden background. At least in C4D. Don't know how it is in Max.

In my opinion, the enviro override should not be affected by DOF that extremely... though I understand that it is "physically correct"... that's why I posted it as "bug".
because in my opinion it has an unexpected behavior that is not according to real world photographic effects.
A natural horizon is 10 km away (in flat land) and it will not appear as a smeared out surface on your photo. Even with F-stop 1.2 you would still see at least some blurred colors... not simply a white background.


2020-02-15, 23:58:18
Reply #9

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I did quick test to see if there's indeed a bug with DOF in Corona. Everything works as expected. All measurements was checked against DOF calculator and everything adds up. If there's a bug, then it must be with Corona for C4D, therefore i'm moving the topic to according board.

Test scene setup: camera focal length - 50mm, F-stop 2,8, film width - 36mm. Focus distance is written in file name. 29,5 meters is this setup's hyperfocal distance at which DOF extends to infinity - as you can see, the background is in focus.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-02-16, 00:16:34
Reply #10

Designerman77

  • Active Users
  • **
  • Posts: 507
    • View Profile
Thanks Romulus,

oh yeah, your test looks normal. That's what I would have expected.

As you see in my test, in C4D the background blurs away completely...


2020-02-16, 15:28:33
Reply #11

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8779
  • Let's move this topic, shall we?
    • View Profile
    • My Models
I forgot to mention that it's important to have the scene at correct scale. If your room has the size of shoebox, then you will get much stronger DOF, than expected.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2020-02-16, 15:35:40
Reply #12

Cinemike

  • Active Users
  • **
  • Posts: 1000
    • View Profile
Here, it depends on what mode I use.
Spherical and Cubic blur as expected, Frontal for Direct Visibility Override causes extreme DOF.

2020-02-16, 19:05:01
Reply #13

Designerman77

  • Active Users
  • **
  • Posts: 507
    • View Profile
I forgot to mention that it's important to have the scene at correct scale. If your room has the size of shoebox, then you will get much stronger DOF, than expected.


Thanks Romulus, of course I am aware of this. :)

2020-02-16, 19:16:10
Reply #14

Designerman77

  • Active Users
  • **
  • Posts: 507
    • View Profile
Here, it depends on what mode I use.
Spherical and Cubic blur as expected, Frontal for Direct Visibility Override causes extreme DOF.


Yep, you are right.

"Spheric" totally distorts the image since it projects it into a sphere. "Cubic" splits the image so you see seams which do not go away even if you play with the tiling settings.

I guess the only really controllable method is still the good old plane or cylinder around your scene. :)))))