| Project: | YafaRay |
| Version: | 0.1.x |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Dispersion of "true glass" (transmit filter 0) behaves weird to my perception.
a. the dispersion amount on low values (like Disp 0.001) is too strong and looks weird
b. Dispersion effects are split in several (too many) "Dispersion" isles - esspecially when using HDRI lightning (with 8 up to 64 samples even)
As a first example for a.:
In above image dispersion is spread all over the bottom of the glass - Dispersion value is 0.001 here. Basically the dispersion looks like a thin layer of glass cleaner instead of dispersion due to the glass. In fact what we see here is a "Newtonian interference" effect and NOT dispersion.
A more natural dispersion effect is shown in the following image (yes it is a prism but with indirect light - where "extreme" prism pictures only show a dark environment with one concentrated light source).
Note the almost white normal light inside the light cone leavign the prism and the dispersion effect on the borders of the light cone:

to b.: In several images I am currently working on I make extensive use of glass.
(If need be, I can post an image as soon as am on it to finish those images. Until a few minutes ago I was testing if its my mistake - now I know it isnt, still didnt save an image - yet.)
example 1: a huge glass building, where the complete front is made of glass, lightend by a HDRI. What happens is, that each glass window (Dispersion 0.001) offers at least one (due to bevel edges sometimes more) dispersion effects. All dispersion effects are ofc applied to the glass and the light shining inside the building. Result: almost rainbow colored parts of the building inside. All that with loads of "rainbow caustics" inside.
---
assumptions, conclusions and remarks:
1. Dispersion is set to x.xx upon changing the value it is shown as x.xxx actually imho a format of x.xxxx is needed (4 digits after the period instead of 2)
2. To me it appears that light wavelength is taken into account when calculating dispersion in yafaray - but in case of eg HDRI lightning the amount of light sources is still not infinite (appears as if but isnt).This leads to the "isles of dispersion effects".
In reality an (almost) infinite amount of light rays with dispersion effect equal each other out. Eg a dispersion of "one" light ray might offer a blue light, but is mixed with the dispersion of several other light rays, resulting in a "smooth white lightning". The dispersion effect as such is then only observed on edges (chromatic aberration). Edges can be bevel edges on glass (seeing a dispersion effect when lookign closely on glass), but also borders of a dropped shadow.
3. Still in reality I observe dispersion as very clear and - in most cases - limited in size (eg small but spread over the bevel edge of glass - or like a true rainbow). As a result: dispersion effects should only rarely be visible when looking at a glass front from far away and then only from specific angels (determined by IOR and the direction the light comes from).
4. am aware that this is a tricky topic - still as it stands now I consider dispersion in yafaray "wrong" - too extreme and mixed with "Newtonian interference" effects.
---
Suggestions:
1. four digit values after the period instead of 2-3
2. rename current dispersion to "Newtonian interference" (cool interference effects of eg Oil can already be made with current dispersion)
3. create a new dispersion, which takes the nature of dispersion in account and which - if possible - gets rid of the "not-infinite light ray" problem of IBL HDRIs