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

230 questions
125 views

### Troubleshoot half vector sampling from a distribution (cook-torrence, trowbridge-reitz, etc)

I am learning ray tracing and the mathematics behind it. I have a working monte-carlo raytracer I am experimenting on. I have gotten past pure diffuse BRDFS, area lights, acceleration structures, ...
240 views

### Russian Roulette - Maximum call stack size exceeded

I am trying to write my own path tracer in JavaScript, but I have a problem with the implementation of russian roulette. First, let me describe how my path tracer works. I have a function called ...
497 views

### Subsurface Scattering Without Rays?

Some games claim to use subsurface scattering but my current understanding of sss is only achieved with ray tracing. How would you sub surface scatter without ray tracing? Do some claim to use sss but ...
518 views

By using smooth shading (i.e. interpolation of normals), an object can have a smooth look despite low polygon count. A nasty artifact that can happen when casting shadow rays is the Shadow Line ...
316 views

### Can somebody explain this Ray Tracing Function?

I am currently reading through Peter Shirley's Ray Tracing in One Weekend. In the beginning chapters where the author introduces diffuse surfaces we a presented with this function: ...
336 views

### How do I implement object picking, using OBB in OpenGL?

I am trying to make 3D drawing software. I wanted to have the drag feature so I am using object picking using the OBB algorithm. I am facing problems in understanding the algorithm, and my ...
112 views

### Amount of light reaching the sensor of pinhole camera model

