Forum: Carrara


Subject: Iridescence Part 2

marcq opened this issue on May 23, 2003 ยท 18 posts


marcq posted Fri, 23 May 2003 at 1:49 AM

This picture uses a formula shader to select gradation of one of seven colors (the rainbow colors) based on the difference in the angle between the surface normal and a reference vector.

Since it is using the real normal and not slope, it avoids the banding effect of slope and produces (I think) more interesting highlights.

The shader in question could be greatly improved if the formula allowed you to enter the angles of your light source so that you could get the purple center to line up properly on the highlight. The render here has arbitrary alignment (I didn't tweak the reference vector much) which is why the highlights are more red than they should be. But it shows the basic principle.

With a mixer referencing more than one of these, each with a reference vector aligned to a light source, you might be able to get these right for multiple lights (not really sure about that ;-).

Anyway, this is just incremental from DotPainter's post (http://www.renderosity.com/messages.ez?Form.ShowMessage=720518) but seems to be an interesting effect so here it is.

Marc