Author Topic: Max ray depth more than 100  (Read 1043 times)

2023-09-11, 23:02:02

marchik

  • Active Users
  • **
  • Posts: 258
    • View Profile
Devs, please tell me if there is a way to increase the max ray depth above 100, to approximately ~300.
I currently have a project in which there are many mirrors located opposite each other and I need to accurately recreate this infinity mirror effect, even by slowing down the rendering.

Maybe I can add something to the string options?

2023-09-12, 07:00:28
Reply #1

Avi

  • Corona Team
  • Active Users
  • ****
  • Posts: 507
    • View Profile
Hi,

is it possible to share a screenshot of how it currently looks with value of 100? If you can't share here, maybe you can DM me.
Arpit Pandey | chaos-corona.com
3D Support Specialist - Corona | contact us

2023-09-12, 07:23:39
Reply #2

marchik

  • Active Users
  • **
  • Posts: 258
    • View Profile
Hi,

is it possible to share a screenshot of how it currently looks with value of 100? If you can't share here, maybe you can DM me.
no problem, before starting a project I usually do tests to assess the difficulties that I may encounter. My final configuration will be similar to this, with oppositely positioned brightened mirrors, with a small focal length for the lens and it’s unacceptable for me to leave these black rectangles, I could fix this in post-processing, but there are quite a lot of angles and this will increase the working time significantly

2023-09-12, 09:07:14
Reply #3

James Vella

  • Active Users
  • **
  • Posts: 540
    • View Profile
I havent got a test scene with this many mirrors but you can set the max depth in maxscript like this, so try it and see if it goes beyond 100. When I set it to 300 it says 100 in the render settings but maybe it can work?:

Code: [Select]
renderers.current.shading_maxRayDepth = 300

2023-09-12, 09:51:43
Reply #4

marchik

  • Active Users
  • **
  • Posts: 258
    • View Profile
I havent got a test scene with this many mirrors but you can set the max depth in maxscript like this, so try it and see if it goes beyond 100. When I set it to 300 it says 100 in the render settings but maybe it can work?:

Code: [Select]
renderers.current.shading_maxRayDepth = 300

I also thought about this at first, unfortunately it didn’t work, it seems to set the value up to 999, but the result is exactly the same as with 100, pixel to pixel

2023-09-12, 10:00:38
Reply #5

James Vella

  • Active Users
  • **
  • Posts: 540
    • View Profile
Ah k, must be capped at 100 then.

I did do a quick test, I put a spiral of 2,000 mirrors, sides/roof/etc. Not one of them turned black. Are you sure you dont have something black in the scene where its leaking through such as a black background? Can you try set your environment to 100% white and see if its the same? Just a thought, you could be entirely right since I dont have same angles you do.

2023-09-12, 10:27:50
Reply #6

marchik

  • Active Users
  • **
  • Posts: 258
    • View Profile
Ah k, must be capped at 100 then.

I did do a quick test, I put a spiral of 2,000 mirrors, sides/roof/etc. Not one of them turned black. Are you sure you dont have something black in the scene where its leaking through such as a black background? Can you try set your environment to 100% white and see if its the same? Just a thought, you could be entirely right since I dont have same angles you do.
Oh, in my setup you just need to put 2 big mirrors in front of each other and place the camera between them, that's it :D
With a direct angle of view at the mirror, this will create the illusion of an endless corridor of mirrors, the nuance is that in life mirrors are not ideal and "become darker" with each re-reflection + the vanishing point is closed by the observer himself (a person or a camera). But in my case, I would like to recreate a corridor converging at one point.
« Last Edit: 2023-09-12, 10:33:23 by marchik »

2023-09-12, 10:36:50
Reply #7

James Vella

  • Active Users
  • **
  • Posts: 540
    • View Profile
Yeah I know what you mean, I remember this when doing elevators and such. This is what I get doing your suggested setup.

scene:
1" border="0

max depth 5:
max5" border="0

max depth 10:
max10" border="0

max depth 20:
max20" border="0

