Page 1 of 1

question about glass

Posted: Tue Oct 26, 2021 2:06 pm
by daros
Hi, have two verys simple scenes, just a few polygons and a glass of whisky.
One scene is 3km big and the glass is rendered well, the other is 800m big and the glass renders dark.
If this is still a precision problem why the bigger scene renders well?

3km scene
glass transparent_1.jpg
800m scene
glass dark_1.jpg
Thanks for any help.

Re: question about glass

Posted: Wed Oct 27, 2021 10:42 am
by Dade
The glass is at origin in the "transparent" scene:

scene.objects.903860_1_0_0_0.transformation = 1 0 0 0 0 5.960464e-08 0.9999999 0 0 -0.9999999 5.960464e-08 0 -0.0654683 0.0806955 0.04439508 1

while is more than 155m away in the "dark" scene:

scene.objects.903860_68_0_0_0.transformation = 1 0 0 0 0 5.960464e-08 0.9999999 0 0 -0.9999999 5.960464e-08 0 155.682 53.4093 0.0443833 1

As explained in the past (the message quoted here => viewtopic.php?f=4&t=3829&p=31635#p31627), floating point resolution is lower and lower more distant you are from the origin: the intersection of the exist surface of the glass starts to be missed so the ray travel for an infinite amount of times inside the absorbing volume.

Re: question about glass

Posted: Wed Oct 27, 2021 5:17 pm
by Sharlybg
Maybe a solution could be to internally have an option to downscale the entire scene by a Factor of 10X
After a certain point. Shouldn't be Min/Max epsilon value because that will trigger a new compilation at
Each value change.

Re: question about glass

Posted: Thu Oct 28, 2021 12:42 pm
by daros
Thanks... big problem. How other rendering engines are resolving this problem?
In the meanwhile would we resolve the problem if we identify the "center" of the view and use it to translate the entire scene to a more reliable 0,0,0?


P.S.
Do Luxcore uses 32bit or 64bit precision?

Re: question about glass

Posted: Thu Oct 28, 2021 3:21 pm
by Sharlybg
P.S.
Do Luxcore uses 32bit or 64bit precision?
It is FP32 bits precision. And I don't think there is an engine rendering a FP64.

Re: question about glass

Posted: Fri Oct 29, 2021 1:51 am
by daros
I see, thanks sharlybg. The origin translation option seems the solution adopted by game engines. If there is no smarter solution around we go for this one.