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

Filter by
Sorted by
Tagged with
1
vote
0answers
40 views

Struggling with 3D math concepts. Would like practice [closed]

Hello fellow game developers! I graduate this October with my Bachelor’s of Game Programming and Development. I took the required Calculus and Linear Algebra. While I passed the classes I feel like I ...
0
votes
1answer
39 views

Is ray tracing performance dependent on polygon count

I want to know if mesh polygon count affects raytracing performance, by Raytracing I mean Nvidia's RTX or similar hardware accelerated raytracing. So If I have a scene with high poly objects and total ...
0
votes
0answers
19 views

Ray tracing Bug with Diffuse material

I am trying to do ray tracing in python (following the tutorial given in Ray Tracing in a weekend). Basically I am shooting rays from eye and the recursively bounce around, each time they hit ...
1
vote
0answers
13 views

Attach a DXR state subobject to a library using the DirectX Shader Compiler

Suppose I've got two IDxcBlob's libraryBlob and localRootSignatureBlob obtained from calling ...
0
votes
1answer
32 views

Moving the bulk of a recursive ray tracer function to the gpu, using DirectX12 not DirectX 12 DXR HLSL

So I'm wanting to generate images by ray tracing. I've done so, but the main ray function is recursive. I know one can make a non recursive function out of a recursive function using a stack, but is ...
0
votes
0answers
31 views

Line-Line intersection vs. DDA

Recently, I have wanted to make a game using raycasting techniques, and I saw this video where a guy used an algorithm called "Line-line intersection" . I have normally used the DDA ...
0
votes
1answer
83 views

Compile shader and root signature of a ray tracing shader into a single binary using DXC

I'm new to DXR, so please If I got it right, when we want to compile a ray tracing shader using the DirectX Shader Compiler, we need to specify lib_6_* as the ...
0
votes
1answer
80 views

Specifying a root signature in the HLSL code of a DXR shader

I've noticed that I cannot specify a root signature in the HLSL code of a DXR shader. For example, if I got a ray generation shader with the following declaration ...
0
votes
1answer
108 views

Ray tracing the Next Week - Cornell Box

I'm so excited to learn ray tracing and did a lot of fun. But I'm stuck at rendering empty Cornell Box scene. It has some darker color along the bright color and it's seem different with the image in ...
1
vote
1answer
110 views

Determining first voxel ray intersects

I'm trying to implement the Fast Voxel Traversal Algorithm on a uniform grid of axis-aligned rectangles. Having read the paper, I understand how the traversing works, but not the initialization. I've ...
0
votes
0answers
55 views

Ray Tracing in One Weekend, how to add depth of field to view matrix?

I'm working through the infamous Ray Tracing in One Weekend book as I implement it on a OpenGL compute shader, the only thing I have left to do is add depth of field. I have this function that ...
0
votes
1answer
21 views

Texture uniform does not work

So im programming a raytracer at the moment and Im passing a 3d texture from the cpu to the gpu but the gpus texture has not the same values The uniform part (its made in Unity): ...
0
votes
2answers
338 views

Rotating camera in 3D without yawing diagonally

I'm programming a C raytracer. I'm having trouble getting the camera to rotate the way I intend. I would like the camera to rotate by pressing keys: F & H rotate left & right around the world'...
1
vote
1answer
205 views

Ray-Box (AABB) is slower than without

I'm trying to write my own ray tracer. The last days I tried implementing a bounding box algorithm for it. But I'm getting a much slower frame rate with the bounding boxes turned on. I think it has ...
0
votes
0answers
24 views

What is the most efficient way to find hit point of BOX and internal Ray?

most efficient AABB vs Ray collision algorithms I found this topic on AABB ray test. Some of them could find hit point of external Ray and BOX. I did my version for both external and internal ray, but ...
2
votes
1answer
150 views

Rotate Object in world space - Raytracing

I’m programming a C raytracing project. I’ve been wanting to implement object rotations (square, cylinder) for several days but I can’t do it. For each object I have its position (x, y, z) in the ...
0
votes
1answer
420 views

intersection of primitive in a unit wrapping 3D space

is there people good enough for a math problem (for a shader)? I want to write an algorithm that would intersect primitives (triangles, squares, circle, sphere, cube, cylinder) inside a unit wrapping ...
0
votes
2answers
191 views

Why don't raytracing algorithms include the speed of light?

From what I understand about ray-tracing, it is instantaneous in its speed from the light source to the user. Is there a type of ray-tracing where the "rays" move at the speed of light or are affected ...
0
votes
2answers
93 views

What is the most efficient way to trigger an action based on proximity?

I am developing a 3rd person platformer that entails a grapple hook system. This grapple hook system relies on a series of 'grapple-able' points. I would like these points to shine every so often. ...
28
votes
2answers
8k views

Why do some games show lights shine through walls?

In some games, I see lights shining through walls, even if I set video quality on high levels. A couple of examples of games I recently played are Borderlands 2 (missile explosions) and Call of ...
0
votes
1answer
70 views

understanding the basics of raytracing

I have got a sphere in my world space. I don't understand how can i find my sphere using my X and Y on my screen, because i don't understand what the value Z of my ray assuming the fact that we use ...
1
vote
1answer
34 views

Displaying debug line in custom raytracer implementation

Not sure if I should post this here or on the Math forum, but I will try my luck. Some background. I made my custom raytracer. The processing happens purely on the CPU for now, no GPU interaction ...
0
votes
3answers
146 views

How does real-time raytracing draw reflections of off-screen geometry?

I know what raytracing is, but I'm a bit curious how games are able to reflect off-screen geometry using raytracing in real-time. I tried looking up the technical details but most of the articles are ...
4
votes
0answers
106 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
179 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 ...
2
votes
2answers
3k 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
60 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 ...
1
vote
0answers
39 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
3answers
3k 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
163 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
111 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
2k 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
664 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
839 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
445 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
106 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
281 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
123 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
235 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
763 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; ...
2
votes
1answer
94 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
202 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
41 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
869 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
60 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 ...
2
votes
1answer
148 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 ...
3
votes
1answer
119 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
1k 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" ...
2
votes
1answer
188 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 ...
4
votes
2answers
4k 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 ...