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.

78 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
0answers
446 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 ...
8
votes
0answers
823 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
0answers
1k views

Bump mapping a ray-traced sphere

I'm attempting to apply a height map to a ray-traced sphere. The height map is stored as a texture. I have the intersection point on the sphere $p$, and I compute the normal vector at that point $N = ...
5
votes
0answers
260 views

How to account for self intersection with large ray tracing scenes?

I'm working on a hybrid real time ray tracing project and trying to tackle the problem of self-intersection with larger scenes due to loss of float accuracy. The logic I'm trying to use is based on ...
5
votes
0answers
168 views

Ray tracing implicit surfaces using Sturm's theorem

I am trying to render implicit surfaces given by a polynomial equation $F(x,y,z) = 0$ using Sturm's theorem. Plugging the parametric ray equation $r(t) = o + td$, where $o\in\mathbb{R}^3$ is the ray ...
5
votes
0answers
202 views

Computation of conservative AABB for clipped triangle

I'm currently trying to implement a fast algorithm for KD-Tree construction using SAH, as described in this paper: On building fast KD-trees for ray tracing, and on doing that in O(N log N) I found ...
4
votes
0answers
200 views

Proper way of consuming stratified samples in path/ray tracing

I'm working on a (toy-level) path/ray-tracer, currently trying to implement (and understand) improved sampling strategies. The obvious next choice after uniform random sampling would be stratified/...
4
votes
0answers
135 views

Learning light transport using Q-Learning