max depth 20 with teapot:
max20teapot" border="0

2023-09-12, 10:47:10
Reply #8

romullus

  • Global Moderator
  • Active Users
  • ****
  • Posts: 8854
  • Let's move this topic, shall we?
    • View Profile
    • My Models
Ah k, must be capped at 100 then.

I did do a quick test, I put a spiral of 2,000 mirrors, sides/roof/etc. Not one of them turned black. Are you sure you dont have something black in the scene where its leaking through such as a black background? Can you try set your environment to 100% white and see if its the same? Just a thought, you could be entirely right since I dont have same angles you do.

It's not environment, it's exit color. You can find it in dev/experimental rollout. You can change it from black to any colour you like, but it's solid colour and might not help much in scenarios like described in this topic. I had submitted request to replace exit colour by environment many years ago, unfortunately it was rejected by the devs.
I'm not Corona Team member. Everything i say, is my personal opinion only.
My Models | My Videos | My Pictures

2023-09-13, 04:26:45
Reply #9

marchik

  • Active Users
  • **
  • Posts: 258
    • View Profile
Ah k, must be capped at 100 then.

I did do a quick test, I put a spiral of 2,000 mirrors, sides/roof/etc. Not one of them turned black. Are you sure you dont have something black in the scene where its leaking through such as a black background? Can you try set your environment to 100% white and see if its the same? Just a thought, you could be entirely right since I dont have same angles you do.

It's not environment, it's exit color. You can find it in dev/experimental rollout. You can change it from black to any colour you like, but it's solid colour and might not help much in scenarios like described in this topic. I had submitted request to replace exit colour by environment many years ago, unfortunately it was rejected by the devs.

yep, I knew about exit color, it would be great to get an alpha channel instead, I hope the developers will tell us something)

2023-09-13, 06:06:55
Reply #10

Avi

  • Corona Team
  • Active Users
  • ****
  • Posts: 507
    • View Profile
Can you try using V-Ray Mtl for your mirrors?
Arpit Pandey | chaos-corona.com
3D Support Specialist - Corona | contact us

2023-09-13, 07:05:08
Reply #11

aaouviz

  • Active Users
  • **
  • Posts: 886
    • View Profile
    • Another Angle 3D
But in my case, I would like to recreate a corridor converging at one point.

Could you just build it? So the 'effect' you're after is actually just geometry? I know thats not the point... but it might be an answer to the problem
Nicolas Pratt
Another Angle 3D
https://www.instagram.com/anotherangle3d/

2023-09-13, 12:13:42
Reply #12

burnin

  • Active Users
  • **
  • Posts: 1535
    • View Profile
If you can't use any other engine, best is to compose it (take center area and make it smaller; iterate).

Note, when rendering,
ray depth depends on the size of the image - the larger the image, more depth is needed (as goes for Texel density.See attached*) 

Finally, IMHO, it'd be of great use for advanced users, if such options as ray depths, volume priorities, photons (+domain), ... were simply exposed.

2023-09-13, 19:04:00
Reply #13

marchik

  • Active Users
  • **
  • Posts: 258
    • View Profile
Can you try using V-Ray Mtl for your mirrors?

great idea, but somehow it didn't work for me. I get identical results with both shaders, it all depends on the max ray depth setting in the performance tab, even if I use the V-ray shader. What in theory could I have done wrong?

If you can't use any other engine, best is to compose it (take center area and make it smaller; iterate).

Note, when rendering,
ray depth depends on the size of the image - the larger the image, more depth is needed (as goes for Texel density.See attached*) 

Finally, IMHO, it'd be of great use for advanced users, if such options as ray depths, volume priorities, photons (+domain), ... were simply exposed.

What engine are the screenshots you took from?

Yes, most likely I will have to use post-processing, as I expected, this is how I always solved this problem before

2023-09-14, 10:12:42
Reply #14

burnin

  • Active Users
  • **
  • Posts: 1535
    • View Profile
What engine are the screenshots you took from?
Renders were made using LuxCoreRender (homebuild version)