Post Ax4T3FBSCXPiWJDC2C by rjmoerland@mastodon.art
(DIR) More posts by rjmoerland@mastodon.art
(DIR) Post #Ax4QHe9pqVbyAPdAwq by rjmoerland@mastodon.art
0 likes, 0 repeats
Quite pleased: I added native #ThinFilmInterference in an absorbing layer on top of a conductor to #blender3d. I went through the math of https://hal.science/hal-01518344/document, and added terms dealing with absorption in the film. Slightly trickier than I thought, but it works. The 5.0 alpha branch dealing with dielectrics was great as a starting point!The render shows the result with nodes on the left and the native implementation on the right. If you look carefully there's a slight color shift.1/3#b3d
(DIR) Post #Ax4RXqfLCzPTY1en7w by rjmoerland@mastodon.art
0 likes, 0 repeats
The method in the paper yields #iridescence that resolves to a plain reflection for thicker films, like in daily life. My nodes suffer from spectral aliasing, which means the colors keep cycling no matter the film thickness. Now, we can have absorbing films while keeping the look and behavior of thick films. The render shows the nodes on the left and the native behavior on the right. The native behavior more accurately reflects the real-world experience.2/3#blender3d #ThinFilmInterference
(DIR) Post #Ax4T3FBSCXPiWJDC2C by rjmoerland@mastodon.art
0 likes, 0 repeats
A fair question is, does it matter? It depends. For some looks you're better off with a dielectric film (it renders faster). But when it does matter, there's no denying the absorption is required for the right look. Example: copper with a layer of CuO, where the layer doesn't have absorption. Compare with the image in the first post of this thread (repeated here), where realistic absorption is added.Now I need a real Dev to fix my baby C++ code😅 3/3#blender3d #b3d #ThinFilmInterference
(DIR) Post #AxEOQRNwRiv6pftTw8 by rjmoerland@mastodon.art
0 likes, 0 repeats
Well the code is up: https://projects.blender.org/RobertMoerland/blender. By no means ready for production, but should serve as a proof of concept. I mentioned it on the current #blender3d 5.0 alpha #ThinFilmInterference pull request (see https://projects.blender.org/blender/blender/pulls/141131) for awareness and now am hoping for a positive response from the devs 🤞
(DIR) Post #AxETeSTXgkvs2U17Dc by Ronflaix@mastodon.gamedev.place
0 likes, 0 repeats
@rjmoerland looks frigging great! That paper is my bane and periodically I'm reminded of it's existence and my failure at implementing it in my engine. Glad to see I'll see soon a reference implementation in Blender to compare renders if I give it another shot later! Thank you for doing that work
(DIR) Post #AxEc8FBcSdLp91Lbeq by rjmoerland@mastodon.art
0 likes, 0 repeats
@Ronflaix thank you! But, to give credit where it's due: the code I uploaded builds on the Pull Request that I linked to, and that was a great starting point. That PR itself builds on the dielectric-on-dielectric implementation by the Blender devs themselves (IIRC Lukas Stockner) :)