Questions tagged [raytracing]

Questions specific to raytracing (as opposed to scanline rendering), the 3D graphics technique of intersecting rays from the camera with objects in the scene.

Filter by
Sorted by
Tagged with
43 votes
2 answers
48k views

What is Ray Marching? Is Sphere Tracing the same thing?

A lot of ShaderToy demos share the Ray Marching algorithm to render the scene, but they are often written with a very compact style and i can't find any straightforward examples or explanation. So ...
psicomante's user avatar
36 votes
3 answers
14k views

Why does monte carlo ray tracing perform better than distributed ray tracing?

I've heard that the quality of a monte carlo ray tracer (based on path tracing algorithms) is much more realistic than a distributed (stochastic) engine. I try to understand why, but I'm just at the ...
p2or's user avatar
  • 596
31 votes
2 answers
7k views

Path tracing the Cook-Torrance BRDF

-- Sorry for the long post, but I prefer to do that way because "Devil is in the details." :) I am writing a path tracer from the scratch and it is working nicely for perfectly diffuse (Lambertian) ...
user avatar
25 votes
1 answer
4k views

Anti-aliasing / Filtering in Ray Tracing

In ray tracing / path tracing, one of the simplest way to anti-alias the image is to supersample the pixel values and average the results. IE. instead of shooting every sample through the center of ...
RichieSams's user avatar
  • 3,732
21 votes
5 answers
4k views

How to raytrace Bezier surfaces?

I tried this question on math.SE and surprisingly, the answer was "the equations are too nasty, just feed the function it to a numerical root-finder". But if you consider yourself "a graphics guy" ...
luser droog's user avatar
  • 1,343
21 votes
2 answers
783 views

How do correlated samples influence the behavior of a Monte Carlo renderer?

Most descriptions of Monte Carlo rendering methods, such as path tracing or bidirectional path tracing, assume that samples are generated independently; that is, a standard random number generator is ...
Benedikt Bitterli's user avatar
19 votes
1 answer
6k views

Why is recursion forbidden in OpenCL?

I'd like to use OpenCL to accelerate rendering of raytraced images, but I notice that the Wikipedia page claims that recursion is forbidden in Open CL. Is this true? As I make extensive use of ...
trichoplax is on Codidact now's user avatar
19 votes
3 answers
4k views

What's the current state-of-the-art algorithm for ray-tracing height-fields?

There have been lots of papers over the years on different techniques for drawing height-field terrain in a ray-tracer. Some algorithms ray-march the grid directly (or via a quadtree); others ...
Dan Hulme's user avatar
  • 6,700
18 votes
2 answers
12k views

Cause of shadow acne

I know how shadow mapping works but I am not getting the cause of shadow acne! Can anyone tell me cause of shadow acne in a simple way and how is it related to depth map resolution?
Ankit singh kushwah's user avatar
18 votes
1 answer
9k views

Progressive Path Tracing with Explicit Light Sampling

I understood the logic behind the importance sampling for the BRDF part. However, when it comes to sampling light sources explicitly, all becomes confusing. For example, if I have one point light ...
Mustafa Işık's user avatar
17 votes
2 answers
1k views

Subpixel Rendering for a Ray Tracer

In font rendering, it is common to use subpixel rendering. The basic idea here is to break the pixel into its RGB components and then compute a value for each separately. Since each component is ...
geometrian's user avatar
  • 1,950
16 votes
3 answers
7k views

How are volumetric effects handled in raytracing?

How are volumetric effects such as smoke, fog, or clouds rendered by a raytracer? Unlike solid objects, these don't have a well-defined surface to compute an intersection with.
Mark's user avatar
  • 1,612
15 votes
4 answers
18k views

How is Anti Aliasing Implemented in Ray Tracing?

After reading a few articles online I can confidently say I am clueless on how Anti-Aliasing works when using Ray Tracing. All I understand is that A Single Pixel/Ray is split into 4 sub-pixels and 4 ...
Arjan Singh's user avatar
  • 2,491
15 votes
3 answers
2k views

Non Real Time Raytracing

I've played with real time raytracing (and raymarching etc) quite a bit, but haven't spent that much time on non real time raytracing - for higher quality images or for pre-rendering videos and the ...
Alan Wolfe's user avatar
  • 7,751
15 votes
1 answer
13k views

Difference between BVH and Octree/K-d trees

So I'm currently reading up on acceleration data structures and so far I've heard there are 2 main schemes. Object Subdivision and Spatial Subdivision. The Bounding Volume Hierarchy belongs to the ...
gallickgunner's user avatar
15 votes
2 answers
2k views

How to build a decent lens/camera objective model for path tracing?

I have written a small path-tracer after learning and experimenting on smallpt. The only thing that I did not write (and understood) myself is how the initial rays are computed and fired from the ...
teh internets is made of catz's user avatar
15 votes
1 answer
11k views

