Jump to content
  • Advertisement
Sign in to follow this  
cignox1

shooting ray in a cone shape

This topic is 4829 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, I'm implementing blurred reflection in my ray tracer, but I'm not sure how to generate the rays. What I think is the following: Suppose that R is the reflected ray. X = A*(0,1,0); y = A*X; Now X and Y describe a plane perpendicular to R. What I can do now is finding PP = P+R.dir; Now I can generate n random points near PP (i.e. PP+X*Random()+Y*Random()). The rays can then be created by doing RAY = (P, PPRandom - p); That is the way I do for primary rays generation, and I do the same thing for Anti-aliasing and area lights. My problem is that this seems a bit slow for reflections, because for primary rays and area lights I can calculate some values only once (X,Y,UP), here I should redo it every time. In addition, I have always to check if R == (0,1,0) and in this case switch to (0,0,1) (for example). How would you henerate rays for blurred reflections? Thank you

Share this post


Link to post
Share on other sites
Advertisement
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!