re raytracing colours asecchia cs uct ac za adrian secchia writes when an incident ray i strikes an object at point p the reflected ray r and the transmitted ray t is calculated from the formulae calling the routine recursively on r and t will return the colours along the rays r and t as rcol and tcol each object has its own colour ocol and each light source has licol i n the question is how do you combine rcol tcol ocol and all the licol s to get the correct resulting colour to return along the i ray first of all this is not a snide response if you re confused about this issue you will stumble over a lot of other things as well i suggest that the weakness is your reference material get an introduction to ray tracing by andrew glassner for very good coverage of the raytracing algorithm you could also refer to the nd edition of foley van dam on to the question the simple answer is that you just keep adding up all the contributions and then clamping at the maximum intensity for example if your intensity values range from to then keep adding up and clamp the resultant values to you might have to clamp the lower bound to if you have dark bulbs but that s another issue so you get some illumination equation like this i lambient ldiffuse light n lreflected ltransparent the contribution due to reflection is just summed with the light intensity as is the light due to transparency now a slightly less hand waving illumination equation is this i kala kdld light n krlr ktlt that is each component of the illumination equation is governed by the material constants ka kd kr and kt so the maximum you can get from transparency for a given object for example might be for a purple colored glass object hopefully this answers your question i ll forward my illumination equation sermon to you also steve hollasch kubota pacific computer inc hollasch kpc com santa clara california
