# Thread: Metal conducter shader

1. its funny,you got problems with Si over AL and my approximation looks ok,and now your Ge over Au approximation results looking close but my Ge over Au result is looking strange.

thanks for posting your results and links.

about your -2 in the equation.
i have looked in the Si over Al paper and found the reference paper, that is listed for the equation.

here it is
https://ir.nctu.edu.tw/bitstream/115...CK60100002.pdf

there is all about the k coeffiecent and how he used it .

since my "code" based on the dielectric fresnel equation from the developer Bacterius,i just added the k value,like in the formula i posted before.but i guess this isnt sufficent enough.maybe for some materials yes,but not for all.i have looked into the optics book from born and wolf,that is used as reference in many papers.and in this metal chapter are different scenarios explaned,ie thin metal over transparent substrate and a few more.and for every case it was needed to fitting the equation to it.

my error with the Ge over Au seems to be the energy conservation at the end ,where all the equations come together.with out the k value in the energy con, it is not possible to become the colorpattern result, like in the Si over Al paper/posting.but i get strange results(a blue color with narrow fresnel circles,like if it was used a fresnel smaller than 1) ,with the Ge/Au render with the k.if i take the k out,i see the gold color but no color patterns at the different thickness values.and i am in stuck at this point.because it works and works not,i dont no how to fix it.

here from a similar Ge over Au paper.from top to buttom no Ge,7,10,15,100nm over Au.

edit,in the paper that i have posted the link above,i think have found the answer for your -2.
look at the page 203 the equation A3 looks like yours.and at A4 the part of the phaseshift term is there.notice that the phase shift term uses only one way of the refraction in the layer.but for reflection you need it multiplyed by 2 ,because the refraced light into the film and back .i guess this is the reason for the -2.(the phase term for refraction and reflection(x-2)).the term shows only one thickness distance calculated.

the phase term calculate the phase from A to B .for reflection you simply multiply it by 2 to get the phase from B to C as well(the whole phase in the film from A to B to C).

edit,wait i have looked at your equation again,the exp looks a little bit different,so i am maybe wrong.i dont know your full code,so i guess the d in the exp is for distance,so it means twice the thickness too.

2. I was able to implement the phaseshift equation in the paper you gave me (thanks for that and the tips, by the way). Although, the -2 value still seems to produce incorrect results. Keeping the 2 positive, it seems to be computationally exactly the same as the phaseshift equation I previously used.

Yeah, I'm pretty much stuck, too, haha. I'd love to be able to simulate the Si on Al experiment (and by extension, everything else) closely at the very least, but since the equation must be adapted on a case by case basis, that'd be very difficult. Very interesting, though!

Well, one thing I did do with my thin film shader is calculate the transmitted light to be able to simulate metal films on glass and stuff of a similar vein (this was an idea I copied from Pruster!). You could try it, too. Or maybe you could try making something for multiple thin film layers. I'll be trying that next.

Here's an example of a gold thin film on glass used for space helmets to block some frequencies of light which could pose problems to the wearer:

3. your spacehelmet material looks very good.

whats your plan with your shader,do you want to make them for the community, as free download?
if you gets the math sooner right vs me with my code,i could work on a new shader idea.

as you maybe noticed,its very complicated,even for implement a new small equation, into a existing cycles noodle setup.only one mistake and you have to go trough all the noodle connections,and you basicly have to know what you do.

at this point i maybe give a new different equation a try.but i want to know before,whats your plans with your shader.

edit,btw on the search to learn about imaginary numbers,like the i in the complex index of refraction,i found this video playlist 1-13 videos.this is maybe the best explanation ever,and worth to watch all episodes.
https://www.youtube.com/watch?v=T647...03G3KJXapKkNaF

4. I actually just finished implementing the equation for two layers. This one wasn't as difficult to do because I had a better understanding of what I was doing, but before I finished solving my problem for even just a single layer, it took me more than a month to get that right. So yeah, trying to find mistakes can get really difficult!

My plan for this shader originally started out as finding a way to simulate dichroic filters/glass and the colorful effects of bismuth hopper crystals which brought me to the topic of thin films. After much research, I discovered Pruster's code for thin films (At first, though, I couldn't read code, so I had to look up the same literature Pruster used to create it) and decided I wanted to try to make it GPU compatible. Now that I think I'm done with it, I'll be posting it as a free download soon, because the shader it's based off of is free, too (I'll also be updating it alongside the code version).

It's really fun to create weird, exotic materials with it. Here's one of my favorites, it's Ge on Au on glass:

Also, I've gone through a few of the videos in the playlist so far. I thought it would touch on stuff I already knew about imaginary numbers, but it goes so much further! Pretty interesting stuff. Thanks for sharing them.

5. Looking great! Hope to test it soon and compare with my code

Page 4 of 4 First ... 234

#### Posting Permissions

• You may not post new threads
• You may not post replies
• You may not post attachments
• You may not edit your posts
•