• Advertisement
Sign in to follow this  

promblem in static raytracing

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

Hi,everyone got problem in my raytracing practice. If anyone has the same problem like me. I used a trianglized scene and Phone shading algorithm. part of the rendering is ok,but other part have granule effect. anyone who has experience in raytracing can give me some advice. thanks. by the way,how can i post a picture here

Share this post


Link to post
Share on other sites
Advertisement
Quote:
Original post by schopenkitto
Hi,everyone
got problem in my raytracing practice.
If anyone has the same problem like me.
I used a trianglized scene and Phone shading algorithm.
part of the rendering is ok,but other part have granule effect.
anyone who has experience in raytracing can give me some advice.
thanks.

by the way,how can i post a picture here


Hi, you will need to better describe your problem in order to get useful answers... use html tag <IMG> to include a picture stored somewhere on the net...

Anyway, if I have to guess I would say the source of the artifacts may be some precision error... Once you get the first intersection of the eye ray with the geometry you need to calculate the shadow/reflection/refraction rays. If you use the intersection point as the origin of these rays, chances are that the first intersection found will be the same polygon the ray was shot from. Be sure to add an offset in the direction of the normal of the surface:

R = intersection point of a ray with a surface.
S = shadow ray to be computed
N = normal at the intersection point

then S.origin = R + N * bias

Bias will be very small, try to find a good value (something like 0.001 should work, but I don't remember what I used).
Be sure to always take into account floating point precision errors, for example never compare to numbers directly, but compare a number to a small range instead.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement