Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

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.

5
votes
1answer
453 views

Register pressure in Compute Shader

I'm in the process of writing a Ray Tracer using DirectCompute / HLSL. First, eye rays are generated (one per pixel). Then, rays are traced, shaded and reflected in a loop. Also, shadow rays for each ...
8
votes
1answer
1k views

Path weight for direct light sampling

I originally wrote a pathtracer that just bounces by the BRDF and each sample is added to a buffer that divides by the current number of frames. Now I'd like to do next event estimation at each ...
6
votes
1answer
179 views

How to rasterize a line when the background color is not always white?

I've to rasterize a line taking into account not only the background color of the screen, which is white, but also the color of other objects in the scene. In my case, I've just another object, a ...
7
votes
2answers
2k views

Books to learn Ray Tracing [closed]

Recently I have developed and interest in Ray Tracing and like most computer graphics tutorials online there is nothing regarding implementation for a beginner like myself. So far I have only done ...
12
votes
3answers
6k views

How is Anti Aliasing Implemented in Ray Tracing?

After reading a few articles online I am can confidently say I am clueless on how Anti-Aliasing works when Ray Tracing. All I understand is that A Single Pixel/Ray is split into 4 sub-pixels and 4 ...
1
vote
3answers
251 views

How are the colors for each pixel from a Ray Tracer stored in an Image?

I have begun learning how to create a Ray Tracer and 1 thing I am confused about is how the pixel color from a Ray Tracer is stored into an image. Do we use SetPixel...
6
votes
2answers
209 views

Why if we rotate an object by R and then translate it with T, from the object perspective, we're actually applying $-T$ and then $-R$

I've been introduced to local coordinates in contrast to the global ones which I was used to work on, where we have basically the camera at the origin. For example, I've the following picture of a ...
8
votes
4answers
918 views

Should ideal specular multiply light colour with material colour?

Ideal specular reflection is like a perfect mirror. I'm looking at the code to SmallPt and see that one of the spheres has an ideal specular material: ...
5
votes
0answers
95 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 ...
6
votes
1answer
629 views

Is there a method to do ray marching style modulus repeat with raytracing?

One of the features of ray marching is that you can use modulus to repeat shapes infinitely, like in the image below, which is from https://www.shadertoy.com/view/MsBGW1 I was curious if there exists ...
4
votes
1answer
575 views

Solid angle and surface area values in (photometric) raytracing

So, I started writing my second raytracer - this time focusing on photometric rendering that uses IES lights and standard photometric units. I've got the basic raytracing up and running (using pure ...
5
votes
1answer
414 views

Ray tracing scene with 2 lights and sphere

I'm writing my implementation of ray tracer and I've got result which you can see at this image. So you can see that some dark parts are overlapping. And I have them even in the part where it should ...
5
votes
1answer
2k views

Controlling reflection and refraction with material properties in ray tracing

As tutors for this year’s programming languages course during our Computer Science studies we’re preparing for the students final project which is the implementation of a ray tracer. We’re ...
5
votes
1answer
131 views

Changing colors after raytracing

Intro Maxwell Render has a feature called multilight, where one can ray-trace a scene with multiple light sources, and change the brightness of the individual light sources afterwards. Luxrender has ...
7
votes
1answer
256 views

Ray casting in fan configuration produces point cloud with curvature, how to eliminate curvature?

I'm attempting to perform an intersection test using ray casting (not sure if correct term so please forgive me if not) and am outputting the intersections as a point cloud, and the point cloud shows ...
8
votes
1answer
394 views

Estimating the area of a triangle-circle intersection

I am trying to implement Ray Tracing with Cones (Amanatides 1984). Instead of rays, cones are shot into the scene and intersected with geometry. Since multiple triangles can occupy the cone's aperture,...
8
votes
2answers
1k views

Rendering equation - why unsolvable directly?

Why is the rendering equation, introduced by Kajiya in 1986, not solvable directly/analytically?
9
votes
2answers
331 views

