question about glass

Use this forum for general user support and related questions.
Forum rules
Please upload a testscene that allows developers to reproduce the problem, and attach some images.
Post Reply
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

question about glass

Post 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.
Attachments
transparent.zip
(338.11 KiB) Downloaded 112 times
dark.zip
(768.93 KiB) Downloaded 108 times
User avatar
Dade
Developer
Developer
Posts: 5672
Joined: Mon Dec 04, 2017 8:36 pm
Location: Italy

Re: question about glass

Post 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.
Support LuxCoreRender project with salts and bounties
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: question about glass

Post 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.
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: question about glass

Post 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?
User avatar
Sharlybg
Donor
Donor
Posts: 3101
Joined: Mon Dec 04, 2017 10:11 pm
Location: Ivory Coast

Re: question about glass

Post 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.
Support LuxCoreRender project with salts and bounties

Portfolio : https://www.behance.net/DRAVIA
daros
Posts: 280
Joined: Thu Dec 12, 2019 3:25 pm
Location: inside human language
Contact:

Re: question about glass

Post 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.
Post Reply