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

Ray Tracing in Camera-World Space

I am trying to implement rendering in "Camera-World" space following PBRT-V4's camera implementation in my Rust ray tracer. I Have been trying to solve that for days I read these multiple ...
0 votes
0 answers
28 views

Confusion about different sampling strategies in Monte Carlo Path Tracing

I am studying Monte Carlo Path Tracing from different sources. However, I have some confusion about the sampling part and dare to post here for experts' ...
15 votes
2 answers
684 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 ...
2 votes
1 answer
116 views

How to properly use the BRDF from glTF 2.0 specification in path tracing while using metallic/roughness materials?

I've built a renderer which should render glTF materials, as they are defined in their specification. So I should be able to render satisfying (similar to Cycles and Ospray) results just from the base ...
4 votes
2 answers
192 views

cosine term in rendering equation

Rendering equation's value can be estimated with Monte Carlo (Physically Based Rendering: Light Transport I: Surface Reflection): $\begin{equation} \begin{split} L_o(p, \omega_o) &= \int_{S^2}f(p, ...
0 votes
1 answer
66 views

How to imlement the Phong BRDF

I'm really sure that this question was asked before, and I found some code snippets by searching this via google. Unfortunately these snippets are in openGL or some other high level computer graphics ...
2 votes
1 answer
151 views

How is Aperture and Pixel Size accounted for in calculating received power using ray tracing?

NOTE: Deleting the question to rephrase it after continuing to read other responses and toy around with it: I've written a path tracer and am now working on implementing a physically accurate way of ...
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 ...
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 ...
1 vote
1 answer
88 views

Why doesn't using depth biasing to fix shadow acne result in an even bigger problem?

I am currently reading the Ray Tracing in One Weekend tutorial (link), and I am dubious about their fix for shadow acne, which is to ignore ray-geometry intersections that occur at very small times. ...
1 vote
3 answers
102 views

How to calculate the radiance of the reflected light ray using the Blin Phong BRDF

to get the radiance of the Lambertian diffuse reflected light, I have to multiply the constant pdf (rho/pi) with the incoming intensity I0*cos(theta_i), where cos(theta_i) is given by the scalar ...
0 votes
1 answer
101 views

Am I creating my raygeneration shader correctly

Hi I want to create a ray generation shader which traces rays inside a box frustum given by an Orthographic projection matrix(XMMatrixOrthographicLH) I use the following ray generation shader code: <...
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): ...
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 ...
0 votes
0 answers
55 views

Precision errors with raytracing normal

I'm writing a raytracer in Java that draws a scene containing the elliptic paraboloid defined by the equation $F(x,y,z)=x^2+z^2-y=0$, as well as the hyperbolic paraboloid defined by $G(x,y,z)=x^2-z^2-...
0 votes
1 answer
36 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 ...
2 votes
2 answers
244 views

Properties of the image reconstruction filter in rendering

Let $f$ denote the measurement contribution function for paths of length $k\in\mathbb N$, i.e. $$f(x)=g(x_0\leftrightarrow x_1)W_{\text e}(x_1\to x_0)t_k(x_0,\ldots,x_k)L_{\text e}(x_k\to x_{k-1}),$$ ...
0 votes
2 answers
353 views

mapping of a point from a sphere into UV plane

I am reading the book An introduction to raytracing by Eric Haines and it mentions an algorithm to map a point from a sphere into a UV plane, it calls it Inverse Spherical Mapping (page 49). I googled ...
1 vote
1 answer
104 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 ...
0 votes
1 answer
294 views

Raytracing in OpenGL or Vulkan?

I was looking at this glass ball rendering with an image inside of it (zoom out to see the glass ball), and noticed that it looks like they simulate the refraction of light as it crosses from inside ...
0 votes
2 answers
125 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}...
0 votes
0 answers
69 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
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)...
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)...
0 votes
0 answers
61 views

How many rays can one RT core calculate simultaneously?

I have noticed that all GeForce RTX cards, without exception, have an equal number of RT cores as they have streaming multiprocessors (SM). From this fact I assume that each RT core is associated with ...
2 votes
1 answer
114 views

Problem with Corrupted Pixel/color data on bitmap image in Raytracer

