Page 1 of 2

Strange behavior of lamps and glass

Posted: Sun Mar 17, 2019 8:35 am
by S0rda
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.

Re: Strange behavior of lamps and glass

Posted: Sun Mar 17, 2019 8:40 am
by S0rda
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.

Re: Strange behavior of lamps and glass

Posted: Sun Mar 17, 2019 9:33 am
by B.Y.O.B.
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.

Re: Strange behavior of lamps and glass

Posted: Sun Mar 17, 2019 9:36 am
by S0rda
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.

Re: Strange behavior of lamps and glass

Posted: Sun Mar 17, 2019 9:40 am
by B.Y.O.B.
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 :)

Re: Strange behavior of lamps and glass

Posted: Sun Mar 17, 2019 9:46 am
by S0rda
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.

Re: Strange behavior of lamps and glass

Posted: Sun Mar 17, 2019 10:11 am
by B.Y.O.B.
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.

Re: Strange behavior of lamps and glass

Posted: Sun Mar 17, 2019 10:51 am
by S0rda
Thanks for clarifying.

Re: Strange behavior of lamps and glass

Posted: Sun Mar 17, 2019 5:43 pm
by wasd
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.

Re: Strange behavior of lamps and glass

Posted: Sun Mar 17, 2019 6:18 pm
by CodeHD
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.