Questions tagged [raytracing]

a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters with virtual objects

Filter by
Sorted by
Tagged with
4
votes
2answers
4k views

How do I test for intersection between a ray and a cone?

I decided that writing a ray-tracer in my game was a brilliant idea, and so now I am looking for code to use for ray to primitive intersection tests. I have based my effort on this very nimble yet ...
5
votes
1answer
4k views

Fast pixelshader 2D raytracing

I'd like to do a simple 2D shadow calculation algorithm by rendering my environment into a texture, and then use raytracing to determine what pixels of the texture are not visible to the point light (...
1
vote
1answer
1k views

Ray tracing - glossy reflection

Here I am again with my ray tracer for ipad. Now I'm trying to add glossy reflection to an object. How do i implement it? I read some documentation online like these: http://www.cs.cmu.edu/afs/cs/...
1
vote
2answers
358 views

Cursor position to a 3D ray using angles

I've been stuck for a month trying to get gluUnProject working. After my attempts to use gluUnProject failed (as well as attempts to implement gluUnProject functionality manually) I implemented method ...
2
votes
1answer
207 views

How can I calculate the U,V texture coordinates on a disk at infinity given only a view vector and a vector pointing to the disk's center?

I'm using an approach similar to Bruneton's paper on atmospheric scattering for rendering my sky and am trying to extend it to add a textured moon. Long story short, the paper works by essentially ...
2
votes
1answer
1k views

Ray tracing - draw polygon (square/bounded plane)

I'm going on with my own ray tracer as an iPad app for a school project. This is the result with soft shadow, antialiasing, pure reflective and pure transparent object: Now i want to change the ...
0
votes
0answers
764 views

Ray-Triangle Intersection Detection using Barycentric Coordinates

I am attempting to convert the algorithm from http://www.cbloom.com/3d/techdocs/fast_ray_tri.txt to java code, but my solution does not function correctly. The only intentional change I made was for ...
0
votes
1answer
949 views

Getting ray using gluUnProject or inverted MVP matrix

I've read a lot of topics here, on SO, opengl.org etc. Example how gluUnProject should work (from NeHe tutorial): ...