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]

a technique for generating an image by tracing the path of light through pixels in an image plane and simulating the effects of its encounters with virtual objects

0
votes
0answers
14 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 ...
3
votes
0answers
34 views

How does raytracing triangle meshes with RTX work internally?

Raytracing a huge bunch of triangles the naive way (ie. testing each ray against every single triangle) would be humongously slow, which is why raytracers use optimizations to greatly reduce the ...
0
votes
1answer
22 views

How do I test for intersection of a ray and part of a capped cone / cone frustum?

The formulas to calculate the intersection between a ray and a capped cone / cone frustum are already widely known (see http://lousodrome.net/blog/light/2017/01/03/intersection-of-a-ray-and-a-cone/ or ...
0
votes
1answer
199 views

Nvidia RTX ray tracing OpenGL extension

I can't seem to find any OpenGL headers for the RTX ray tracing extension, seems like they only want you to use Vulkan and optix with RTX
0
votes
0answers
40 views

Ray Sphere Interesection Distances WRONG

The discriminant is not working. This code produces incorrect distances from ray to sphere, but it can tell whether or not the ray does strike the sphere. HOW HARD IS THIS I'VE BEEN TRYING TO DO THIS ...
0
votes
0answers
34 views

Ray trace problem

...
1
vote
0answers
31 views

Projecting a moon texture to the background

I want to display a 2d moon image to the background. I have a normalized direction for the center location of my moon texture. I also have the normalized view direction from the camera for each pixel. ...
0
votes
0answers
26 views

Ray tracing camera view

Is it possible to change the orientation of the camera ( like Matrix.CreateLookAt) in the context of ray tracing without recalculate all the rays? The problem now is the application would to have ...
0
votes
3answers
802 views

What's the difference between Raytracing and Physically-based-rendering?

I know raytracing is a technique based on the route calculation done by the light, following the rays through the interaction with the surfaces, and that Pbr is a collection of render techniques that ...
0
votes
1answer
103 views

How to make a shattering effect similar to Housemarque's Nex Machina?

After playing Nex Machina for a while, the shattering effect which turns monsters and scenes into cubes really fascinated me and I can't hold my curiosity to explore how they made it. I have tried to ...
4
votes
1answer
87 views

Camera rotation deforms objects

I'm working on a ray-tracer in C++ with an adjustable camera for a university assignment. I'm entirely new with graphics and I'm struggling with one thing. I have a matrix as a mat4 object (4x4 ...
5
votes
3answers
1k views

Ray tracing and Z buffering in graphics

I am a high school student taking computer science as a subject, and someone who is very interested in the game development industry. I am currently writing an essay on Raytracing and Z-buffering by ...
2
votes
1answer
359 views

Voxel traversal intersection float position

I have a 3D grid of cubes, and using the algorithm from this paper http://www.cs.yorku.ca/~amana/research/grid.pdf I've been able to get the integer coordinates of the first tile intersected by a ...
0
votes
1answer
483 views

Calculate 2D tile map tiles within a “field of view” cone

I need to calculate which tiles make up a "cone", originating at my player and extending outward for a specific tile distance. My player can only face North, South, East, West and I'm not sure yet on ...
1
vote
1answer
303 views

Given a point on the surface of an OBB, return normal of the face

So I have this class OBB which implements a test function that determines whether a ray hits it. If it does, a passed in struct ...
2
votes
1answer
81 views

How does one model the sun in a ray tracer?

How is sun modeled when doing ray-traced 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 ...
1
vote
1answer
213 views

DirectX shader - how to spread raytracer computation over multiple frames?

I'm playing around making a shadertoy style SDF raytracer in HLSL and to make it run faster on high resolutions (1080p and up) I'd like to spread the computation over multiple frames. Right now I ...
-1
votes
1answer
98 views

FInd out if AABB is left/right/below or obove a ray

What algorithms are there to find out in which quadrant of the ray an AABB is given a roll value? My idea was to rotate the cube by the negative rotation of the ray and move it by the negative ...
2
votes
1answer
116 views

How to use Bidirectional path tracing on sky dome for rendering indoor

Is it possible to use bidirectional path tracing to render an indoor scene where the light source is skylight(no sun) coming through a window? I think I roughly know how this is done if the light ...
0
votes
1answer
430 views

Calculate distance from the centre to the edge of a cube in OpenGL

I'm trying to calculate the distance between a central point on a cube and anywhere on the surface of the cube, depending on the location of a second 3D point. I have two vertices in 3D; ...
3
votes
1answer
83 views

Hit detection for partially covered object?

Say you have a character standing behind cover such that some of its body parts like a shoe or a palm is still outside the cover. An explosion takes place close to the cover . In real life this ...
4
votes
1answer
113 views

Ray-tracing Moveable Objects

I am fond of creating graphics and animations using the frameworks on the iOS platform; lately, I discovered that, in order to create better visual designs, those higher-level of frameworks do not ...
0
votes
1answer
33 views

How to find a point of taking into account the distortion of the projection

I can not find the material that will help me to implement the algorithm of coordinate transformation based on the distortion of the projection. I am creating a code recognition algorithm (similar to ...
-1
votes
1answer
661 views

Project camera-to-pixel ray in world coordinates

I'm trying to implement a very simple ray tracing function but I have a problem with projecting the camera ray (from camera to pixel) to the world space. In the screen coordinates have the pixel ...
0
votes
1answer
50 views

Limit Quaternion/vector3 axe in a certain interval

I have some trouble to understand, and handle Quaternion and Vector3. I'm improving the tutorial Tank of Unity: EDIT: Because a video explain so much better, there is a link to the 30 secondes video ...
0
votes
0answers
155 views

How to convert Non-Axis Aligned Bounding Boxes to AABB

I'm trying to write a raytracer to render boxes (cubes) that are arbitrarily rotated, i.e. not necessarily axis aligned. While I'm reasonably comfortable ray-tracing an axis-aligned cube, I don't know ...
2
votes
1answer
122 views

Bidirectional Path Tracing questions

I'm coding a Bidirectional Path Tracing application for school in C++ and I have some questions (I haven't found useful explanations on the web) 1) Why does the EyePath have one more vertex? 2) When ...
4
votes
1answer
112 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 ...
2
votes
2answers
543 views

