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
-1
votes
0answers
62 views

What is wrong with my path tracer?

I've already tried implementing the RL-based path tracer. The path tracer was buggy. Today after running one of my path tracers for hours I realized that even those path tracers show the same problem. ...
2
votes
1answer
31 views

How to decide which child of BVH to visit based on sign of ray's direction vector?

I'm reading about BVH from PBRT. According to the book, in the linear bvh part using morton encoding: An efficient way to perform a front-to-back traversal without incurring the expense of ...
1
vote
0answers
134 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
1answer
88 views

A pseudocode to parallelize a path tracer?

Where can I find a pseudocode to parallelize a path tracer using multiple cpu threads? How should I change the normal path tracer to be capable of parallelization?
0
votes
0answers
69 views

What is the name of this effect and how could I solve it?

I've implemented the algorithm in the paper "Learning the light transport the reinforced way". What is the name of this effect and how should I solve it?
0
votes
1answer
55 views

What is the PDF for path tracing in the paper "Learning the light transport the reinforced way

It's the algorithm which combines path tracing and reinforcement learning. I can't understand what $p_\omega$ is. The algorithm is clear. The actions are the directions and the states are the hit ...
0
votes
0answers
35 views

Temporal anti-alliasing breaks the entire image

I'm kind of lost here as I'm faced with a graphical bug the origin of which I don't even know. In an attempt to recreate a shadertoy I saw that had TXAA, I made a function TemporalAA that takes in 3 ...
2
votes
4answers
104 views

Why isn't rasterization combined with raytracing more often?

If I'm not mistaken, you can make a hybrid renderer which lets a rasterizer solve the visibility problem, then shade all of the projected shapes with a raytracing algorithm. It seems that this isn't ...
1
vote
2answers
51 views

Inverted Normals in Raytracer

I am having the following issue. I am working on a ray tracer for school and I am trying to render a sphere where the radiance of a intersection point is the dot product of the ray direction and the ...
0
votes
0answers
28 views

Factorize probability densities in Bidirectional Path Tracing

Say we have fixed a length $k$ for paths we want to sample using bidirectional path tracing as described in the Physically Based Rendering book. Let $q_{s,\:t}$ denote the probability density of ...
0
votes
1answer
68 views

Perspective Raytracing

Given the up and focal vector of the perspective camera, the position of the camera and the vertical and horizontal opening angle of the FOV. How can I calculate a ray for given screen space ...
0
votes
0answers
48 views

The correct way to apply 3d rotations?

I am trying to reproduce the results of 2017 paper "Learning the light transport the reiforced way" by Duhm and Keller. I already know how to generate random samples inside the equally-sized patches ...
1
vote
0answers
78 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 ...
0
votes
1answer
59 views

How can I implement next event estimation?

