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.

113 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
7 votes
0 answers
2k 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 = ...
Walt Donovan's user avatar
6 votes
0 answers
713 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 ...
Florian Schut's user avatar
5 votes
0 answers
381 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 ...
Michal Kučera's user avatar
4 votes
0 answers
683 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/...
flipflop's user avatar
4 votes
0 answers
164 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-...
maurock's user avatar
  • 189
4 votes
0 answers
178 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 ...
Arjan Singh's user avatar
  • 2,491
4 votes
0 answers
136 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 ...
ciechowoj's user avatar
  • 203
4 votes
0 answers
213 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, ...
davidhood2's user avatar
3 votes
0 answers
105 views

ray racing (Whitted) bad shadow on far objects (artifact)

situation: I've implemented a Whitted style ray tracing in C. Everything appear to works except the shadow cast by small object on big far objects The problem : red sphere have radius 0.5 orange ...
LesChats's user avatar
3 votes
0 answers
461 views

Path tracing : fireflies/hot pixels when directly sampling lights

I am implementing a pathtracer with both indirect and direct light sampling at each intersection (I believe the "direct light sampling" part is also referred to as "next event ...
Ewaren's user avatar
  • 186
3 votes
0 answers
157 views

Global root signature crash

I have a problem with RTPSO creation. Using local root signatures for each of rgs (ray generation shader), chs (closest hit), miss is working correctly. However, for performance sake, I want to use ...
DirectX_Programmer's user avatar
3 votes
1 answer
299 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 ...
Russell356's user avatar
3 votes
0 answers
805 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 ...
jinglei's user avatar
  • 293
3 votes
0 answers
329 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 ...
Makogan's user avatar
  • 1,696
3 votes
0 answers
496 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 ...
Row Rebel's user avatar
3 votes
0 answers
123 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 ...
user avatar
3 votes
0 answers
504 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 ...
Arjan Singh's user avatar
  • 2,491
3 votes
0 answers
554 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 ...
Aloof's user avatar
  • 31
2 votes
0 answers
153 views

Sparse voxel oct tree tracing, optimization tricks?

I have a working oct-ree raytracer and I am applying it to the sponza. The algorithm I have designed works like this at a high level: Collide with the bounding box of the model, move your ray to that ...
Makogan's user avatar
  • 1,696
2 votes
0 answers
307 views

BVH works fine, but why does it slow down a lot when using Cornell Box? How to improve it?

I am using the SAH-BVH from PBRT-v3, it works fine for triangle-mesh, especially for dense mesh. But here is a problem. If I added Cornell box while building the BVH tree, the BVH performance will ...
iaomw's user avatar
  • 131
2 votes
0 answers
85 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 ...
Marcus's user avatar
  • 21
2 votes
0 answers
163 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 ...
0xbadf00d's user avatar
  • 193
2 votes
0 answers
89 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 ...
0xbadf00d's user avatar
  • 193
2 votes
0 answers
54 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}=(\...
0xbadf00d's user avatar
  • 193
2 votes
0 answers
581 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: ...
Badnet's user avatar
  • 21
2 votes
0 answers
420 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. ...
Zhe Chen's user avatar
  • 119
2 votes
0 answers
597 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?
chaosink's user avatar
  • 591
2 votes
0 answers
160 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 ...
ali's user avatar
  • 730
2 votes
0 answers
583 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 ...
George Wilson's user avatar
1 vote
0 answers
24 views

What is the difference between Uniform/Storage Buffer and Hitgroup Record data buffer?

I have a vulkan ray tracer in which I uploaded my vertices as a single buffer (for all meshes in the scene) as a storage buffer. I have one closest hit shader per way-of-calculating-lighting (e.g. one ...
Tare's user avatar
  • 1,541
1 vote
0 answers
32 views

Why would an image look the same pre-raytracing and post-raytracing?

I am trying to raytrace an image of a black hole, but given my current difficulties of doing so with the formalism of relativity, I've decided to do my raytracing using Newton's law of gravitation ...
JS4137's user avatar
  • 111
1 vote
1 answer
137 views

Importance sampling of the blinn-phong brdf in pathtracing

tl;dr: How do you importance sample the blinn-phong-brdf? Recipe for importance sampling of the phong brdf as far as i understood it (pseudo-code): ...
Berti Krüger's user avatar
1 vote
0 answers
55 views

What is this cardioid/fish-like graphic that appears in FFXVI when looking at the sun?

In Final Fantasy 16, a recent video game, when looking towards the setting sun, one sees several circles, which seem like the lens flare that one commonly sees in games. But the most prominent (circle)...
chausies's user avatar
  • 111
1 vote
0 answers
63 views

Motivation for densities wrt the same measure in MIS

In Veach's thesis the MIS weights (e.g. using the balance heuristic) for two strategies with densities $p_1, p_2$ are given as $w_1(x) = \frac{p_1(x)}{p_1(x)+p_2(x)}$ and $w_2(x) = \frac{p_2(x)}{p_1(x)...
lightxbulb's user avatar
  • 2,083
1 vote
0 answers
161 views

Calculation of reflection vector in Phong specular lighting

I wrote the following phong reflection model for ray tracing in Rust, but I am not sure about the calculation of a reflection vector for the specular reflection. ...
user48423's user avatar
1 vote
0 answers
83 views

Calculating ray intersection with two spheres (with smooth_blending between the two spheres to make them appear as one continuous geometry)

I have the following function to define the distance to the interesection between a ray and the surface of a sphere: ...
Iron Attorney's user avatar
1 vote
0 answers
61 views

Is this algorithm a variation of ray tracing worth something?

Im not a professional computer graphics programmer, I'm just learning. All the tutorials I've seen so far about ray tracing have one thing in common, that in order to get good visual results they need ...
Robert Puscasu's user avatar
1 vote
0 answers
59 views

Question about reconstruction filter in ray tracing?

Suppose we have an 512x512 image, then the value of pixel j should be $I_j = \int_{0}^{512} \int_{0}^{512} h_j(u,v)L(u,v) \,dudv$, where $h_j(u,v)$ is the filter function for pixel j, $L(u,v)$ is the ...
Andy's user avatar
  • 11
1 vote
0 answers
139 views

MIS path tracing got darker image than brute force path tracing

I'm trying to implement the multiple importance sampling path tracing, the MIS path tracing uses the MIS to combine the direct light sampling and brdf sampling to evaluate the direct lighting. The ...
yys_c's user avatar
  • 11
1 vote
0 answers
76 views

Perlin noise is mysteriously ignored when the pattern is rotated 45 degrees

I am creating different coloring patterns for my CPU raytracer, such as checker, gradient, ring, stripe pattern etc. The problems started when I tried to create a perturbation pattern (of a subpattern)...
Ave Milia's user avatar
  • 121
1 vote
0 answers
186 views

Understanding camera of a CPU raytracer from "Ray tracer challenge"

I am following a book "Ray tracer challenge" by Buck, but it doesn't explain anything. The code works, but I don't properly understand, why. The code is as follows: ...
Ave Milia's user avatar
  • 121
1 vote
0 answers
28 views

RayTracing grid acceleration slowness using motion blur

I'm adding some motionblur feature to my raytracer and I'm using an uniform grid acceleration scheme (it will be updated to bvh later on) to speed up the rendering time. My problem is that if I have a ...
ytrox's user avatar
  • 31
1 vote
0 answers
86 views

Difficulty in understanding the interpretation of propagation of an exitant function from the book Advanced Global Illumination (2nd ed)

The book defines operator $\mathcal{T}$ for the propagation of an exitant function as: if I'm assuming that the position of the point $x$ is on the top-left surface, and that $\Psi$ is considered as ...
Domenico's user avatar
1 vote
0 answers
449 views

Raytracing and transformation

So I'm looking at incorporating instancing to my ray tracer. However what I would like some insight on is what to apply the transformation to?. Most suggest to apply the inverse transformation to the ...
Sina Dasht's user avatar
1 vote
0 answers
91 views

Why my bsdf can not pass Chi2test?

I implemented a MicrofacetTransmission in nori. But it can not pass all Chi2test when alpha is large(>= 0.4 or ?),part of chi2test is passed.And I can not found the problem.Can someone help me? ...
bin guo's user avatar
  • 31
1 vote
0 answers
130 views

Time Interval Ray Tracing performance

I found a very nice paper regarding Time Interval Ray Tracing for Motion Blur published in 2017. That was before RTX GPUs were on the market. I have a few questions about an optimal implementation and ...
Thomas's user avatar
  • 1,136
1 vote
0 answers
112 views

Shadow Bug when Raytracing Triangles

Spheres with shadows work fine. But when I try to include triangles with shadows, they are shaded incorrectly (i.e completely black): But when I disable shadows Blinn shading on triangles work fine (...
fakhir's user avatar
  • 131
1 vote
0 answers
321 views

Combining two images based on their depth maps

Lets assume, we have two depth maps with us and their corresponding color maps. Now, our task is to populate a final image that will be displayed. Each pixel in the final image needs to be calculated ...
Rohan Asokan's user avatar
1 vote
0 answers
42 views

Create a virtual server which use the full power of my GPU

i dont know if i can create a virtual server (with vmware, virtual box or with something like that), and if i can use the full power of my graph (i have a nvidia rtx 2080 super) or if I'm going to ...
Yandrak's user avatar
  • 19
1 vote
0 answers
107 views

GL_OUT_OF_MEMORY Error when glDispatchCompute takes longer

I built a simple Ray Tracer which takes use of OpenGL's Compute Shader and traces ".obj" Files. The results are passed to the Host-Program via glMapBufferRange after finishing computing. ...
herrmutig's user avatar