Sign in to follow this  
cignox1

shooting ray in a cone shape

Recommended Posts

cignox1    735
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

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