I am trying to implement next event estimation to reduce the noise of path tracer and I need a pseudocode. Edit: I know how to sample direct illumination but the visibility function is the real ...
1
vote
0answers
42 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 $(\...
2
votes
0answers
55 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: ...
0
votes
0answers
57 views

Why does my julia ray tracer return stack overflow error?

I' trying to write a monte carlo ray tracer in julia, but my main function returns stack overflow error. Below is my main function: ...
1
vote
0answers
23 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 ...
2
votes
1answer
47 views

Calculate Normals of Boolean Operation for Ray Tracer

I'm working on a small ray tracing project in my free time and I'm currently implementing boolean operations for spheres. My code is setup to calculate the intersection points of each of the spheres ...
0
votes
0answers
150 views

Color shading and light calculation for ray tracing

I am currently building a ray tracer and I came across a problem and confusion regarding the light calculations. For lighting, I am using the following mathematical model: Where ...
0
votes
0answers
53 views

Multiple Importance Sampling in Bidirectional Path Tracing

I'm trying to understand the computation of the path density described in the book Physically Based Rendering. They assume that a path $$x=(x_0,\ldots,x_{n-1})=(q_0,\ldots,q_{s-1},p_{t-1},\ldots,p_0)$$...
0
votes
0answers
31 views

Probability of choosing the current strategy in the pbrt implementation of Multiplexed Metropolis Light Transport

In the description of the Multiplexed Metropolis Light Transport implementation of pbrt it is claimed that "the inverse probability of choosing the current strategy $(s,t)$ [...] is equal to <...
0
votes
0answers
47 views

Weird Ray tracing artifacts when Code run on widows

I am trying to create a raytracer following peter shirley's in a weekend series. I am getting weird color distortion artifacts when I am running the code on windows. However, the code runs fine when ...
0
votes
0answers
37 views

How to display image from CUDA / What API to port my project to for real-time raytracing?

I started a raytracing project using the python numba library which provides a just-in-time compiler for CUDA kernels. When the scene is rendered my result is a 1920 x 1080 x 3 RGB array in GPU memory....
1
vote
0answers
89 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: ...
2
votes
2answers
75 views

Diffuse lighting calculations in ray-tracer

I am trying to write a ray-tracer. The lighting part is proving to work but not accurately. To debug I simplified the scene to a single sphere centered at the origin with a radius of 1 and a point ...
2
votes
1answer
57 views

Strange sphere reflection effects in ray tracing project. I cannot figure out what causes them

I started a ray tracing project in Python. I made a CUDA kernel and a trace() function for each pixel. It works perfectly when calculating intersections, shadows and lambert shading, however when I ...
4
votes
0answers
104 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/...
2
votes
0answers
97 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
133 views

GLSL Compute Shader doesn't run for large inputs

The shader takes an SSBO of Photons that have a position, direction, wavelength and intensity and each thread is responsible for tracing exactly one photon through the grid, where at each grid cell ...
1
vote
1answer
163 views

Regular voxel grids and RTX accelerated ray tracing

I've been looking to play with ray tracing, starting with a simplest of minecraft clones (making something more akin to cave game, for starter). I figured I'd define a voxel as a primitive and then ...
0
votes
1answer
50 views

Physically realistic received irradiance values given some BRDF?

I am trying to simulate the actual response of a camera given some object that is reflecting light. I've written a ray tracer, and have a BRDF that I need to use, and I have a camera sensitivity in ...
2
votes
1answer
78 views

Offline path tracer produces a darker image than expected

I've been going though Peter Shirley's beginner raytracing books. Upon building the Cornell box and rendering an image, I get a much darker / dimmer image than expected. The color values are ...
0
votes
0answers
44 views

Moving a sphere in a basic ray tracer

I have written a really basic ray tracer. It generates primary rays and sets the colour of the pixel to the colour of the object that I have set myself. The code for which can be seen below. ...
1
vote
0answers
44 views

Reddish tint with spectral renderer

I'm trying to implement a spectral path tracer and comparing results from my program with renders of the same scene done with pbrt and ...
5
votes
3answers
117 views

What is the purpose of the projected solid angle $dA^\perp$ term in the definition of Radiance?

In the definition of Radiance, which according to PBRT is defined as flux per unit solid angle $d\omega$ per unit projected area $dA^\perp$ $$L_i=\frac{d\Phi}{d\omega\ dA^\perp}$$ My original ...
1
vote
1answer
117 views

Tone Mapping in a physically based rendering ray tracer

I'm implementing a pbr ray tracer. Let's say that I'm at the end of the process: for each pixel pi, I accumulated the radiance value in vector pi = (radR, radG, radB). At this point, these values are ...
0
votes
0answers
68 views

Using octree for cheking intersection of ray and meshes

I wrote the code for checking intersection of ray and meshes on scene. It consist of two parts - broad phase and narrow phase. In broad phase I build an oriented bounding box around each mesh and ...
4
votes
1answer
142 views

Dealing with interpolated normals within a raytracer

I am trying to render a teapot within a simple raytracing that can handle reflection, refraction, and shadowing from point and directional lights. I am very confused about one detail of the raytracer ...
4
votes
1answer
128 views

Camera Model View transformation in Ray Tracing

I am implementing my own simple ray tracing and I came across some sort of confusion. When defining the verticies in the world I multiply them by the modelView transformation system (the matrix ...
2
votes
1answer
86 views

how many watts are in the SPD of the color white?

Please help. I'm trying to implement a ray tracer, going by the PBRT book and got stuck on an issue that I fail to find the answer to. My scenes are made from objects and light sources. From that, I ...
4
votes
0answers
124 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-...
3
votes
1answer
194 views

Why the ray tracing result looks weird?

I followed the book Ray Tracing in One Weekend and implemented a simple ray tracing procedure. There are 100 random samples every pixel for antialiasing, but the render result looks weird: There is a ...
-1
votes
1answer
101 views

Unsolved Problems in CQ to this day?

What problems haven't been solved yet when it comes for instance in rendering,deferred rendering, Volumetric lighting, ambient occlusion or in any other interesting area. When i say unsolved problems, ...
4
votes
1answer
108 views

Why is it easier to inverse transform every object in a scene than to transform a camera?

My lecturer for a computer graphics (raytracing) paper has stated that 'It is easier to apply the inverse transform to the world than it is to apply the transform to the camera.' The example given was ...
1
vote
1answer
154 views

smallpt: ray scattering and Importance Sampling

Introduction For those familiar with smallpt by Kevin Beason: In path tracing, when rays hit a surface, they are scattered and the theta angle (the angle between the normal to the surface and the ...
1
vote
1answer
96 views

smallpt: when to stop diffuse ray scattering

For those familiar with smallpt, the ray tracer in 99 lines: I am checking the code, and there is something that is not clear to me in the DIFFUSE ray scattering. After the rays are shot, they keep ...
5
votes
0answers
195 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 ...
1
vote
1answer
186 views

Monte Carlo Importance Sampling

I am following the "Ray Tracing - the Rest of your Life" book by Peter Shirley and I am facing some troubles in the implementation of Monte Carlo importance sampling, and Direct light sampling. Monte ...
0
votes
1answer
121 views

How to simulate a line laser diode?

I'm interested in simulating the way a laser line deforms when it strikes an object and runs along the surface of it. Which concepts would be involved? Is there any 3D modeling software out there that ...