Strange behavior of lamps and glass

Use this forum for general user support and related questions.
S0rda
Posts: 69
Joined: Sun May 27, 2018 8:34 am

Strange behavior of lamps and glass

Post by S0rda » Sun Mar 17, 2019 8:35 am

Lamps spot, point, san, do not want to illuminate the glass when turned off any other light sources. It's strange, you see, if you shine a flashlight on a glass ball, everything will be perfectly illuminated. However, this is not happening at the moment.

S0rda
Posts: 69
Joined: Sun May 27, 2018 8:34 am

Re: Strange behavior of lamps and glass

Post by S0rda » Sun Mar 17, 2019 8:40 am

It seems, at the same time, secondary rays (reflections of light from an object nearby, when this object is illuminated by one of the listed lamps) are at least reflected from glass.

User avatar
B.Y.O.B.
Developer
Developer
Posts: 2504
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Strange behavior of lamps and glass

Post by B.Y.O.B. » Sun Mar 17, 2019 9:33 am

Spot and point are non-intersectible light sources. Their caustics cannot be rendered with a unidirectional pathtracer, you need Bidir for this.
Or do you mean something else? Please provide a scene showing the problem in that case.
Attachments
path.jpg
path
bidir.jpg
bidir
spot_through_glass.blend
(798.95 KiB) Downloaded 5 times
Support LuxCoreRender project with salts and bounties

S0rda
Posts: 69
Joined: Sun May 27, 2018 8:34 am

Re: Strange behavior of lamps and glass

Post by S0rda » Sun Mar 17, 2019 9:36 am

If you are in space between the stars, light a glass ball with a light guide or a candle, shouldn't the ball be lit from one side or the other? Otherwise, as a bug, I can not call it. In any case, it does not work like that in a luxrender.

User avatar
B.Y.O.B.
Developer
Developer
Posts: 2504
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Strange behavior of lamps and glass

Post by B.Y.O.B. » Sun Mar 17, 2019 9:40 am

To be honest I don't really understand what you mean.
Can you show two images: what is happening and what you would expect to happen? Can be a crude paint drawing :)
Support LuxCoreRender project with salts and bounties

S0rda
Posts: 69
Joined: Sun May 27, 2018 8:34 am

Re: Strange behavior of lamps and glass

Post by S0rda » Sun Mar 17, 2019 9:46 am

1. You take the stage
2. Remove all light sources.
3. Add a sphere
4. Add a sphere from point 3 to the glass material.
5. The sphere remains the only mesh in the scene.
6. You take and add any of the listed light sources and try to illuminate the sphere with them.
7. You get a black screen, because the light does not affect the glass material
8. Fix as a bug and fix it.

I thought this was the glitch of my current scene, but the new one is exactly the same.

User avatar
B.Y.O.B.
Developer
Developer
Posts: 2504
Joined: Mon Dec 04, 2017 10:08 pm
Location: Germany
Contact:

Re: Strange behavior of lamps and glass

Post by B.Y.O.B. » Sun Mar 17, 2019 10:11 am

This is physically correct behaviour.
Perfectly clean glass only reflects and transmits light in non-random directions (ingoing angle = outgoing angle). Since there is no randomness, the image will appear black unless you move the camera into the way of the reflected or transmitted rays.

In reality, glass is almost always slightly dirty, covered with grease and dust, and these materials scatter light randomly around which can then be seen in a scenario like you describe. So, in LuxCore, you could try to mix your glass material with a mattetranslucent material, maybe according to some fingerprint mask image. Dust can be simulated the same way, or you can model tiny dust particles and distribute them via a particle system on the sphere.
Support LuxCoreRender project with salts and bounties

S0rda
Posts: 69
Joined: Sun May 27, 2018 8:34 am

Re: Strange behavior of lamps and glass

Post by S0rda » Sun Mar 17, 2019 10:51 am

Thanks for clarifying.

wasd
Posts: 168
Joined: Tue Apr 24, 2018 7:20 pm

Re: Strange behavior of lamps and glass

Post by wasd » Sun Mar 17, 2019 5:43 pm

B.Y.O.B. wrote:
Sun Mar 17, 2019 10:11 am
In reality, glass is almost always slightly dirty, covered with grease and dust, and these materials scatter light randomly around which can then be seen in a scenario like you describe.
I (partly) disagree. Though dust and grease can and often do cover glass surface, it is easy to get rid of them using surfactant and water. The thing that most affect light scattering on glass (from my observations) is surface roughness. Rough glass gives pretty realistic images.
Also, we (I and me) need thin film interference.
CPU Bidir + Metropolis | Log Power | Core i5-4570

CodeHD
Posts: 126
Joined: Tue Dec 11, 2018 12:38 pm

Re: Strange behavior of lamps and glass

Post by CodeHD » Sun Mar 17, 2019 6:18 pm

wasd wrote:
Sun Mar 17, 2019 5:43 pm
I (partly) disagree. Though dust and grease can and often do cover glass surface, it is easy to get rid of them using surfactant and water. The thing that most affect light scattering on glass (from my observations) is surface roughness. Rough glass gives pretty realistic images.
Also, we (I and me) need thin film interference.
I (partly) disagree :P
No seriously, it isn't actually quite so wrong, but often not so much visible.
The "roughness" of glass (or generally optical surfaces like mirrors as well) should be separated into "micro-roughness" and surface defects (sometimes labeled "scratch-dig").
Micro-roughness has a forward-scattering effect, while scratches and digs, together with dust, create a more diffuse scatter.
I was working in a project where we did extremely low stray light measurements, and there was an illuminated mirror in the FOV. The scatter was modelled, and the scattering cone of the mirror at 1 nm RMS micro-roughness (a good, custom laboratory mirror) was something like 1 degree or less. "Household" glass will usually not be polished to this degree though ;)
Even if you wash dust off glass, you are usually not wirking in a clean room, so you will very quickly accumulate small dust-particles again that are not easily seen. In our case, we had significant amounts of dust even in an ISO5 clean room.
In addition, normal houshold glass will have volumetric defects like "bubbles" and "striae". The best technical quality-grades of glasses are cooled for over a month after melting to assure extremely homogeneous properties.
Now add to that list fluorescence in some glass types and we are about there^^

But anyways, what I say is quite theroetical, and not what most of you try to model ;)

In practice, it is not always obvious which component dominates.
From what I have seen, I would say every-day glassware and windows are fairly free of striae and large bubbles (they would really ugly, if have seen some lenses in old theatre fixtures with extreme forms), but it will accumulate some small scratches over time due to frequent cleaning, together with dust accumulation.

Post Reply