Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [pathtracing]

For questions about the path tracing Monte Carlo algorithm for physically accurate global illumination, or its variants.

24
votes
2answers
3k 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) ...
21
votes
1answer
2k 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 ...
17
votes
3answers
4k views

Is Russian Roulette really the answer?

I have seen that in some implementations of Path Tracing, an approach called Russian Roulette is used to cull some of the paths and share their contribution among the other paths. I understand that ...
13
votes
1answer
2k views

Choosing Reflection or Refraction in Path Tracing

I am trying to implement refraction and transmission in my path tracer and I'm a bit unsure on how to implement it. First, some background: When light hits a surface, a portion of it will reflect, ...
12
votes
1answer
3k 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 ...
12
votes
3answers
1k views

Importance Sampling of Environment Maps

What is the best currently known and ideally also production-verified approach for sampling environment maps (EM) in a MIS-based uni-directional path tracer and similar types of renderers? I would ...
11
votes
2answers
1k views

Why use a tent filter in path tracing?

The 99 lines of C path tracer Smallpt renders a 2x2 subpixel grid for each pixel it intends to render and then does a tent filter to combine them. There is an interesting presentation explaining the ...
11
votes
1answer
585 views

Path tracer - multi layered materials and importance sampling

I'm currently trying to implement a Monte Carlo path tracer. I've done some research and it seems that a common approach to materials is to use a layered model. Something like this: When light hits ...
10
votes
1answer
912 views

Full Monte-Carlo Volumetric Scattering

I would like to add full monte-carlo volumetric scattering to my path tracer, but I'm having a hard time researching how to do it. Let me explain what I would like to do: A ray enters a material, and ...
9
votes
2answers
331 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 ...
9
votes
0answers
295 views

Using Monte carlo on Rayleigh scattering

Update I am editing and posting this question in a different way; this time from the point of view of Nishita paper. Sunlight gets scattered at P and attenuated before reaching Pv. Therefore ...
9
votes
0answers
121 views

Help with start up bias in Metropolis Light Transport

I'm trying to implement metropolis light transport based on this paper, and I have the basic thing working. I run the algorithm multiple times with different starting points, add the results for each ...
8
votes
1answer
681 views

How does everyone count “Rays per Second”?

Recently I'm developing a Monte-Carlo path tracer. To measure my tracer's performance, I decided to implement a simple mechanism to count how many rays can it trace in a second. Then here comes the ...
8
votes
1answer
203 views

Is this Russian roulette code correct?

I'm using www.scratchapixel.com among other resources to help me learn how to implement a renderer. I am looking at the following code from this page where a packet of photons moving through a ...
8
votes
1answer
1k 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 ...
8
votes
0answers
589 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 ...
7
votes
2answers
891 views

Is it expected that a naive path tracer takes many, many samples to converge?

I have a naive diffuse/emissive material path tracer implementation (pinhole camera) and am seeing it take a very large number of samples per pixel to converge - like probably in the millions - and ...
7
votes
2answers
603 views

Path Tracing & Materials

I'm wondering about the technique used when sampling a layered material for the next event in a path tracer. I have a material with three layers: a base diffuse, specular and sheen lobes. How does one ...
7
votes
2answers
558 views

Algorithms to Remove High Frequency Noise from Path Tracing

I have been working on my own renderer for a while, and I'm wondering if there's any way to remove the Monte Carlo noise from the rendered image, besides waiting for a long time for it to converge? ...
7
votes
1answer
244 views

Derivation of Wikipedia's path tracing diffuse BRDF

Wikipedia's path tracing algorithm has the following line for the diffuse BRDF: Color BRDF = 2 * m.reflectance * cos_theta; I'm a little confused as I've been ...
7
votes
1answer
673 views

Proper way to handle diffuse + refraction + reflection rays in path tracing?

Let's say we are path tracing and that there is an object which has some amount of diffuse reflection, and some amount of specular reflection. What is the best or correct way to handle that in the ...
7
votes
1answer
176 views

An Effective way to explain Ray Tracing?

In my CS class in high school I'm doing a presentation on Computer Graphics and I wanted to talk about Ray Tracing. I was wondering what would be the easiest way to do this without confusing my ...
7
votes
1answer
346 views

How Sunlight is added in Bidirectional Path tracing?

