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.

4
votes
1answer
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, ...
4
votes
1answer
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 ...
8
votes
1answer
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 ...
6
votes
1answer
518 views

Ray Tracing Shadows: The Shadow Line Artifact

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 ...
2
votes
2answers
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: ...
1
vote
1answer
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 ...
6
votes
1answer
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 ...
8
votes
0answers
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 ...
4
votes
1answer
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 ...
3
votes
1answer
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"?
3
votes
3answers
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. ...
8
votes
2answers
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...
4
votes
1answer
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 ...
4
votes
1answer
116 views

In Ray-Sphere intersection is $b=2*(O-C) \cdot dirv$?

In Ray-Sphere intersection is $b=2*(O-C) \cdot dirv$? Where $dirv$ is the Ray direction vector. $O$ is origin and $C$ is center of the sphere. I've also seen this without the $2$, i.e. $b=(O-C)\cdot ...
7
votes
1answer
346 views

How Sunlight is added in Bidirectional Path tracing?

How is distant directional light source(like sun) added in BDPT? If this is an indoor scene that gets sunlight through windows, how is this handled in BDPT(other than to consider Sun as a big disc far ...
1
vote
1answer
371 views

How to get Ray Tracer working in Visual Studio

Right now I am reading Peter Shirley's Ray Tracing in One Weekend book, I want to be able to use the provided source code but I am not sure what platform or IDE it was written on, because of this it ...
1
vote
1answer
99 views

Acceleration techniques for CPU soft-shadow calculation in light mapper

My light mapper can generate soft shadows just fine - for each texel I cast a ray to the light, offset by some distribution of the 'area' of the light on disc. The problem is that I am casting many ...
6
votes
2answers
170 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\...
3
votes
1answer
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 ...
2
votes
0answers
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 ...
1
vote
1answer
336 views

Energy Conservation in Lighting Equation

I am currently making a Ray-tracer as a personal project. My lighting equation looks like this ...
4
votes
3answers
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 ...
4
votes
2answers
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 ...
7
votes
0answers
875 views

Bump mapping a ray-traced sphere

I'm attempting to apply a height map to a ray-traced sphere. The height map is stored as a texture. I have the intersection point on the sphere $p$, and I compute the normal vector at that point $N = ...
4
votes
2answers
563 views

Generation of stratified cosine weighted samples on hemisphere

I have had luck with cosine weighted hemisphere samples, and I know how to generate stratified uniform samples, but I wanted to experiment with combining the two. However, how do I correctly stratify ...
11
votes
1answer
2k views

Does cosine weighted hemisphere sampling still require NdotL when calculating contribution for indirect light?

When converting from uniform hemisphere sampling to cosine weighted hemisphere sampling I am confused by a statement in an article. My current indirect contribution is calculated as: ...
3
votes
1answer
229 views

Volumetric raycasting with transparent rasterized geometry

I have an idea of how to render opaque rasterized geometry alongside raycast volumes: Render rasterized geometry to a depth map and also a render target When raycasting, check position against the ...
1
vote
1answer
318 views

How can i make my ray tracing algorithm fast in terms of intersection testing?

I am working on a ray tracer. But i want to put more than 10 objects in the scene. How can i make the intersection fast so that it can give me reasonable FPS. Its a cpu-based ray tracer.
1
vote
1answer
408 views

How can I send custom bitmap to frame buffer?

I was trying to make a CPU-based ray tracer but I know after all the calculation I will end up with an array of pixels. I don't know how to paint it on the screen. What are the various ways to do that?...
3
votes
2answers
532 views

How to watch image being ray traced?

In my ray tracer, I render my images out to a .PPM file and then view it in photoshop. To make things easier and faster I want my ray tracer to open up another window and show the image being rendered ...
3
votes
0answers
345 views

Calculating intensities of Virtual Point Lights in Instant Radiosity from IES lights

Short introduction I created a function that interpolates the IES luminious intensities (candelas) using Hermite interpolation, so in my code all light sources have $I(\theta, \phi)$ function - but ...
1
vote
1answer
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 ...
5
votes
3answers
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?
4
votes
3answers
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: ...
5
votes
1answer
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 ...
1
vote
2answers
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 ...
4
votes
1answer
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 ...
3
votes
1answer
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 ...
5
votes
1answer
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 ...
5
votes
1answer
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 ...
6
votes
1answer
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 ...
4
votes
1answer
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 ...
4
votes
1answer
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 ...
4
votes
1answer
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 ...
4
votes
2answers
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 ...
24
votes
2answers
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) ...
7
votes
2answers
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 ...
12
votes
1answer
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 ...
8
votes
1answer
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 ...
5
votes
0answers
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 ...