Questions tagged [raytracing]

Ray tracing is a physics-based method for simulating photorealistic 3D scenes. Light rays are drawn from the eye through each pixel of the desired image, and the rays' interactions with the scene determine the displayed pixel color.

Ray tracing is a method (both physically-based and non-physically-based) for simulating photorealistic 3D scenes. Light rays are traced from the eye (or camera) through the geometry of the scene and the rays' interactions with the objects determine the final displayed pixel color.

It is capable, among other visual effects, to simulate light scattering, reflection, dispersion and refraction more realistically than other graphics rendering methods.

More information: http://en.wikipedia.org/wiki/Ray_tracing_%28graphics%29

1049 questions
17
votes
3 answers

Are there any rendering alternatives to rasterisation or ray tracing?

Rasterisation (triangles) and ray tracing are the only methods I've ever come across to render a 3D scene. Are there any others? Also, I'd love to know of any other really "out there" ways of doing 3D, such as not using polygons.
Jonathan Ford
  • 317
  • 2
  • 5
  • 12
16
votes
1 answer

What is the difference between ray tracing, ray casting, ray marching and path tracing?

As far as I know, all the techniques mentioned in the title are rendering algorithms that seem quite similar. All ray based techniques seem to revolve about casting rays through each pixel of an image which are supposed to represent rays of real…
janekb04
  • 4,304
  • 2
  • 20
  • 51
14
votes
3 answers

How to roll a fast BVH representation in Haskell

I'm playing with a Haskell Raytracer and currently use a BVH implementation which stresses a naive binary tree to store the hierarchy, data TreeBvh = Node Dimension TreeBvh TreeBvh AABB | Leaf AnyPrim AABB where Dimension is either X, Y or Z…
Waldheinz
  • 10,399
  • 3
  • 31
  • 61
13
votes
2 answers

glsl function pointer (or equivalent)

I am attempting to call one of many functions based on the value of a variable. The variable is set during runtime, so code on the CPU will not work. Using an if/switch statement will be slow due to the large number of possibilities.[probably…
18107
  • 714
  • 5
  • 11
13
votes
5 answers

Why are KD-trees so damn slow for nearest neighbor search in point sets?

I am using CGAL's (the latest) KD-tree implementation for searching nearest neighbors in point sets. And also Wikipedia and other resources seem to suggest that KD-trees are the way to go. But somehow they are too slow and Wiki also suggests their…
thesaint
  • 1,253
  • 1
  • 12
  • 22
13
votes
1 answer

Camera Pitch/Yaw to Direction Vector

What I'm trying to do is cast a ray from my camera. I know the camera's x, y and z coordinates, as well as its pitch and yaw. I need to calculate its direction vector so I can pass it to my raytracing algorithm. The camera's up vector is (0, 1, 0).…
RunasSudo
  • 483
  • 2
  • 4
  • 13
12
votes
2 answers

Java raytracing float vs double

Last semester we had to develop a raytracer for a course at school. School being done, I tried to fiddle a bit with it. I wanted to see what would change if I changed all floating point calculations from double to float (all calculations being done…
Koekje
  • 677
  • 1
  • 6
  • 17
12
votes
2 answers

Precise subpixel line drawing algorithm (rasterization algorithm)

I need an algorithm which can be (a bit) slower than the Bresenham line drawing algorithm but has to be a lot more exact. With 'exact' I mean: every touched pixel should be printed. No more, but also no less! Which means using a more thick line or…
Karussell
  • 17,085
  • 16
  • 97
  • 197
12
votes
1 answer

What are my options for simple video formats?

I'm playing around with a simple ray tracer and I would like to end up with a short animated clip. Right now I'm rendering the scene to a bitmap. I would like the simplest motion picture format possible since I'll probably have to implement it from…
EightyEight
  • 3,430
  • 4
  • 36
  • 67
11
votes
3 answers

Is Möller-Trumbore ray intersection the fastest?

For a ray tracer project, I've been researching algorithms dealing with finding the intersection between rays and triangles (defined by three vertices). What I've found so far is that the Möller-Trumbore (MT) algorithm is used universally. So my…
Björn Lindqvist
  • 19,221
  • 20
  • 87
  • 122
11
votes
2 answers

raytracing with CUDA

I'm currently implementing a raytracer. Since raytracing is extremely computation heavy and since I am going to be looking into CUDA programming anyway, I was wondering if anyone has any experience with combining the two. I can't really tell if the…
Morten Christiansen
  • 19,002
  • 22
  • 69
  • 94
11
votes
4 answers

How to quickly find if a point is obscured in a complex scene?

I have a complex 3D scene that I need to display HTML elements on top of, based on a 3D coordinate. (I'm simply overlaying a div tag on top and positioning it with CSS.) However, I also need to partially hide it (e.g., making it transparent) when…
Frxstrem
  • 38,761
  • 9
  • 79
  • 119
11
votes
3 answers

GLSL refract function explanation available?

Im trying to debug my simple raytracer that simulates rays from one spot crossing a lens. I just need the refraction effect for this. I tried to do it by hand but finally i found refract from GLSL, which is documented in GLSL 1.1 like this: //For a…
Darkgaze
  • 2,280
  • 6
  • 36
  • 59
11
votes
2 answers

KD-Tree traversal (raytracing) - am I missing a case?

I'm trying to traverse a 3D KD-Tree in my raytracer. The Tree is correct, but there seems to be something wrong with my traversal algorithm since I'm getting some errors compared to using a brute-force approach (some small surface areas seem to get…
Mat
  • 11,263
  • 10
  • 45
  • 48
11
votes
4 answers

Raytracing - how to combine diffuse and specular color?

I've been reading numerous articles about ray tracing and shading, but my ray traced image does not look too good. I'm talking about the very bright green area near the specular highlight. The result green color is maxed out here, it looks like. How…
OMH
  • 775
  • 1
  • 10
  • 23
1
2
3
69 70