How is distant directional light source(like sun) added in BDPT? If this is an indoor scene that gets sunlight through windows, how is this handled in BDPT(other than to consider Sun as a big disc far ...
7
votes
1answer
700 views

Resulting Probabilty Density in Path Tracer for paths using Next Event Estimation

I am trying to implement my own Gradient Domain Path Tracer by following the code of this guy who already implemented it: https://gist.github.com/BachiLi/4f5c6e5a4fef5773dab1 I already managed to ...
6
votes
1answer
676 views

What effects does path tracing capture that recursive ray tracing does not?

So I have been wanting to make a rendering engine as a summer project. I'd like to shoot for photo-realism of static scenes rather than real time dynamic game like graphics. So in my research I came ...
6
votes
1answer
450 views

How can a diffused(frosted) glass be modelled in path tracing

How can a diffused(frosted) glass be modelled in path tracing? Currently I am able to define a window poly line as a clear glass material where it transmits or reflects the ray. I am not clear though ...
6
votes
1answer
357 views

Path Tracing With Multiple Lights

I've got my path tracer working great for a single light, but I'm having trouble coming up with a solution for scenes with multiple lights. My first thought was to just send a ray to each light and ...
6
votes
1answer
176 views

Mix shader looks wrong on my path tracer

I apologize if my methods seem way off because this is my first time trying to build a path tracer and I'm struggling quite a bit. Currently, I am trying to mimic the "mix shader" node in Blender 3D ...
6
votes
1answer
185 views

What parts of unbiased path tracing pipeline can benefit from OpenCL?

After looking at a lot of existing implementations, I am currently implementing a path tracer in OpenCL. However there seems to be divergence to what parts of the pipeline can actually benefit from ...
6
votes
1answer
78 views

How is measured BRDF data recorded?

How is measured BRDF data recorded? Like the MERL BRDF Database. What kind of equipment is used and what are the key values that need to be recorded? I know one place this data was used was in the ...
5
votes
2answers
1k 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 ...
5
votes
1answer
218 views

Tasks of a professional graphics programmer?

Currently I'm 16 and in high school and I love graphics programming and I'm seriously considering it as a career path. I was wondering what a day as a graphics programmer looks like for offline ...
5
votes
1answer
198 views

Phong BRDF in Mitsuba, Tungsten and AGI

In the book AGI (Advanced Global Illumination), the Phong BRDF is $f_r(x,\Psi\leftrightarrow\Theta)=k_s\cfrac{(R\cdot\Theta)^n}{N\cdot\Psi}+k_d$ $k_d=\cfrac{albedo}\pi$ In Mitsuba and Tungsten, the ...
5
votes
1answer
729 views

Volume Rendering (Path Tracing & Real-Time)

I have a few doubts and questions regarding volume rendering, I was hoping someone here could help me understand. I commonly hear the terms 'Ray-Marching' & 'Volume Rendering' being used together ...
5
votes
1answer
719 views

Role of PDF of Uniform Random Sampling in a path tracer

I am trying to implement my own path tracer but before arriving to the question I want to give you a short overview: In the implementation of the rendering equation I use some particular technique in ...
5
votes
1answer
102 views

Can I ignore importance, adjoint equations, GRDFs for my path tracer?

I need to write a photo-realistic renderer. I have been looking at ScratchAPixel site, asking a couple of questions here on CG, and going through the Advanced Global Illumination 2nd ed book. I've ...
5
votes
1answer
617 views

Mimicking Blender's “roughness” in my path tracer

Recently I asked a question regarding how to mix a glossy and diffuse shader in my path tracer: Mix shader looks wrong on my path tracer. I thought it was incorrect, but a comparison between mine and ...
5
votes
1answer
131 views

Changing colors after raytracing

Intro Maxwell Render has a feature called multilight, where one can ray-trace a scene with multiple light sources, and change the brightness of the individual light sources afterwards. Luxrender has ...
5
votes
1answer
439 views

How to compensate low amount of rays reaching the light in a Path Tracer

I am trying to implement for research purposes a path tracer, but so far but results are not so good and I will explain you why. The general idea before getting to the code: I am working on paths ...
5
votes
1answer
296 views

About the use of Russian Roulette in Smallpt

I was taking a look at Smallpt (http://www.kevinbeason.com/smallpt), more specifically at the Russian Roulette part. Actually, RR is used in two places along the code: first, to determine ray ...
5
votes
0answers
196 views

How does path tracing handle specular surfaces(Dirac BSDFs) such as water?

I'm trying to render water using path tracing. However, since in path tracing, the light sampling is skipped while the intersection point is perfect specular and thus no direct light would be taken ...
5
votes
0answers
95 views

Should I use nonsymmetric BSDF for refraction in BPT?

I'm implementing bidirectional path tracing. I want to simulate perfect refraction. I read in the Veach thesis that a perfect refraction BSDF is non-symmetric. Does it mean that I need to use ...
4
votes
1answer
153 views

How to send shadow rays to window light source with glazing

For rendering an indoor scene where light source is skylight coming in through the window opening, one can consider the window polyline as the light source, with the sky distribution, in direct ...
4
votes
2answers
283 views

Storing 3D animations for ray tracing

I've just finished writing a path tracer that takes OBJ files and renders it. This is convenient for still images, but my end goal was to export a sequence from a 3D application (Blender was what I ...
4
votes
2answers
148 views

Inconsistent shading in pathtraced image

I am currently building a pathtracer, which has support for vertex normals and face normals. There seems to be an issue when it comes to rendering objects with triangles exported from Blender. ...
4
votes
1answer
240 views

Russian Roulette - Maximum call stack size exceeded

I am trying to write my own path tracer in JavaScript, but I have a problem with the implementation of russian roulette. First, let me describe how my path tracer works. I have a function called ...
4
votes
1answer
166 views

Path Tracer - implementation questions

so I am currently in the middle of implementing a path tracer for my bachelor thesis. And so far I have understood and mapped the general flow of the program except for 2 things. Note that I'm using ...
4
votes
1answer
420 views

How to properly direct light sample GGX in path tracing

I have been trying to implement the GGX shader in my path tracer based on this paper: Microfacet Models for Refraction through Rough Surfaces It's pretty clear how the importance sampling works, but I ...
4
votes
1answer
643 views

Compute sphere tangent for normal mapping

I'm implementing normal mapping on my toy pathtracer. I need to compute the tangent (and bitangent) of any sphere point in order to create the matrix that will transform tangent space to world space. ...
4
votes
1answer
445 views

Efficiently sampling specific surfaces using MIS in path tracing

Apologies for posting two questions in one post, but as they are relevant I kept them in one. Question 1 In the definition of multi sample estimator that Veach has defined, the integrand is the same ...