Sign in to follow this  
coltdaniel

Possible shadow artifact on the caster in a ray-tracer.

Recommended Posts

coltdaniel    130

Hello, I am doing a Ray-tracer and I may be getting an visual artifact in a scene with a sphere projecting shadow on a plane. Here is:

 

example_zps65abc018.jpeg

As can be seen in the above screenshot, it is like the shadow is also projected in the bottom of the sphere in a reduced form. I checked all the calculations in a point located in this shadowed region to see if I could locate the source and my conclusions are this: The problem ain't during the first, direct bounce because the dot product between the light vector and normal is negative. This makes sense, since the light source is exactly above the sphere, aligned with it's center, so if the plane below the sphere wasn't reflective, all the bottom part of the sphere would be in the dark. Ok, then in the first reflection, the ray intersects the plane as expected, but the ray-sphere intersection algorithm says that a intersection happens, I checked the values one by one and everything seems fine. So where can be the error? After some thought I am starting to think that may not be one, that what this intersection means is that the ray hits the plane in a point where it is in the shadow due to the sphere, so none of it's red color hits the bottom of the sphere. But the image seems so unnatural that I am in doubt. What you guys think? Thanks for any suggestions.

Share this post


Link to post
Share on other sites
Ryan_001    3476

Your description isn't very clear.  Are you referring to the faint circle within the shadow spot on the reflection?  That's the only thing I can see that's perhaps out of place.

Share this post


Link to post
Share on other sites
coltdaniel    130

cowsarenotevil, yes that what I mean. Until a few moments before starting to write this thread, the "blackness" was giving me an impression of an artifact.

 

Ryan I can't see any faint circle on this image. My monitor doesn't have much brightness though. Any ideas of what I could do to see it?

Share this post


Link to post
Share on other sites
L. Spiro    25638

#1: “Ain’t” isn’t a word.

#2: Your reflections are correct.  Why would the bottom of the sphere be reflecting straight down into the shadow?  The bottom of the sphere from any perspective bounces light from that perspective almost entirely straight (almost the same direction as the incoming ray).  This is true all around the entire edge of the sphere as viewed from any direction.

 

Unless you position your view such that the shadow is directly behind the bottom of the sphere (from your view’s perspective), you won’t have the bottom of the sphere reflecting the shadow.

 

 

L. Spiro

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this