Hey, so I would like to make specular in my material which is reminiscent of a CD. What I mean by that is Id like the specular to have a rainbow-like effect which splays out from the specular highlight. I don't want the specular highlights to be lines going toward the center like they do on a CD, I merely want the effect of different colored rings coming out from the circular specular highlight on an object.
My guess at how to do this is to use the light vector and apply a gradient texture sample to it but Ive messed around with this and am not sure how I would apply this correctly. Does anyone know how I might create this effect?
Replies
I guess I just want to know if there is any way to access a specular high light and associate different colors to different intensity points within the specular highlight using an "if" node perhaps.
http://udn.epicgames.com/Three/AnisotropicLighting.html
this is not exactly what you want, but you should depart with that...
http://udn.epicgames.com/Three/AnisotropicLighting.html
Edit: Just a minute too late!
For that, create a 1D texture with your choice of gradients and index it with NdotL. Use that as your specular color. Not very realistic if you intend for this to be some type of diffraction or interference effect.
yea i guess they are just rings of color coming out based on a direction, I just thought that the anistropic flow had to be based on a single direction on the mesh and wouldnt dynamically follow the specular as if it were a smooth surface.
I am trying to do a diffraction effect, just for a fantastical material which has an interference effect like that. I guess Ill check out your link and other sources more to see what that actually is. Is it not realistic because the order of the colors or because of the shape it's in?
http://www.polycount.com/forum/showthread.php?t=117309
Its not perfect, but i think you should start with something like this.
From what I can tell is that youre lerping fresnels with a normal map version of the anistropic map.
Seems like theyd be layerd on top of each other.
The lerp goes part goes into specular and the component mask goes into the anistropic direction.
edit: never mind, it is diffracting, I just need to mess around more with how visible it is. my anistropic is still not showing though.
The amount of blue comes from a node plugged into "CustomLightingDiffuse"
if you want to try it out... It's a MLM_Custom shader, lighting effects it.
the texture sample is this https://dl.dropbox.com/u/8510078/rainbowMap.png
edit: i thought i was having trouble getting the anisotropic to show in game but i just wasnt seeing it to its full effect because of the way i was uving objects.