# Tag Info

12

Raxvan is completely right that "traditional" anti aliasing techniques will work in raytracing, including those that use information such as depth to do antialiasing. You could even do temporal anti aliasing in ray tracing for instance. Julien expanded on Raxvan's 2nd item which was an explanation of super sampling, and showed how you'd actually do that, ...

10

I think it's safe to say that there are two different ways of doing AA in raytracing: 1: if you have the final image and the depth image it is possible to apply almost all existing techniques that are used in games (FXAA, etc) Those work directly on the final image and are not related to raytracing 2: the second method is to take into account multiple rays ...

7

Let's suppose a fairly typical raytracing main loop: struct Ray { vec3 origin; vec3 direction; }; RGBColor* image = CreateImageBuffer(width, height); for (int j=0; j < height; ++i) { for (int i=0; i < width; ++i) { float x = 2.0 * (float)i / (float)max(width, height) - 1.0; float y = 2.0 * (float)j / (float)max(width, ...

6

A ray is just a semi-infinite line, and casting the ray finds intersections between the ray and an object in the scene. It doesn't just tell you the position in space that the ray intersected the object: it also tells you the texture co-ordinates of that point on the object, the surface normal and tangent, and (depending on the algorithm you use) filter ...

4

Read up on the basics for ray-tracing here, Usually we don't mess up with viewports and stuff in raytracing, So I'm just telling you for the case where viewport equals the Image Width and Height. There are two cases when the field of view changes. Either you move the image plane back and forth or you increase the size. We choose to change $d$ ( former ...

4

You have several techniques. Use acceleration structures. The idea is that you store your geometry (triangles) into generally some kind of volumes. The general idea behind acceleration structure is to discard quickly large parts of the scene, which we know (using these structure) don't have any object that your ray will intersect. An introduction to the ...

4

Sun light can be represented as a distant light. Light sources are radial like a bulb, though in the case of the sun, it is so far away from the Earth, that a reasonable approximation is to consider that all rays coming out of the sun are parallel at the Earth's surface. Using a distant light is an approximation. Because it's far away it is also assumed that ...

3

Sunlight is typically modeled as a directional light. All rays point the same direction off into infinity.

2

In this code, the "screen resolution" means the number of pixels in the output image (which happens to be a window in the windowing system), while the "window dimension" means the corresponding size in the 3D scene. Computing s tells you the ratio between one unit of 3D space in your scene and one pixel of output image. You need to do this in order to know ...

2

First, the viewport size: $$h_x = 2*d*tan(\theta_x/2)$$ $$h_y = 2*d*tan(\theta_y/2)$$ Each pixel (from your diagram) has the following size in the eye coordinate system: $$W = h_x / (k-1)$$ $$H = h_y / (m-1)$$ Note that usually the field of view encompasses whole pixels and doesn't stop at the center of the edge pixels like your diagram shows. If $P_c$ is ...

2

I'd like to leave a longish comment with pictures on the drawing aspect. Raytracing is not limited to computer graphics you can and often do see see artists manually raytrace to figure out intersections of shapes on paper with a ruler or even freehand by elbow twisting*. It is also useful for many physical sciences like mechanical engineering and surveying. ...

1

Disclaimer: It's been a long time since I looked at this sort of thing but here goes... Disclaimer2: On re-reading your question(s) I realised I might have misunderstood what you were asking. I'll leave this here just in case you were looking for this sort of reply. Are you rendering from the original Bezier patch definition (e.g. https://www.cs.utah.edu/...

1

Wow I'm stupid, the whole problem was I thought it was 1/t and it is actually 1-t in parametric form. Hope this helps someone anyway.

1

I want to know if there is a better way to check for self intersection, other than checking the original position? Since cubes are convex solids, a self-intersection check shouldn't introduce artefacts in your case, while it would in a more general ray-tracer (see my answer about the shadow terminator problem for more about that). In general, it's a good ...

1

You gave the formula as: $$Cost(cell) = C_t + \frac{S_L}{S_{Cell}} \times N_L \times t_i + \frac{S_R}{S_{Cell}} \times N_R \times t_i$$ (You put $r_i$ at the right-hand end, but I assume that was a typo.) There's a more general form of this formula $$Cost(cell) = C_t + \sum_{k\ \in\ K} \frac{S_k}{S_{Cell}} \times N_k \times t_i$$ where $K$ is the set ...

1

You need to perform integration of $P$ over the hemisphere to calculate the solution. There doesn't seem to be closed-form solution as the solution requires incomplete gamma function: $$2\pi(e^{-\alpha d}-\alpha d\Gamma(0,\alpha d))$$

1

You have two issues at stake here: What conventions are used in the particular program you use (or use as a template). The meaning that people gave to certain words within the context of your program. The meaning of the terms 'screen coordinates' and 'window coordinates' in the Computer Graphics world. In the CG world, these terms have very precise meaning ...

Only top voted, non community-wiki answers of a minimum length are eligible