Efficiency - Cubemap or Raytraced reflection?

I'm an amateur in 3D game development. The thing I want to know is shading related. For reflection purpose, which will be the efficient way? Either "Realtime render to Cubemap" or "Ray trace based" ...
3
votes
1answer
95 views

How can I calculate the U,V texture coordinates on a disk at infinity given only a view vector and a vector pointing to the disk's center?

I'm using an approach similar to Bruneton's paper on atmospheric scattering for rendering my sky and am trying to extend it to add a textured moon. Long story short, the paper works by essentially ...
3
votes
2answers
2k views

How do I test for intersection between a ray and a cone?

I decided that writing a ray-tracer in my game was a brilliant idea, and so now I am looking for code to use for ray to primitive intersection tests. I have based my effort on this very nimble yet ...
9
votes
3answers
571 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 ...
0
votes
2answers
119 views

Poor CUDA performance, raytracing

I use CUDA 7.5 to learn the basics of raytracing. So far I've done nothing but constant color no-lighting spheres-only raytracing. But my delta time is already 14 - 16 ms for 800x600 resolution - 1 ...
0
votes
1answer
640 views

Getting ray using gluUnProject or inverted MVP matrix

I've read a lot of topics here, on SO, opengl.org etc. Example how gluUnProject should work (from NeHe tutorial): ...
1
vote
2answers
265 views

Cursor position to a 3D ray using angles

I've been stuck for a month trying to get gluUnProject working. After my attempts to use gluUnProject failed (as well as attempts to implement gluUnProject functionality manually) I implemented method ...
1
vote
1answer
585 views

Ray tracing - glossy reflection

Here I am again with my ray tracer for ipad. Now I'm trying to add glossy reflection to an object. How do i implement it? I read some documentation online like these: http://www.cs.cmu.edu/afs/cs/...
1
vote
2answers
485 views

Raypicking / raytracing in OpenGL

Alright, so before you down vote saying that OpenGL doesn't support rays for rendering, please read: So I want to detect a quad in opengl 1.1( I don't want to use opengl 3.0). I wanted to detect it ...
0
votes
1answer
140 views

Ray tracing - texture and phong lighting

Other questione releated to my ray tracer implementation for iPad. If I have a polygon that has a texture and a material, how do I calculate the color using Phong lighting model? Is the texture used ...
2
votes
1answer
781 views

Ray tracing - draw polygon (square/bounded plane)

I'm going on with my own ray tracer as an iPad app for a school project. This is the result with soft shadow, antialiasing, pure reflective and pure transparent object: Now i want to change the ...
1
vote
1answer
2k views

Ray tracing - soft shadow

I'm implementing my own ray tracer as an iPad app for a school project. At the moment this is the result: I need to add the last requirement, soft shadows, but I can't find a complete reference ...
2
votes
1answer
978 views

Simple Doom style engine question

I've just started making a 'raycast' engine, a pseudo 3D FPS engine similar to Wolfenstein/Doom. I haven't done much reading so my implementation is likely very naive. My current working prototype ...
0
votes
0answers
101 views

A simple “beam tracing” simulation

I am trying to implement a simple beam tracing simulation. Basically it models the path of a beam within a pipe: In the picture, the beam starts emitting from p1, hitting the boundary at p2 and ...
2
votes
1answer
580 views

C++ Ray Traversing in 3D Voxel game

I'm currently working on a Voxel game in 3D and need a tad bit of help to figure out what Voxel the player is looking at. This is the data I currently have: ...
0
votes
1answer
6k views

How to calculate ray polygon intersection? [duplicate]

I'm in a class where we are creating a ray tracer from the ground up in C++. I'm at a point where I can't seem to wrap my head around the math that is required to calculate the point at which a ray ...
0
votes
0answers
633 views

Ray-Triangle Intersection Detection using Barycentric Coordinates

I am attempting to convert the algorithm from http://www.cbloom.com/3d/techdocs/fast_ray_tri.txt to java code, but my solution does not function correctly. The only intentional change I made was for ...
8
votes
1answer
374 views

Specular banding with high specular power

We're having some issues with our ray tracing in DirectX, especially with some serious banding issues with specular. With high specular power (above 8) banding starts. I'm wondering if this is an HDR/...
0
votes
1answer
333 views

Degenerate AABB (axis aligned bounding box), does this always intersect?

I'm studying ray-AABB intersections and I'm asking myself: what would happen if one of the dimensions of the axis aligned bounding box was degenerated? For instance: ...
2
votes
1answer
2k views

Rendering lightmaps at runtime

I'm creating a procedural terrain system for Unity. And I'm looking for ways to efficiently cast self-shadows on it. If it wasn't procedural, I could simply bake a lightmap using Beast. But, I can't ...
0
votes
1answer
297 views

Overlapping sibling problem in AABB tree

I'm trying to make a real-time GPU (CUDA) ray tracer, and for now I'm tracing single rays, but I've ran into a problem: the BVH. This [PDF]paper has been my inspiration for the theoretical part, and ...
2
votes
1answer
3k views

Ray Tracing in 3D - generating a ray

A ray is shot from the camera eye to the camera screen at point (i,j) how do I get the coordinates of that point in 3D world coordinates? The best I could find online is for point S S = Q + au + bv ...