Skip to main content

# 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.

457 questions
Filter by
Sorted by
Tagged with
1 vote
1 answer
35 views

### When to apply backface culling, depending on the ray and material type?

I am currently implementing a ray tracer, which supports reflection and refraction. I have the following types of rays: camera rays shadow rays reflection rays refraction rays I have the following ...
0 votes
0 answers
20 views

### Reverse path tracing implementation trouble

I'm trying to implement reverse path tracing (paths starting from the light source) using the math outlined in Veach's thesis where t = 1, aka paths with only one vertex for the eye. For simplicity, I'...
• 1
0 votes
2 answers
52 views

### Overweighting certain lights with ray tracing

I'm just getting started with ray tracing with DXR and I'm building some simple lighting with it. I've run into a slight issue; namely, that my game is set in space. Therefore the vast majority of all ...
• 123
1 vote
0 answers
62 views

### How is this transmittance derived?

In PBRT 4ed https://www.pbr-book.org/4ed/Volume_Scattering/Transmittance#eq:volume-attenuation-differential How is this transmittance equation transformed from 11.9 to 11.10? \int_0^d ...
• 11
0 votes
0 answers
30 views

### Why am I getting darker results in RGB grid volume rendering?

I am rendering an RGB volume. The volume is 4D: (X, Y, Z, D), with D = 3 (RGB values). Previously I am able to render the mono-chromatic volume, using exact the same idea presented in pbr-book: ...
• 1,142
3 votes
1 answer
120 views

### How to have caustics at all in a path tracer with next event estimation?

When doing next event estimation, you trace a shadow ray to a light source to test visibility. What if there's a glass/transmissive object in the way? The light will be occluded and we won't get any ...
• 207
1 vote
1 answer
54 views

### Multiple Importance Sampling BSDF + Light - weights confusion with the number of emissive triangles

I'm trying to implement multiple importance sampling for direct lighting estimation but I'm having a hard time understanding why adding the number of triangles to the PDF of my light sample yields ...
• 207
2 votes
1 answer
78 views

### How is Shader Execution Reordering implemented under the hood?

I am writing a software path tracer from scratch in CUDA (for learning purposes, without resorting to any higher-level graphics API like OptiX), and it is well-known that path tracing can have ...
• 1,142
0 votes
1 answer
97 views

### How does ray tracing handle the calculation of reflections and shadows in the presence of multiple translucent objects?

Raytracing can handle the interaction between light and multiple translucent objects in a scene by using global illumination and raytracing with volumetric effects to calculate the color of the object ...
• 103
2 votes
1 answer
61 views

### Direct Light Sampling produces way too bright images compared to naive diffuse bounces only

it's me again! :D I have finally implemented area lights, but without modifying the emission value of the material, this is what it looks like with indirect light only, this is what it looks like with ...
• 23
1 vote
1 answer
99 views

### Why is my ray tracer not accelerated by CUDA?

Summary: I ported a simple path tracer smallpt into CUDA but the performance doesn't boost. reproduce results: build and run the CPU version: ...
• 183
3 votes
1 answer
91 views

### Why is the z coordinate simply set to 1 for setting up direction of a ray in ray marching

I’ve recently gotten into shader art , using sites like shadertoy and various tutorials for getting started. One thing I noticed is that a typical setup involves ray marching whereby: We set a ...
• 133
2 votes
0 answers
100 views

### Multiple importance sampling with Next Event Estimation gathers less energy compared to One-sample-model

I'm developing a webgpu pathtracer using multiple importance sampling with two similiar techniques, next event estimation and one-sample model. For some reason, next event estimation seems to gather ...
• 31
0 votes
1 answer
82 views

### Point light source radiance

I was reading Deriving radiance from irradiance and intensity and the last comment said that by dividing $r^2$ we convert radiant intensity to irradiance. What confuses me then is the fact that for ...
• 3
0 votes
1 answer
121 views

### Forward path tracing versus backward path tracing. How may I achieve realistic shading in forward path tracing?

I have a forward path tracer. Essentially, it looks flat: This is the backward path tracer in comparison: My question is: How do I get pseudorandom lighting like with the backward path tracer, when ...
0 votes
0 answers
38 views

### Is there a way to force a closest hit shader?

I want to add a debug feature to my ray tracer (runs in both Vulkan and OptiX). For that, I'd like to switch all objects to use a specific closest hit shader. Can I do this? I have only found the ...
• 1,566
0 votes
0 answers
53 views

• 101
0 votes
1 answer
40 views

### Can raytracing be used to determine a certain gas distribution in a real planet's atmosphere?

I want to calculate the capacity that the planet Mars has regarding protecting against UV-light for a final project I will be doing my last year in upper secondary school. UV-light is mainly absorbed ...
1 vote
1 answer
408 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): ...
1 vote
1 answer
141 views

### What is out-of-core raytracing?

I just stumbled upon this "out-of-core" term and tried to see what it is about. There are a few papers and even a few questions talking about it here at computergraphics.stackexchange, but I ...
• 1,566
0 votes
2 answers
149 views

### Where does sin(theta) go in estimators of The Rendering Equation?

Consider this equation, where we have a surface integral over hemisphere with Lambertian BRDF and cos(theta) from The Rendering Equation:  \int_{0}^{2\pi}\int_{0}^{\frac{\pi}{2}}\frac{albedo}{\pi}...
• 125
0 votes
0 answers
131 views

### Defining ray direction vector

Here I try to combine scratchapixel's articles to understand the operation of the camera-to-world matrix and ray direction vector. Here https://www.scratchapixel.com/lessons/3d-basic-rendering/ray-...
1 vote
0 answers
68 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)...
• 111
1 vote
0 answers
67 views

• 183
0 votes
2 answers
146 views

### Porting from DXR/HLSL to Vulkan Ray Tracing Extension/GLSL

I am working on the port of a demo from DXR to Vulkan Ray Tracing extension using GLSL. In DXR/HLSL space, there are RayTMin() and RayTCurrent() functions to retrieve the starting and the current end ...
• 309
1 vote
1 answer
134 views

### Missing triangles when rendering with BVH

I'm writing a software ray-tracer. I implemented a BVH structure (octree, actually) and traverse algorithm, but when I use it I get missing triangles. These are the facts that I have: Rendering ...
• 111