Total emitted power of diffuse area light

I am reading the book Physically Based Rendering (Pharr, Humphreys). In the chapter on lights, they talk about approximating the total emitted power of different kinds of lights. For example, a point ...
4
votes
1answer
119 views

Components that can be used for 3d shadow analysis, sunhours of surfaces throughout the year in a 3d model?

I want to develop a component for 3d shadow analysis of 3d city model. I decided to use ray tracing for this purpose. For every time step (for sun's dynamic position during the year) rays will be sent ...
1
vote
1answer
81 views

How to convert image results into data?

I have made an 3d solar exposure analysis for a 3d city model that determines how long a surface receive direct sunlight throughout the year. Results are coloured surfaces and legend of coloures that ...
4
votes
2answers
226 views

What is the effect of the BRDF denominator?

I was reading a paper on BRDF. I've come across this formula : $$ f(\omega_i, \omega_o ) = \frac{FDG}{4(N.V)(N.L)}$$ The (N.L) term can be cancelled by the cosine term which appears in the rendering ...
6
votes
1answer
676 views

What effects does path tracing capture that recursive ray tracing does not?

So I have been wanting to make a rendering engine as a summer project. I'd like to shoot for photo-realism of static scenes rather than real time dynamic game like graphics. So in my research I came ...
7
votes
5answers
309 views

Why does the 1/r² term appear with point sources?

I'm currently reading some books on radiometry. They mention that radiance is constant along a ray. It doesn't change with distance. However, I've seen some raytracer and they put the 1/r² factor when ...
8
votes
1answer
681 views

How does everyone count “Rays per Second”?

Recently I'm developing a Monte-Carlo path tracer. To measure my tracer's performance, I decided to implement a simple mechanism to count how many rays can it trace in a second. Then here comes the ...
6
votes
1answer
668 views

How to implement Constructive Solid Geometry in ray tracing with implicit surfaces (spheres)?

What I'm trying to do is to simulate refraction through biconcave lens described by spheres A, B, ...
1
vote
1answer
118 views

How can I resize a rendered ray traced image?

Say I have rendered an HDR ray traced image with dimensions 1920x1080 (width x height) pixels and I want to instead represent it with dimensions 960x540. Assume as well that the image has not yet been ...
3
votes
0answers
148 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, ...
3
votes
1answer
398 views

Ray-tracing the Cornell Box results in really inconsistent image

So I have a vector of glm::vec3 containing the triangles for the classic Cornell Box called triangles. The Draw method casts a ray for each pixel on the screen and ...
4
votes
2answers
405 views

Could we dispense the near clipping plane?

Would it be, at least theoretically, possible to render without a near clipping plane? Could raytracing ignore this perchance? Quite many budding 3d artists have a WTF moment the first time they ...
3
votes
1answer
391 views

phong equation of illumination specular component

I'm stuck on this question asking me to calculate the intensity of a pixel using Ray Tracing. It gives values such as $I_i$ but doesn't give any coordinates. I know for the diffuse component, $...
5
votes
1answer
554 views

How to convert Non-Axis Aligned Bounding Boxes to AABB

I am trying to write a ray tracer to render boxes that are arbitrarily rotated, i.e. not necessarily axis aligned. While I am reasonably comfortable ray tracing axis-aligned bounding boxes (AABB), I ...
10
votes
2answers
3k views

Cause of shadow acne

I know how shadow mapping works but I am not getting the cause of shadow acne! Can anyone tell me cause of shadow acne in a simple way and how is it related to depth map resolution?
21
votes
1answer
2k views

Anti-aliasing / Filtering in Ray Tracing

In ray tracing / path tracing, one of the simplest way to anti-alias the image is to supersample the pixel values and average the results. IE. instead of shooting every sample through the center of ...
8
votes
2answers
413 views

Raytracing Problem - Casting Shadows

So I was tasked to create a model of the Cornell Box. I've managed to do everything up until casting shadows, in which case some shadows are cast when there should not be any. Here are pictures of ...
7
votes
2answers
1k views

Ray tracing with thin lens camera

I'm reading Cook's paper "Stochastic Sampling and Distributed Ray Tracing", I don't understand how the rays are generated. He says: Determine the focal point by constructing a ray from the eye ...
4
votes
2answers
782 views

How to determine the object-to-world matrix

I want to ray trace a triangular mesh that I load from a file. The vertices' coordinates are expressed in the reference frame associated with the object (i.e the mesh) and I don't know the object-to-...
1
vote
1answer
412 views

Ray tracing - tangent space for a point on a sphere

In a ray tracer, given a point on a sphere (point_of_intersection with a ray) and its normal for that point (point_of_intersection - center_of_sphere) how do I calculate the tangent space for that ...
3
votes
1answer
535 views

Shadow appears to be too dark in my ray tracer

I'm currently working working on a unbiased path tracer. To test how accurate it is. I created a scene in my path tracer and LuxRender then compare the rendered image. I found that the shadow in the ...
6
votes
2answers
168 views

Low Pass filtering

Is it possible that low pass filtering can be applied to Ray tracing ? My guess is that since after the algorithm runs we have an image then low pass filtering helps in order to prevent aliasing ...
6
votes
1answer
217 views

Ray tracing - BRDF using Cornell measured spectral data

I wrote a ray tracer that implements various BRDF models (Oren Nayar, Lamber, Torrance Sparrow and so on). Now I'm trying to implement a BRDF from measured data. I choose the Cornell database data ...
1
vote
2answers
504 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 ...
5
votes
1answer
393 views

Methods for grid traversal in a glsl pixel shader?

I'm working on a shadertoy "snake" game, using the new multi pass rendering abilities to save game state between frames. I'm using raytracing to render the board (an AABB), and am planning on using ...
7
votes
1answer
492 views

How to implement a realtime 2D light renderer with fog/colored light on the GPU?

Since long ago I wanted to implement a 2D lightning algorithm based on an idea I saw on YouTube. The video is realtime, but it runs on the CPU and the resolution is pretty low. I'm curious if anyone ...
4
votes
1answer
571 views

Ray tracing pseudocode shadow

I dont understand the if(depth>MAX)return Black part. Is it something to do with shadows because in other algorithms they shoot a shadow ray towards the light source to check for shadows but they dont ...
9
votes
1answer
148 views

Sphere intersection occlusion (for hybrid raytracing)

Thinking about hybrid raytracing, hence the following question: Suppose I have two solid spheres $s_1$ and $s_2$. We know their centres and radii, and we know that they have some overlapping volume ...
6
votes
1answer
958 views

BRDF and Spherical coordinate in ray tracing

I developed a ray tracer that use standard phong/blinn phong lighting model. Now I'm modifying it to support physically based rendering, so I'm implementing various BRDF models. At the moment I'm ...
7
votes
1answer
399 views

The meaning of early ray termination and front-to-back traversal in ray tracing

I'm new to computer graphics. These days I've been trying to understand how ray tracing using an acceleration data structure works. I came across the term "early ray termination" several times, I ...
5
votes
1answer
821 views

Ray-triangle intersection algorithm not intersecting (C++)

I've been trying to implement the Moller-Trumbore ray-triangle intersection algorithm in my raytracing code. The code is supposed to read in a mesh and light sources, fire off rays from the light ...
6
votes
1answer
3k views

Shadow rays in Raytracing

After spending a few days making very little headway with a simple Raytracing program that implements Phong illumination (with shadows and no attenuation), I'm convinced I've made a logic error that I'...
15
votes
3answers
2k views

What's the current state-of-the-art algorithm for ray-tracing height-fields?

There have been lots of papers over the years on different techniques for drawing height-field terrain in a ray-tracer. Some algorithms ray-march the grid directly (or via a quadtree); others ...