Jump to content
  • Advertisement
Sign in to follow this  
luca-deltodesco

normal map, reflective/refractive artifacts

This topic is 3846 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

im messing around with ray tracing, and have normal mapping and reflection/refraction modelled, the problem is that artifacts are arising in the reflections and refractions due to the normal mapping at certain angles. heres an image explaining what the problem is: http://img225.imageshack.us/my.php?image=fucksakecs1.jpg black is the current ray. green is the surface normal, and the dark blue is the surface normal after the normal mapping is applied. Now as you can see, the ray is being reflected off the surface, but because of the directions of the ray and normal, its being reflected into the surface which makes no sense as far as the ray tracer is concerned. what is the best approach to deal with this? what is currently happening, is this happens as it does then engine then assumes that all has gone as planned, and will therefore start reflecting the ray inside of the object, and if it exceeds the number of allowed rays it will colour the pixel black, otherwise this might happen again inside of the object allowing it to leave the object, and the pixel will be coloured falsely.

Share this post


Link to post
Share on other sites
Advertisement
I'm not 100% sure, but that normal haven't to be visible, because dot product between current ray and normal (after normal mapping) is less than zero. Anyway, if it's still visible (but it hasn't to be!), when you're tracing, try to use parllax mapping (solution isn't so hard, even for raytracing - it'll "clear" these kind of effect). You could try even something harder method, how to achieve parallax effect (like Interval Mapping, Parallax Occlusion Mapping, Steep Parallax Mapping or Relief Mapping).

Anyway reflecting rays inside objects would probably result just in something-like sub surface scattering, not reflecting.

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!