Radiosity VS Ray tracing

Radiosity is basically what allows this: In a tutorial of Cornell University about Radiosity it is mentioned that: A ray-traced version of the image shows only the light reaching the viewer by ...
Armfoot's user avatar
  • 615
15 votes
2 answers
684 views

Problem with definition of BSDF and radiance

When I was reading theory behind physical based rendering I noticed that definition of BSDF and radiance has some problems. For example BSDF of purely specular surfaces is zero almost everywhere and ...
tom's user avatar
  • 466
14 votes
4 answers
752 views

How can I raytrace a scene that does not fit into memory?

If the scene to be raytraced cannot be stored in memory, then without adding more RAM to the machine it seems unrealistic to render it in a practical time span, due to the need to load different parts ...
trichoplax is on Codidact now's user avatar
13 votes
1 answer
7k views

Does cosine weighted hemisphere sampling still require NdotL when calculating contribution for indirect light?

When converting from uniform hemisphere sampling to cosine weighted hemisphere sampling I am confused by a statement in an article. My current indirect contribution is calculated as: ...
Steven's user avatar
  • 315
13 votes
2 answers
473 views

Ray Transformation to Object Space for Motion Blur

My raytracer supports a wide variety of objects. To intersect them, I use the standard technique of transforming rays into object-space. This works fantastically until I add motion blur. I model ...
geometrian's user avatar
  • 1,950
12 votes
2 answers
6k views

Is BVH faster than the octree/kd-tree for raytracing the objects on a GPU?

Apparently most people use BVHs in their raytracers. The ray-AABB intersection code is very fast and and the BVHs also compresses empty space efficiently, working even with infinitely large objects, ...
Nash Gold's user avatar
  • 123
12 votes
1 answer
1k views

What is the difference between importance sampling and mutiple importance sampling?

I can't understand math equations. I'm a graphic designer. What is "importance sampling"? What is "multiple importance sampling"? Could you explain easily, using illustrations and no math equations? ...
kangsume's user avatar
  • 121
12 votes
1 answer
660 views

Can I raytrace gravitational lensing using only a single point source of gravity?

I'd like to simulate the magnification of very distant objects by the lensing effect of a less distant galaxy. Will I need to model large numbers of point masses or can I get away with just a single ...
trichoplax is on Codidact now's user avatar
12 votes
1 answer
351 views

Polarising reflection and refraction for a wrap around water surface

I want to render realistic images of water in an orbiting space habitat. The image does not need to be generated in real time, although I wouldn't want it to take weeks either. I'm looking for an ...
trichoplax is on Codidact now's user avatar
11 votes
1 answer
2k views

Ray Tracing with Cones: coverage, overlapping and abutting triangles

