Jump to content
  • Advertisement
Sign in to follow this  

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

This topic is 1214 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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
Advertisement

Well, it doesn't look unnatural to me; the "reflection" of the shadow seems to be in exactly the right spot. Maybe the fact that it's just solid black (no indirect or sky light) is what makes it seem weird to you?

Share this post


Link to post
Share on other sites

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

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

#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
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!