Questions tagged [raytracing]

Ray tracing is a physics-based method for simulating photorealistic 3D scenes. Light rays are drawn from the eye through each pixel of the desired image, and the rays' interactions with the scene determine the displayed pixel color.

Ray tracing is a method (both physically-based and non-physically-based) for simulating photorealistic 3D scenes. Light rays are traced from the eye (or camera) through the geometry of the scene and the rays' interactions with the objects determine the final displayed pixel color.

It is capable, among other visual effects, to simulate light scattering, reflection, dispersion and refraction more realistically than other graphics rendering methods.

More information: http://en.wikipedia.org/wiki/Ray_tracing_%28graphics%29

1049 questions
-1
votes
1 answer

Using gluUnProject to map touches to x,y cords on z=0 plane in Android OpenGL ES 2.0

I've drawn a grid at z=0 in OpenGL 2.0 ES, and just want to convert touch inputs to x/y coordinates on that plane. It seems like this is best done through ray tracing, which involves running gluUnProject on 0 and 1, then creating a ray, solving that…
-1
votes
1 answer

how to add .ray files to an opengl program?

I am using Microsoft visual studio 2012. I am trying to make a ray tracing program but I don't know how to include these .ray files into it. I heard you had to go to the projects tab, then go to properties, then to debugging, then to command…
-1
votes
1 answer

Rectangle Ray Intersection

Im making a simple Ray Traycer in C#. And for my viewport I have a rectangle class. public class Rectangle3D { public readonly Point3D Point1; public readonly Point3D Point2; public readonly Point3D Point3; public readonly Point3D…
Armen Aghajanyan
  • 368
  • 3
  • 15
-1
votes
2 answers

determine whether a ray collides with a triangle and distance to the collision point, in 3D

I'm looking for a method to determine whether a ray collides with triangle and distance to the collision point in 3D. a method like the code below or something similar float GetCollisionsoint(Vector3 RayPosition, Vector3 RayDirection, Vector3 a1,…
Johan Polson
  • 117
  • 3
  • 12
-1
votes
3 answers

Using javascript for custom purposes

I am writing a raytracer as a part of my complete 3d engine. I am planning on using javascript for the scripting language instead of writing my own. The question is how can I use it? Btw the raytracer and the UI are written in C#.
Belos
  • 281
  • 1
  • 3
  • 14
-2
votes
1 answer

Intersection between a line and an object, which was transformed by a matrix

For a C++ ray tracing project, I have a 3D object, which is described by an equation. This object can be transformed by a 4x4 matrix M (which itself can be a rotation/translation/scale matrix, or a combination of any of those matrices). Now, I want…
qdesmettre
  • 123
  • 6
-2
votes
1 answer

CUDA: does size of input/output data have to be a multiple of the number of threads per block?

I have a Python code (for implementing RayTracing) that I'm running in parallel with PyCuda. import pycuda.driver as drv import pycuda.autoinit from pycuda.compiler import SourceModule import numpy as np from stl import mesh import time my_mesh =…
-2
votes
2 answers

How can I improve my path tracer?

Code_Screenshot_1 Code_Screenshot_2 Code_Screenshot_3 OutPut or Result Some errors is in result, Corrugated wall appears, under normal circumstances should not have ripples, it should be a simple diffuse material, but now it has ripples,but i cant…
bin guo
  • 21
  • 3
-2
votes
1 answer

Ray-AABB intersection

so, I need to do Ray-AABB intersection Here's my code, taken from a book bool intersection(point start, point dir){ float tmax, tmin, tmaxY, tminY, tmaxZ, tminZ; float a; point temp1, temp2; //check x a = 1 / dir[0]; …
RLin
  • 25
  • 3
-2
votes
1 answer

Where is my kd tree traversal code wrong?

I was optimizing my c++ raytracer. I'm tracing single rays through kdtrees. So far I was using Havran's recursive algorithm 'B', which seems antique and overblown for OOP. My new code is as short as possible (and hopefully more easily optimized by…
5-to-9
  • 649
  • 8
  • 16
-2
votes
1 answer

What is it output sensitive algorithm?

What of this algorithms is output sensitive ? (their base algorithm) ray tracing gpu rendering splatting How can we make them with acceleration method to be likely output sensitive ? I think ray tracing and gpu is not output sensitive.
ocra88
  • 103
  • 1
  • 7
-2
votes
2 answers

Speed of ray tracing compared to e.g. OpenGL (or other graphics implementation)

If OpenGL can achieve fast (relative) frame rates because part of the pipeline is processed by the GPU, how would it perform without a GPU, i.e. done purely in software? Would it be the same order speed as ray tracing? Slower? Could GPUs ever…
Vic
  • 487
  • 8
  • 17
-3
votes
1 answer

What type of project should a raytracer be in Microsoft Visual C++?

Class library, CLR console app, CLR empty project, makefile project, console application, or forms app?
-5
votes
2 answers

How to understand this RayTracer code

So this RT code creates a 3D image, with blur, through raw code. How is that actually done without any modelling tools? I am currently working to understand how RT work and different ways to implement them, so this was kind of cool to see such a…
user3333072
  • 139
  • 3
1 2 3
69
70