I am trying to reproduce the results obtained by Dahm et al. in the paper Learning Light Transport the Reinforced Way. This method takes advantage of the similarity between the Bellman equation (Q-...
4
votes
0answers
495 views

ray-triangle intersection precision - c++

I'm building a software renderer but I think there might be some problem with my ray-triangle intersection accuracy. I implemented the algorithm referring to ...
4
votes
0answers
324 views

Wrong output while implementing GGX importance sampling

I'm receiving a non-energy conserving output while trying to importance sample the GGX Distributionof the Microfacet model, which is generally 3-4 times bigger than the resulting PDF I'm following ...
4
votes
0answers
109 views

What techniques are used to build ray intersection acceleration structures on the GPU?

What improvements and alternatives have been developed since HLBVH was introduced in the 2010 paper HLBVH: Hierarcihcal LBVH Construction for Real-Time Ray Tracing of Dynamic Geometry by J. Pantaleoni ...
4
votes
0answers
134 views

How is glint rendering done in Ray Tracing?

How is glint rendering done with ray tracing in the photo below? Is it just a simple normal map? I found a paper online that describes the exact same method used in the photo above but I have no ...
4
votes
0answers
108 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 ...
3
votes
0answers
248 views

Circular pattern aliasing in voxel ray tracer

I am doing a voxel based raytracer. In other words, I first voxelize the scene using rasterization and I proceed to raytrace the volume in a 3D image to generate a final frame. Currently I noticed ...
3
votes
0answers
305 views

Mathematics of Sub Surface Scattering

Can somebody help explain the mathematics of Sub Surface Scattering in a Path Tracer based on the Diffuse Approximation in A Practical Model for Subsurface Light Transport ? I would like someone to ...
3
votes
0answers
438 views

Problem with specular BRDF (Monte Carlo & Path Tracing)

Above on the left is my attempt and on the right is what I'm aiming for.As you can see my sphere with the specular brdf has a weird dark ring In my radiance function I am recursing through the ...
3
votes
0answers
174 views

Creating an Object Orientated Bounding Volume

I'm attempting to test out the maths behind bounding volume algorithms (prior to ray tracing) using MATLAB. So far, I have successfully created the relatively trivial axis aligned bounding volume, ...
2
votes
0answers
134 views

Scaling of the final image in Metropolis Light Transport

I don't understand why the PBR implementation of Metorpolis Light Transport scales the final image by b / mutationsPerPixel. The authors write: Each Metropolis ...
2
votes
0answers
27 views

Quantify the variance of pixel measurements

Say $E_j$ is an estimator of the value $$I_j=\int f_j\:{\rm d}\lambda$$ of the $j$th pixel given by the path space integral of the corresponding measurement contribution function $f_j$. $f_j$ is of ...
2
votes
0answers
47 views

Chart swaps and path inversion in bidirectional path tracing

I've got a hard time to understand how we would implement the following in practice. I'd be great if someone could explain the details for the example below. Assume we're generating a path ${\rm x}=(\...
2
votes
1answer
87 views

How can I raycast with chunks?

I am attempting to implement chunks/octrees to speed up my render times. However, sometimes the walls show horizontal or vertical lines (rays hitting the inside of voxels?) or some blocks disappear ...
2
votes
0answers
82 views

Implementing GGX VNDF importance sampling with DXR

I am currently implementing the GGX specular BRDF in a DXR raytracer using the importance sampling method describe by Heitz I am sampling the VNDF with: ...
2
votes
0answers
124 views

The termination probability of Russian roulette in PBRT

As described in PBRT 14.5, the path tracer stops bouncing rays at a probability q, which is determined by the throughput of the path. ...
2
votes
1answer
123 views

Light Falloff through a grid

I'm playing with a grid-based lighting system, where light is transported and accumulated through a grid. I initially tried attenuation based on ...
2
votes
0answers
579 views

What's the nature of Monte Carlo noise?

Monte Carlo rendering is just a process of sampling and reconstruction to evaluate the rendering equation. Why is it called noise rather than error?
2
votes
0answers
156 views

Picking multiple light sources from a mixture densities

According to Peter Shirely paper, one pdf(probability density function) can be defined for the union of the light sources and pick only one using a random number from this density: $$p(x) = \alpha_1 ...
2
votes
0answers
485 views

Calculating intensities of Virtual Point Lights in Instant Radiosity from IES lights

Short introduction I created a function that interpolates the IES luminious intensities (candelas) using Hermite interpolation, so in my code all light sources have $I(\theta, \phi)$ function - but ...
1
vote
0answers
77 views

Visualize the variance of an image

Let $h_j$ denote the image reconstruction filter of pixel $j$. I'm estimating the color value $$I_j=\int h_jf\:{\rm d}\mu$$ of the $j$th pixel (see [Veach, Section 8.2]) by an asymptotically ...
1
vote
0answers
53 views

How do I produce a metallic surface in ray tracing?

I can't manage to produce a metallic looking sphere despite trying many things. I have the basics working, i.e shadows, refraction etc. but I'm not sure what combination of these will allow me to ...
1
vote
0answers
36 views

How to handle negative reflection directions in raytracing?

I got a function that generates samples from a GGX visible normal distribution function. When I use it to calculate reflection directions obviously some of these intersect with the surface agin (...
1
vote
0answers
68 views

Ray Tracing -Weird Edge Artifact

I am interested in Path Tracing, I currently follow the Ray Tracing in a weekend book. When implementing the metal material, I get a strange artifact on the edge of the sphere that does not appear in ...
1
vote
0answers
142 views

Strange behaviour when tracing rays through hemisphere patches

I have implemented a ray tracer using reinforcement learning. But I see some problems. I tried to divide the planes into rectangular grids. I searched the moire effect and realized that I can solve my ...
1
vote
0answers
88 views

How does multiple importance sampling work and how should I generate the samples?

Is my understanding of MIS algorithm true? I first generate a random number $x\in U(0,1)$ and $w_1=\frac{p_1(direct)}{p_1(direct)+p_2(hemisphere)}$, and then if $x < w_1$ generate the sample ...
1
vote
0answers
46 views

Oren-Nayar Reflectance

I'm trying to implement Oren-Nayar reflectance and I don't quite understand the Wikipedia article on it. In the article, it has this diagram: I can't figure out what $(\theta_i, \phi_i)$ and $(\...
1
vote
0answers
25 views

Report standard deviation in Rendering results

I noticed that a common metrics for image quality assessment (Monte Carlo path tracing) is MSE between the generated image and a reference one. My question is: why isn't the standard deviation ever ...
1
vote
0answers
144 views

Compute shader only 5 times faster on the GPU than on the CPU

I'm running following compute shader in Vulkan. worldImage is device local memory that holds the world. resultImage is reference to the memory of the swapchain image: ...
1
vote
0answers
123 views

fastest way to bucket triangles into a grid?

What is the fastest known method for bucketing triangles into an unbounded regular 3D grid? Specifically, I need an array of buckets. Random queries (which bucket is here) are not necessary, as this ...
1
vote
0answers
124 views

Compute emitted importance of a pinhole camera

In section 16.1.1 of Physically Based Rendering the authors describe how we can check, if a given ray $r$ corresponds to one starting from the film area. They implement this check such that it works ...
1
vote
0answers
345 views

How exactly do soft shadows get generated using a voxel cone tracing rendering technique?

Let's assume we have voxelized a scene, and all of our materials have an opacity level of 1. The reuslt would then look like: If we raytraced the final volume that gets generated after rasterization. ...
1
vote
0answers
90 views

Tail Recursive Monte Carlo Raytracing

I am writing a raytracer in F# using montecarlo sampling I would like to make my recursive calls tail recursive but I am not sure of this is possible with MC raytracing as one has to evaluate sampled ...
1
vote
0answers
122 views

How to calculate solid angle subtended by a pixel?

How is the solid angle subtended by a pixel calculated? both in perspective and fish eye lens.
1
vote
0answers
81 views

Ray Tracer Shadowing

So I'm working on an assignment where we have to design a simple ray tracer. The program has two objects that it can use, sphere and cube. It can render the cube and spheres, it also does shading on ...
1
vote
0answers
46 views

Is this the correct application of model transformation?

Suppose I want to perform translate in the following order: Scale by $S$ Rotate by matrix $R_1$ Rotate by matrix $R_2$ Translate by $T%$. When I apply the matrix, should the overall transformation ...
1
vote
0answers
110 views

Explain Radiance Estimate for photon mapping

I'm adding photon mapping to my current raytracer to add indirect lighting. Can someone explain how the radiance estimate works in simple terms and with some simple math? I have read a lot of ...
1
vote
1answer
42 views

Mapping sample to a disk

So I have been reading this wonderful book on ray tracing by Kevin Suffern, Ray tracing from Ground Up. I am reading this book after finishing Peter Shirley's first two book on ray tracing & ...
0
votes
0answers
19 views

Implementing monte carlo path traced refractions problem

I am writing a forward monte carlo path tracer with the added feature of specular refractions for transparent materials, I have managed to come this far but something is not quite right and I am ...
0
votes
0answers
40 views

Why is my ray caster is running much faster as a fragment shader compared to a compute shader

I'm trying to write a simple ray caster in OpenGL with C++. Previously, I have been using the fragment shader of a quad that covers the entire screen to do all the ray calculations. Now, I want to do ...
0
votes
1answer
53 views

a very simple raytracer is giving a black output which is implemented in python

I am trying to implement a simple raytracer in python. I am following this tutorial here here is my code, i have explained in comments the relevant parts .All i am getting is a blank image. ...
0
votes
0answers
52 views

Considering a path generated by bidirectional path tracing under a different strategy

Say I have constructed a path, using bidirectional path tracing (BDPT), consisting of a light subpath $y$ with $s=2$ vertices and a camera subpath $z$ with $t=3$ camera vertices. Now I want to ...
0
votes
0answers
44 views

How is the image reconstruction filter on the path space defined in terms of the filter on the raster space?

Say we have a image reconstruction filter $h:R\to\mathbb R$ defined on the raster space $[0,w]\times[0,h]$, where $w,h\in\mathbb N$ define the width and height of the image plane in pixels, ...