I'm following this book, Computer Graphics from scratch: A programmer's introduction to 3D rendering, to build a simple raytracer and rendering the scene to a bitmap image. I've run into a problem ...
0 votes
0 answers
45 views

Raytracing Diffuse Function not Working as Expected

I am trying to write a raytracing renderer using compute shaders in Metal. My implementation is based off of Peter Shirley's Raytracing in One Weekend: https://raytracing.github.io/books/...
1 vote
2 answers
231 views

Applying Phong illumination to a colored surface

The formula for Phong illumination as given on Wikipedia (see there for the variable definitions) is: $$I_\text{p} = k_\text{a} i_\text{a} + \sum_{m\;\in\;\text{lights}} (k_\text{d} (\hat{L}_m \cdot \...
0 votes
0 answers
58 views

Calculating world coordinates of a pixel from a camera picture

Sorry for this question. I know there are many similar questions but I really know nothing about math that involves this case. I have a picture taken from a camera. I know some information about this ...
1 vote
1 answer
252 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
0 answers
87 views

Ray light color at distance

I am obviously not understanding something related to light for a ray tracer. Reading Spectral representation and Point light calculation A bit of a context: My question is: in room at X degrees ...
2 votes
1 answer
277 views

How does Unreal Engine 5's Lumen (most likely) implement reflections?

In this YouTube video, the creator mentions that reflections in Unreal Engine 5's Lumen "work by tracing the path of light as it bounces off of surfaces in the game world." Does this mean ...
1 vote
1 answer
95 views

How to compute discrete partial derivatives in 3D

I'm supposed to compute partial derivatives for 3D volume rendering (in ray tracing). I'm bad at math and so I can't understand what $f$ is in my case. In reviewing examples, I'm seeing the $f$ ...
1 vote
1 answer
68 views

convert right handed matrix into left handed forward/up/right vectors

I have an openGL style matrix (column major, right handed ) that needs to be converted into two vectors (forward and up) I've managed to find, in a weird way, a solution that matches the the ...
0 votes
2 answers
98 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 ...
0 votes
0 answers
40 views

Is the scene being drawn correctly with my raytracer?

I have a ray tracer that I wrote myself. I am not sure that the scene is being drawn correctly, to be more precise, are my reflections on the floor and on the sphere correct? My scene: ...
2 votes
2 answers
127 views

Glowing objects in a raytracer? How it works?

My raytracer has a point light source, it works as it should, illuminates the scene, but there is a problem, it is not visible, I would like to add glowing objects to the raytracer, for example a ...
4 votes
1 answer
2k views

Deriving radiance from irradiance and intensity

I'm reading PBRT and am stuck in chapter 5.4 about radiometry. In particular: We define the irradiance as the average density flux arriving at a surface with units $\frac{W}{m^2}$. So for a point ...
1 vote
1 answer
126 views

Converting points, vectors, normals between world and object space for a ray tracer gives weird results

I'm writing a ray tracer but having trouble converting rays and normals between world space and object space. I am creating a Ray, then transforming it with transformation matrices, calculating ...
3 votes
2 answers
329 views

ray-box intersection

I've searched everywhere for an equation that suits my needs but i couldn't find anything useful. I'm making a voxel ray-tracer so I need an equation that gets me the intersection of a ray with a box, ...
1 vote
1 answer
93 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 ...
1 vote
1 answer
98 views

Rendering equation integration variable change

I'm watching the TU Wien rendering lectures in the course we were presented with a rendering equation (first one on the screenshot) and then another, which results from a change of variables (if I ...
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. ...
0 votes
0 answers
104 views

PBRT: why normalize ray's direction

In PBRT Chapter Camera Model, when describing Camera::GenerateRay(), it writes It is important that the direction component of the returned ray be normalized—many ...
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: ...
0 votes
0 answers
81 views

Trouble getting a raytracer camera representation for different aspect ratios

I am trying to make my camera representation work for images whose aspect ratio isn't 1 (640x480, 1920x1080...), but I am having some trouble getting it to work. The camera model is pretty simple, as ...
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 ...
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 ...
0 votes
0 answers
51 views

Tracing conic surface through voxel grid

I have a voxel grid and a conic surface (hollow cone) placed in the grid. I want to know which voxels intersect with the cone surface and how much. So far I have tried sampling points on the conic ...
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 ...

1
2 3 4 5
9