Author Topic: Problem displacement in the mirror  (Read 1835 times)

2018-03-18, 16:32:46

bango74

  • Active Users
  • **
  • Posts: 57
    • View Profile

369/5000
Hello, today while I was rendering a scene I finally realized this problem on the displacement map that was reflected in the mirror.
I tried with the search button but I did not find anything about it, it would seem that the part of texture that is not part of the PV has problems of display map displacement.
Someone knows how to solve, thank you.

2018-03-18, 19:29:55
Reply #1

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 6270
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Try to turn to world space displacement, it should fix the problem with offscreen areas not being displaced, at the expence of heavier RAM consumption.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2018-03-19, 10:04:15
Reply #2

bango74

  • Active Users
  • **
  • Posts: 57
    • View Profile
Good morning, thanks romullus of the suggestion, I tried to tack on world size but I have not solved anything, indeed, notable consumption of memory and moreover the displacement was not present on the whole shader.
I hope I misunderstood, and that the parameter to be changed is not this:


2018-03-19, 10:26:50
Reply #3

Gruender

  • Active Users
  • **
  • Posts: 109
    • View Profile
This isn't a bug, it is a wanted feature to speed up performance. Corona calculates displacement only where the camera can see it. As the displacement is calculated before the reflection, the camera doesn't know that it sees it (in that case in the mirror). This feature to speed up the performance has it's limitations as we see in your example.
Hopefully we have the option to calculate only seen displacement and all displacement in the future.

Cheers...

2018-03-19, 10:37:30
Reply #4

bango74

  • Active Users
  • **
  • Posts: 57
    • View Profile
This isn't a bug, it is a wanted feature to speed up performance. Corona calculates displacement only where the camera can see it. As the displacement is calculated before the reflection, the camera doesn't know that it sees it (in that case in the mirror). This feature to speed up the performance has it's limitations as we see in your example.
Hopefully we have the option to calculate only seen displacement and all displacement in the future.

Cheers...

Yes, thank you, I had guessed it, but I'm trying to figure out if this problem can be remedied.
For the moment I followed the suggestion of romullus but without result, I hope there is a solution to this problem.

2018-03-19, 10:49:59
Reply #5

beanzvision

  • Corona Team
  • Active Users
  • ****
  • Posts: 1475
  • Bengamin
    • View Profile
    • Cormats
I also have tried this and it worked for me. Instead I lowered the screen size to 1cm. Yet, it also worked when lowering the world size.

2018-03-19, 10:56:57
Reply #6

Gruender

  • Active Users
  • **
  • Posts: 109
    • View Profile
I also have tried this and it worked for me. Instead I lowered the screen size to 1cm. Yet, it also worked when lowering the world size.

Please try with half of the carpet placed outside the camera view.

2018-03-19, 10:58:23
Reply #7

bango74

  • Active Users
  • **
  • Posts: 57
    • View Profile
Good morning beanzvision, I would not want to be wrong but I think it's not your right example.
I understand that in the example tuom the part to reflect is all within the screen .... or am I wrong?

2018-03-19, 11:09:44
Reply #8

beanzvision

  • Corona Team
  • Active Users
  • ****
  • Posts: 1475
  • Bengamin
    • View Profile
    • Cormats
I also have tried this and it worked for me. Instead I lowered the screen size to 1cm. Yet, it also worked when lowering the world size.

Please try with half of the carpet placed outside the camera view.
Here you go, the majority of the carpet is behind the camera.

2018-03-19, 11:15:16
Reply #9

Gruender

  • Active Users
  • **
  • Posts: 109
    • View Profile
I also have tried this and it worked for me. Instead I lowered the screen size to 1cm. Yet, it also worked when lowering the world size.

Please try with half of the carpet placed outside the camera view.
Here you go, the majority of the carpet is behind the camera.

In that case my theory is bullshit!

2018-03-19, 11:20:04
Reply #10

PROH

  • Active Users
  • **
  • Posts: 1053
    • View Profile
@bango74: The solution mentioned by romullus is correct, and the "world space" setting shown by you is the right one. However 1cm may be to large according to your carpet, so try lowering the value.

NB - I'm a max-user and not a C4D-user, but I think this is the same in both packages.

Hope it helps :)

2018-03-19, 11:30:22
Reply #11

houska

  • Corona Team
  • Active Users
  • ****
  • Posts: 1481
  • Cestmir Houska
    • View Profile
Hello guys! Just a few thoughts:

Could you try to simplify your scene to isolate the problem, bango? Then we could all see if it is really the out-of-screen issue.

Also, the algorithm that decides if something is out of the camera view is only a heuristic, so it might behave differently based on the scene, camera properties, etc...

2018-03-19, 11:39:44
Reply #12

maru

  • Corona Team
  • Active Users
  • ****
  • Posts: 9456
  • Marcin
    • View Profile
Try enabling the devel/debug mode (in Corona preferences) and then using this string option:
float geometry.displace.maxSizeScreenOutFrustumMultiplier = 1

2018-03-19, 11:49:52
Reply #13

bango74

  • Active Users
  • **
  • Posts: 57
    • View Profile
Try enabling the devel/debug mode (in Corona preferences) and then using this string option:
float geometry.displace.maxSizeScreenOutFrustumMultiplier = 1

After entering the string I have to launch rendering with world size selected?
I tried with screen size selected and I did not solve anything.
« Last Edit: 2018-03-19, 11:55:14 by bango74 »

2018-03-19, 12:13:14
Reply #14

bango74

  • Active Users
  • **
  • Posts: 57
    • View Profile
Ok, you have to lower a lot of world size, the problem is bypassed at the expense of a huge amount of memory to lend.
wolrd size from 0.05 down ...