Macha Posted March 15, 2010 Share Posted March 15, 2010 (edited) I'm trying to make a iridescence shader. The basic color pattern works but there are still problems with it. For example, the shader behaves differently with different lights. Not sure yet if that is a bug or correct behavior. There are also antialias issues. Here is a viewport animation: and here a rendered one: The 2 pictures below show a dark line that appears when adding 2 lights. This line is also apparent in a standard shader, but much weaker. A bug or not, I don't know yet, but it would be nice to be able to control it. The third image shows the behavior with an environment light (and slightly different settings). I suppose the shader requires a light with strong directionality, otherwise the light samples average the effect. The forth image shows how I went about to design the shader. Green are camera direction vectors, yellow for light, and red represents the final effect. Fifth is a render. Edited March 15, 2010 by Macha Quote Link to comment Share on other sites More sharing options...
Macha Posted March 15, 2010 Author Share Posted March 15, 2010 (edited) and a screenshot Edited March 15, 2010 by Macha Quote Link to comment Share on other sites More sharing options...
symek Posted March 15, 2010 Share Posted March 15, 2010 (edited) Just for a record, if you by chance haven't seen this: http://forums.odforc...l__Iridescence. I use that code a lot in deadly need of rainbow... Edited March 15, 2010 by SYmek Quote Link to comment Share on other sites More sharing options...
mightcouldb1 Posted March 15, 2010 Share Posted March 15, 2010 I like it! Quote Link to comment Share on other sites More sharing options...
Macha Posted March 16, 2010 Author Share Posted March 16, 2010 Just for a record, if you by chance haven't seen this: http://forums.odforc...l__Iridescence. I use that code a lot in deadly need of rainbow... Thanks, aah, but this is more of a learning-project, to see what's under the hood. What I am looking for though is iridescent refraction. That's what I am ultimately hoping to achieve. I know I can fake it by combining a few refractions with differing refractive index for different colors. But such a discrete approach doesn't give a very good result and involves adding expensive nodes. Instead, a continuous approach would be needed but I haven't found any good references for such things yet. Quote Link to comment Share on other sites More sharing options...
eetu Posted March 16, 2010 Share Posted March 16, 2010 What I am looking for though is iridescent refraction. That's what I am ultimately hoping to achieve. I know I can fake it by combining a few refractions with differing refractive index for different colors. But such a discrete approach doesn't give a very good result and involves adding expensive nodes. Instead, a continuous approach would be needed but I haven't found any good references for such things yet. Enter Mario and his glass shader odyssey. Also his Implementing Spectral Colors in Mantra masterclass should be relevant. eetu. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.