Web3DConsortium / BlenderX3DSupport

5 stars 3 forks source link

Chromatic Dispersion support in glTF and X3D #1

Open coderextreme opened 3 years ago

coderextreme commented 3 years ago

Different materials transmission found here for glTF:

https://github.com/KhronosGroup/glTF/tree/master/extensions/2.0/Vendor/ADOBE_materials_thin_transparency

https://github.com/KhronosGroup/glTF/blob/master/extensions/2.0/Khronos/KHR_materials_transmission/README.md

But neither support 3 or more channel chromatic dispersion. One wavelength of IoR, yes, so in principle, one could create 3 or more wavelengths.

We should check out how fresnel lenses work.

Blender Continuous Chromatic Dispersion found here: https://www.youtube.com/watch?v=lEPZ1IUkoB4

My project with 3 wavelengths of chromatic dispersion: https://playcanvas.com/project/370389/overview/the-blob-in-st-peters

So the goal would be either 1) use the Blender API to export glTF and X3D and add extensions to those standards, if current standards are not sufficient, and update all downstream code.

Or:

Convert the shaders in my project to X3D or glTF standards, even though they are very specific, and add imports to Blender.

Or:

Both

coderextreme commented 3 years ago

Important OpenGL optical dispersion article: https://taylorpetrick.com/blog/post/dispersion-opengl?hidden=true

coderextreme commented 3 years ago

If someone knows how to achieve the effect with PBR, let us know!

coderextreme commented 3 years ago

Physically Plausible:

https://www.youtube.com/watch?v=1p7l9MNpLdo&t=498s

coderextreme commented 3 years ago

Physicist constructed shader ($35):

https://blendermarket.com/products/universal-pbr-uber-shader

coderextreme commented 3 years ago

Potentially unrelated sound dispersion: http://web3d.org/pipermail/x3d-public_web3d.org/2017-July/007258.html

coderextreme commented 3 years ago

I think some tools use two values for a continuous range of IoR or dispersion. Discuss