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
2
votes
2answers
50 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 ...
0
votes
0answers
25 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
65 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
1answer
717 views

Is back-face culling considered a technique/optimization of ray tracing?

I've stumbled upon this question on a CG exam: Which of the following techniques/optimizations doesn't apply to ray tracing? A: Back-face culling B: "Shadow-feeler" rays C: Recursive ...
1
vote
1answer
46 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
57 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/...
5
votes
3answers
95 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 ...
2
votes
0answers
71 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. ...
1
vote
1answer
80 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 ...
2
votes
1answer
100 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 ...
0
votes
1answer
33 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 ...
4
votes
2answers
201 views

Defocus blur: Computing the pixel plane distance

I'm following Peter Shirley book, Ray tracing in one weekend. In the last chapter, he talks about how to make defocus blur by using thin len approximation. His camera class accepts a parameter called ...
2
votes
1answer
61 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
40 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
38 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 ...
1
vote
1answer
90 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
55 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
0answers
109 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
1answer
73 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
98 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 ...
4
votes
1answer
101 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 ...
0
votes
1answer
404 views

OpenCL ray tracer: which is better, geometry code on device side or on host side?

I am writing a ray tracer using openCL, and following this tutorial http://raytracey.blogspot.com/2016/11/opencl-path-tracing-tutorial-2-path.html However, I find that the author has two copies of the ...
0
votes
1answer
117 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 ...
2
votes
1answer
70 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 ...
3
votes
1answer
141 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
95 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, ...
0
votes
1answer
115 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
92 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
160 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 ...
0
votes
1answer
138 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 ...
-1
votes
2answers
111 views

What is a list of common, cheap, real time rendering algorithms?

I am well aware of the existence of Blinn-Phong shading, which is a great tool when you are doing, for example, modelling algorithms and wan't to focus on the model. In this case a full BRDF result, ...
0
votes
1answer
84 views

Ray tracing the next week: understanding Instances

My question is not about the code, but it's about the approach used by the author Peter Shirley (and apparently common practice in ray tracers) of handling Instances. To understand the question it's ...
0
votes
1answer
149 views

Ray tracing in One weeked: issue with metal reflection

Problem I am following the book Ray tracing in one weekend , and I got stuck after the implementation of the material Metal. I checked my code many times, and it looks exactly like the code ...
1
vote
1answer
417 views

Get intersection Ray with square

I have a class Ray and Square public class Rayo { public Point origen; public Vector direction; Square{ X,Y,Widht, height; } I need intersection between this ...
0
votes
2answers
129 views

How to set equivalent PDFs for cosine-weighted and uniform-sampled hemispheres?

I'm trying to add BRDFs to a very basic path tracer. Starting out, I'd like to convert just the Lambertian material, with two different sampling methods, to ensure that everything is working right. ...
2
votes
1answer
99 views

Rendering Equation for photons carrying flux

I am trying to understand the mathematical/physical foundations of photon mapping better. In the forward photon tracing step it is established, that the rays are carrying portions of total power (...
1
vote
3answers
339 views

How to calculate ray

In ray-tracing technique critical point is to calculate rays which came out from eye $E$ to target $T$ through pixel $P_{ij}$ on viewport. The "viewport" is represented as rectangle divided to square ...
2
votes
1answer
226 views

Bump mapping with triangles and height maps

I'm trying to add bump mapping to my ray tracer, and I'm currently struggling to add bump mapping to it, as I don't seem to get the transformations from texture space to world space correctly. I have ...
2
votes
1answer
239 views

How do I convert a hit on an infinite plane to UV coordinates for texturing in a Raytracer?

I am trying to convert a ray hit on an infinite plane, defined by an origin and a normal vector, into UV coordinates, so I can find the appropriate texel at that point. Code I have is close to ...
5
votes
2answers
204 views

Radiance at a nearly perpendicular angle is almost infinite?

As far as I understand, radiance is a measure of the "intensity" of light in a direction defined as a differential cone . It's measure is Flux per solid angle per projected area. $L = \frac{d\Phi}{d\...
0
votes
1answer
148 views

Where should the ray origin be put in perspective camera ray tracing?

Where should the ray origin be put in perspective camera ray tracing? The following gives a picture of the ray tracing in the perspective camera setting: http://www.cs.cornell.edu/courses/cs4620/...
6
votes
1answer
113 views

“Artist Friendly Metallic Fresnel” reversible?

While implementing the "Artist Friendly Metallic Fresnel" paper by Ole Gulbrandsen (http://jcgt.org/published/0003/04/03/paper.pdf), I read that it is fully reversible: (section 2.3.2): for all r,g ...
2
votes
2answers
85 views

Writing data to a shader resource at runtime in DX12

I'm hoping to port my existing toy raytracer to a window so that I can see samples accumulate over time. And then port over to Pixar's pmj02: https://graphics.pixar.com/library/...
4
votes
1answer
192 views

High variance in path tracing specular objects

I'm testing my path tracer for specular surfaces. Images rendered with my own code have very noisy appearance, and I think they look like variance. I use point light and the bunny is of mirror ...
0
votes
0answers
22 views

How to rotate camera in CAD package application

I can rotate camera to change the view for the first person. But as I am working on a camera object for a cad package this isn't a first person or walk-through. I am not sure how to rotate the camera ...
4
votes
0answers
276 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 ...
1
vote
1answer
161 views

How does Primary Sample Space Metropolis Light Transport work?

For simplicity, assume we're only dealing with surfaces which have either a Lambertian or perfectly specular material. Morever, assume that the only type of lights are area lights (i.e. surfaces with ...
9
votes
1answer
3k views

Raytracing: why are the spheres in the image below appear stretched?

Some context. Above are the code and the resulting image for it in Peter Shirley's Raytracing in one weekend's book. As you can see from the code, he adds in some spheres. And yet in the final image ...
5
votes
0answers
156 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 ...
3
votes
1answer
110 views

why doesn't a ray hitting a sphere at only 1 point count as a hit in sphere/ray intersection?

To give context to the question, I am reading Peter Shirley's Ray Tracing in one weekend. In his code for sphere/ray intersection, when the quadratic formula returns only 1 solution, he discards it, ...