In his classic paper Ray Tracing with Cones, John Amanatides describes a variation on classical ray tracing. By extending the concept of a ray by an aperture angle, making it a cone, aliasing effects (...
David Kuri's user avatar
  • 2,293
11 votes
1 answer
753 views

Ocean Wave Rendering

How could I generate the waves for a water body with whitecaps & foam and variable intensity of the waves? Is the surface a mesh with a normal map? Is there a formula for generating that? Is there ...
Arjan Singh's user avatar
  • 2,491
10 votes
2 answers
3k views

Rendering equation - why unsolvable directly?

Why is the rendering equation, introduced by Kajiya in 1986, not solvable directly/analytically?
Blongphong's user avatar
10 votes
1 answer
898 views

Modelling Young's double slit experiment

Young's double slit experiment is very simple to set up and simple to explain, but it is an example of both diffraction and interference, neither of which are modelled by conventional raytracing. It ...
trichoplax is on Codidact now's user avatar
10 votes
2 answers
3k views

Is there a method to do ray marching style modulus repeat with raytracing?

One of the features of ray marching is that you can use modulus to repeat shapes infinitely, like in the image below, which is from https://www.shadertoy.com/view/MsBGW1 I was curious if there exists ...
Alan Wolfe's user avatar
  • 7,751
10 votes
1 answer
5k views

Area Lights in Path Tracing

I have been following the scratchapixel ray tracing tutorials online which have been great at explaining the theory behind everything & how to implement it. However, I reached the point where I ...
Arjan Singh's user avatar
  • 2,491
10 votes
1 answer
2k views

Asset creation for signed distance field rendering?

In traditional computer graphics, most 3D models are rendered by rasterizing or ray tracing against a subdivided mesh of primitives, usually triangles or quads. More recently, some real-time ...
Mokosha's user avatar
  • 1,144
10 votes
1 answer
286 views

Sphere intersection occlusion (for hybrid raytracing)

Thinking about hybrid raytracing, hence the following question: Suppose I have two solid spheres $s_1$ and $s_2$. We know their centres and radii, and we know that they have some overlapping volume ...
occulus's user avatar
  • 203
10 votes
2 answers
809 views

Total emitted power of diffuse area light

I am reading the book Physically Based Rendering (Pharr, Humphreys). In the chapter on lights, they talk about approximating the total emitted power of different kinds of lights. For example, a point ...
Rasmus Rønn Nielsen's user avatar
9 votes
5 answers
905 views

Why does the 1/r² term appear with point sources?

I'm currently reading some books on radiometry. They mention that radiance is constant along a ray. It doesn't change with distance. However, I've seen some raytracer and they put the 1/r² factor when ...
Livetrack's user avatar
  • 169
9 votes
2 answers
3k views

How am I able to perform perspective projection without a near plane?

I'm learning about 3D computer graphics, but I'm having a hard time understanding why the near plane of a viewing frustum can not be placed at z position $0$ (right at the camera). I can understand ...
Vilhelm Gray's user avatar
9 votes
2 answers
5k views

A recent approach for subsurface scattering

I read "A Practical Model for Subsurface Light Transport" and "A Rapid Hierarchical Rendering Technique for Translucent Materials". If I understand correctly, the former does not consider the case ...
Mustafa Işık's user avatar
9 votes
1 answer
4k views

Raytracing: why are the spheres in the image below appear stretched?

Some context. Above are the code and the resulting image for it in Peter Shirley's Raytracing in one weekend's book. As you can see from the code, he adds in some spheres. And yet in the final image ...
Manh Nguyen's user avatar
9 votes
1 answer
119 views

What are the side effects of biasing brightness in continuous spectrum raytracing?

I want to model rays with a continuous range of frequencies so that I can get raytraced images with colour separation on refraction. I can model a light source with a specified frequency distribution ...
trichoplax is on Codidact now's user avatar
9 votes
1 answer
4k views

Importance sampling microfacet GGX

I have a renderer where the BxDF interface is Sample(), PDF(), and Eval(). The Lambertian BRDF is working well, and I believe I have properly implemented Eval for GGX based on another user's question, ...
hunterloftis's user avatar
9 votes
1 answer
3k views

Path weight for direct light sampling

I originally wrote a pathtracer that just bounces by the BRDF and each sample is added to a buffer that divides by the current number of frames. Now I'd like to do next event estimation at each ...
newtorendering's user avatar
9 votes
1 answer
1k views

More accurate Fresnel approximation for a RGB-based Path Tracer

I'm writing a path tracer and, for the moment, spectra related data (spectral power distributions and spectral reflectance curves) are stored as RGB tuples. In the Cook-Torrance specular BRDF I am ...
user avatar
8 votes
4 answers
2k views

Should ideal specular multiply light colour with material colour?

Ideal specular reflection is like a perfect mirror. I'm looking at the code to SmallPt and see that one of the spheres has an ideal specular material: ...
PeteUK's user avatar
  • 700
8 votes
3 answers
2k views

Fundamental drawbacks of rasterization over ray tracing

Are there any fundamental drawbacks/limitations of rasterization as compared to ray-tracing? When I search on the internet, I get vague explanations like rasterization does not provide lighting ...
Nagabhushan S N's user avatar
8 votes
2 answers
2k views

Ray tracing with thin lens camera

I'm reading Cook's paper "Stochastic Sampling and Distributed Ray Tracing", I don't understand how the rays are generated. He says: Determine the focal point by constructing a ray from the eye ...
arcollector's user avatar
8 votes
1 answer
3k views

Energy Conservation for Blinn-Phong BRDF

I am trying to sample from the Blinn-Phong BRDF. For testing, I use a spherical light source (Lambertian emission) sitting on a specular plane. Here's a reference image using energy-conserving Phong ...
geometrian's user avatar
  • 1,950
8 votes
2 answers
2k views

Am I missing something for ambient occlusion?

I'm trying to implement ambient occlusion in Python 3 and I'm seeing shadows beneath my reflective spheres but they seem very faint. I'm not sure if that means I've missed something, or if I just have ...
trichoplax is on Codidact now's user avatar
8 votes
2 answers
828 views

How to handle a parametric equation in raytracing?

After taking a look at the Mobius strip, I noticed its equation is really simple and tried to add it into my Raytracer. I tried a "naive" way by simply generating N...
Telokis's user avatar
  • 163
8 votes
1 answer
839 views

How to implement a realtime 2D light renderer with fog/colored light on the GPU?

Since long ago I wanted to implement a 2D lightning algorithm based on an idea I saw on YouTube. The video is realtime, but it runs on the CPU and the resolution is pretty low. I'm curious if anyone ...
sydd's user avatar
  • 253
8 votes
1 answer
1k views

The meaning of early ray termination and front-to-back traversal in ray tracing

I'm new to computer graphics. These days I've been trying to understand how ray tracing using an acceleration data structure works. I came across the term "early ray termination" several times, I ...
S.E.K.'s user avatar
  • 141

1
2 3 4 5
9