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
0 votes
0 answers
16 views

Texture space Raytracing of cylinder primitive in godot shader for Helix interception

I have been trying to do raytracing of an helix in a spatial shader in godot 4.2, but apparently I missed something because the result is bloby and melty at the cylinder level. The basics is that I ...
user29244's user avatar
  • 327
0 votes
0 answers
33 views

Ray-Sphere Intersection Always States Ray Origin Is Point Nearest Sphere Center

I am writing a simple graphics engine using Rusts WGPU. I have a Sphere rendering at the origin of my scene like so: ...
shaneB's user avatar
  • 1
1 vote
1 answer
81 views

How should I bind various types of material data to the ray tracing rendering pipeline in DirectX12?

My problem is a bit complicated. When doing ray tracing rendering, all data in the scene needs to be prepared. In addition to texture resources, each object to be rendered will also have its own ...
AshenvaleZX's user avatar
0 votes
0 answers
31 views

How do phase conjugating mirrors look like in render?

This question might not fit this community standards, so it might be closed in the future. I am interested in physics and I recently learned about phase conjugating mirrors. These are very special, ...
AccidentalTaylorExpansion's user avatar
0 votes
0 answers
47 views

INSANE Slowdown when implementing MSAA

I am trying to implement MSAA in my very simple raytracer. However, when I do, my program gets and insane slowdown. I am working in Metal, and on the Metal HUD, I can see that my frametimes drop from ...
oli2's user avatar
  • 3
0 votes
1 answer
71 views

Transforming a ray to NDC coordinates

I am trying to have ray tracing with a mesh using NanoRT and I want to be able to allow for a model transform on top of my view and projection transforms. I have successfully transformed my ray from ...
Felipe Gutierrez's user avatar
1 vote
0 answers
468 views

More performant 2D raytracing than Radiosity?

Currently if you want real-time 2D ray-traced scene lighting, you're limited to a few options: geometry based SDFs or Scene Based Radiosity. However 2D Radiosity is really the only choice if your game ...
FatalSleep's user avatar
1 vote
0 answers
296 views

How can transparency be implemented in a Minecraft-like game without sorting the vertices?

I'm working on a minecraft clone with OpenGL and I've been trying to implement the rendering of textures with transparency for several days now with out succes. What techniques can be used to achieve ...
TheBaum's user avatar
  • 43
1 vote
0 answers
52 views

how to efficiently raytrace a rectangle side in 8bits without mul and div?

Imagine you are on a hardware that is 8bits like the nes or the game boy, NO mul no div, only add and shift. Given a rectangle or integer size nk*mk, where k is the size of the underlying grid, and P ...
user29244's user avatar
  • 327
1 vote
2 answers
225 views

I'm following a tutorial but I don't get the same result; why are the raytraced shadows not working?

I followed this tutorial called "Ray Tracing in One Weekend" by Peter Shirley. And I implemented the java version of it for studying Ray Tracing. Everything was all right until Diffuse ...
Whatssuppp's user avatar
2 votes
0 answers
109 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 ...
Megan Bohland's user avatar
0 votes
1 answer
484 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 ...
harut9's user avatar
  • 157
0 votes
1 answer
128 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 ...
jaysonpowers's user avatar
0 votes
1 answer
396 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 ...
0xbadf00d's user avatar
0 votes
1 answer
976 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 ...
0xbadf00d's user avatar
0 votes
2 answers
387 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 ...
Hải Nam Trịnh Lê's user avatar
1 vote
1 answer
446 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 ...
datta's user avatar
  • 111
0 votes
1 answer
35 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): ...
Georg Methner's user avatar
0 votes
2 answers
1k 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'...
zoom's user avatar
  • 31
1 vote
1 answer
1k 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 ...
Georg Methner's user avatar
0 votes
0 answers
85 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 ...
iaomw's user avatar
  • 101
3 votes
1 answer
664 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 ...
zoom's user avatar
  • 31
1 vote
1 answer
495 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 ...
user29244's user avatar
  • 327
0 votes
2 answers
339 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 ...
Max's user avatar
  • 103
0 votes
2 answers
137 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. ...
Natalo77's user avatar
  • 679
28 votes
2 answers
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 ...
Marcus's user avatar
  • 383
0 votes
1 answer
175 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 ...
Num Lock's user avatar
0 votes
1 answer
65 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 ...
omegasbk's user avatar
  • 111
0 votes
3 answers
292 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 ...
Cerberus's user avatar
4 votes
0 answers
140 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 ...
Warp's user avatar
  • 171
0 votes
1 answer
629 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 ...
java4ever's user avatar
3 votes
2 answers
5k 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
Jay Ebhomenye's user avatar
0 votes
0 answers
64 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 ...
Geklmintendon't of Awesome's user avatar
1 vote
0 answers
45 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. ...
grav's user avatar
  • 11
1 vote
3 answers
5k 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 ...
user avatar
0 votes
1 answer
204 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 ...
Alpha Mistral's user avatar
4 votes
1 answer
193 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 ...
Step's user avatar
  • 141
4 votes
3 answers
4k 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 ...
Michael Moon's user avatar
2 votes
1 answer
1k 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 ...
evilpudding's user avatar
1 vote
1 answer
1k 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 ...
BotskoNet's user avatar
  • 919
1 vote
1 answer
550 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 ...
Elias Finoli's user avatar
2 votes
1 answer
148 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 ...
ali's user avatar
  • 167
2 votes
1 answer
404 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 ...
Spectraljump's user avatar
-1 votes
1 answer
176 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 ...
l'arbre's user avatar
  • 245
2 votes
1 answer
309 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 ...
ali's user avatar
  • 167
0 votes
1 answer
1k 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; ...
Jonathan Cain's user avatar
2 votes
1 answer
109 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 ...
Allahjane's user avatar
  • 719
4 votes
1 answer
355 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 ...
Unheilig's user avatar
  • 515
0 votes
1 answer
94 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 ...
Qulery's user avatar
  • 173
-1 votes
1 answer
1k 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 ...
Zick's user avatar
  • 99