Sign in to follow this  

shooting ray in a cone shape

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

This topic is 4587 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.

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