Consider hypothetical camera with pinhole (in mathematical sense) lens and is sensor, like in below image. Is it the case that the central region of the sensor will receive more light (pixels will be ...
589 views

### More accurate Fresnel approximation for a RGB-based Path Tracer

I'm writing a path tracer and, for the moment, spectra related data (spectral power distributions and spectral reflectance curves) are stored as RGB tuples. In the Cook-Torrance specular BRDF I am ...
445 views

### Efficiently sampling specific surfaces using MIS in path tracing

Apologies for posting two questions in one post, but as they are relevant I kept them in one. Question 1 In the definition of multi sample estimator that Veach has defined, the integrand is the same ...
89 views

### What's a “texel coordinate”?

So I'm reading some Ray-Sphere interaction codes and in one there was "texCoord", which I think means "texel coordinate". However, what does this refer to "visually"?
198 views

### What's the concept of “Ray” really?

I'm learning Ray Tracing using this MIT tutorial. I've heard Ray Tracing only in the context of lighting. I.e. I understand that ray casting is used to light an object that has been already drawn. ...
406 views

### How to handle a parametric equation in raytracing?

After taking a look at the Mobius strip, I noticed its equation is really simple and tried to add it into my Raytracer. I tried a "naive" way by simply generating N...
153 views

### How to send shadow rays to window light source with glazing

For rendering an indoor scene where light source is skylight coming in through the window opening, one can consider the window polyline as the light source, with the sky distribution, in direct ...
116 views

103 views

### How to use my Ray Tracer in 3DS Max

If I want to use my own Ray Tracer in a program like 3DS Max to render geometry, how could I do this? Can someone explain to me what I need to do and where I can learn to use an SDK to make this ...
135 views

### Picking multiple light sources from a mixture densities

According to Peter Shirely paper, one pdf(probability density function) can be defined for the union of the light sources and pick only one using a random number from this density: p(x) = \alpha_1 ...
336 views

### Energy Conservation in Lighting Equation

I am currently making a Ray-tracer as a personal project. My lighting equation looks like this ...
234 views

### Sending shadow rays to the sun

How is sun modelled for ray tracing rendering? Is it part of the scene, like a sphere with a centre in some far location or it is just considered as a point? Also regarding sending shadow rays to the ...
281 views

### How to adapt diffuse/GI light mapper to directional light maps?

I have a working light mapper that captures global illumination. I evaluate a hemisphere when collecting the data and store the result in the texel. However, I want to support directional lightmaps so ...
875 views

234 views

### Particle & Fluid Simulation: Where to learn? [closed]

Where can I learn about particle and fluid simulation? Is there a good book available? I want to couple volume rendering with fluid/particle simulation to be able to finally render smoke and ocean ...
2k views

### Mirror Reflections: Ray Tracing or Rasterisation?

Are mirror-like reflections in computer graphics purely handled with ray-tracing/ray-casting techniques or are there some situations where they are achieved through rasterisation?
200 views

### Is there a difference between window and screen in computer graphics?

I've been reading some code which setups a ray tracer and I've realized I've a doubt regarding what's a screen and what's a window in this context. Here's the relevant code using Qt: ...
588 views

### Is there a way to do sphere caustics analytically?

I have a Shadertoy which renders the image below using ray tracing. I'd like to add caustics, but am aware that in general they are a hard solution, especially without bidirectional ray tracing or ...
364 views

### Challenges of Offline Rendering

What are some of the challenges of Offline Rendering? I know one problem that is faced is performance and rendering times, are there any more issues? Path Traced photos seem to have reached the ...
420 views

### How to properly direct light sample GGX in path tracing

I have been trying to implement the GGX shader in my path tracer based on this paper: Microfacet Models for Refraction through Rough Surfaces It's pretty clear how the importance sampling works, but I ...
2k views

### Screen to World coordinates glm::unProject

I'm having some trouble trying to figure out how to go from a coordinate on the screen, to 3D world coordinates on a plane. My case is as seen on the picture further down. World origin is in the ...
631 views

### How to handle specular highlights with reflection / total internal reflection in a ray tracer?

Let's say that I have a raytracer that is rendering a scene that includes a refractive object. When a ray hits the refractive object, I know that I can use the fresnel equation (Schlick's ...
617 views

### Mimicking Blender's “roughness” in my path tracer

Recently I asked a question regarding how to mix a glossy and diffuse shader in my path tracer: Mix shader looks wrong on my path tracer. I thought it was incorrect, but a comparison between mine and ...
176 views

### Mix shader looks wrong on my path tracer

I apologize if my methods seem way off because this is my first time trying to build a path tracer and I'm struggling quite a bit. Currently, I am trying to mimic the "mix shader" node in Blender 3D ...
543 views

### Do animation studios like Pixar, Dreamworks, and Disney use super-sampling?

Does any of their rendering techniques involve rendering an area at a higher resolution just to scale it down in order to mitigate artifacts? I know they use ray methods rather than rasterization ...
167 views

### How to generate a 360 degre video

Using my raytracing engine, I'd like to generate a 360 degree video which could then be uploaded on Youtube. By looking on the internet, I couldn't find any specific details about how to do so. I am ...
565 views

### Skybox in a Ray Tracer

I have implemented a sky rendering model in my ray tracer which saves the color of the sky to an image. I was wondering how I can render the sky dome and texture map the image on to it. Do I render ...
283 views

### Storing 3D animations for ray tracing

I've just finished writing a path tracer that takes OBJ files and renders it. This is convenient for still images, but my end goal was to export a sequence from a 3D application (Blender was what I ...
3k views

### Path tracing the Cook-Torrance BRDF

-- Sorry for the long post, but I prefer to do that way because "Devil is in the details." :) I am writing a path tracer from the scratch and it is working nicely for perfectly diffuse (Lambertian) ...
220 views

### Sampling against geometry normals

I am writing a basic raytracer and have implemented normal maps. However, when using normal maps, sometimes the rays generated are opposite to the surface's geometry normal, so that the rays are ...
303 views

### Ocean Wave Rendering

How could I generate the waves for a water body with whitecaps & foam and variable intensity of the waves? Is the surface a mesh with a normal map? Is there a formula for generating that? Is there ...
1k views

### Area Lights in Path Tracing

I have been following the scratchapixel ray tracing tutorials online which have been great at explaining the theory behind everything & how to implement it. However, I reached the point where I ...
112 views

### How is glint rendering done in Ray Tracing?

How is glint rendering done with ray tracing in the photo below? Is it just a simple normal map? I found a paper online that describes the exact same method used in the photo above but I have no ...