moo
New Member
Posts: 5
|
Post by moo on May 25, 2019 16:44:28 GMT
Hi At the end of chapter 11 (Reflection and Refractions) I've gone of piste a bit and tried to implement partial shadows. I've given objects a value between 1.0 (the object casts a full shadow) and 0.0 (the object casts no shadow). My thought is that, for example, a glass object should still cast a shadow but one that is lighter than a non-transparent object. I think this puts me in a good position to start on the bonus chapter on soft shadows as my lighting code already expects a float rather than a boolean for shadow. However... I've attached a version of the scene from the beginning of the chapter, but with the two glass balls set to 0.25 shadow. The glass balls are showing a reflection of the specular light. I understand why the code it putting this here, but my question is this - it is correct? Does it look right? I'm not sure it does. Michael Attachments:
|
|
|
Post by ascotti on May 25, 2019 23:10:42 GMT
Hello Michael, I think that is an interesting feature to have.
Is it correct? Probably not from a physics perspective, but does it matter? Many successful raytracers have included features designed to give artists more freedom to realize their ideas, even when these features had no ground in physically based rendering. Phong illumination is not correct for that matter, we still like it all the same :-)
|
|
|
Post by Jamis on May 26, 2019 14:21:15 GMT
When I find myself with a question like that, I usually turn to Google Images to see if I can find any photographs that exhibit a similar phenomenon. Looking just now, I found this one: www.cb2.com/bubble-sphere-clear-large/s351493Other images of solid glass spheres don't show the highlight on the inner surface, so I suspect it is something about how the ray tracer is treating a sphere as a shell, rather than a true solid (since it is concerned only with surfaces, and not volumes, maybe?). At any rate, I think it is safe to say that while the internal highlight may not be perfectly physically accurate, it's also not a total aberration. - Jamis
|
|
moo
New Member
Posts: 5
|
Post by moo on May 27, 2019 16:39:35 GMT
Thanks for your insight guys, it's appreciated. I guess it's easy to fall into the trap of thinking that a raytracer is modelling real world properties, when it's actually a tool that follows its own rules to create original works that look like they might be real.
|
|