raytracing

Computer graphics research

What are the best known labs for research in CG especially raytracing/rendering? I want to pursue Masters/PhD in this field and though I have been working on projects such as raytracers, it is all self-driven. What would be a good place to start, perhaps as a research intern? Also, what kind of background is expected for admissions in th...

Simple C/C++ library for triangle-intersection acceleration structure

I'm raytracing and would like to speed it up via some acceleration structure (kd-tree, BVH, whatever). I don't want to code it up myself. What I've tried so far: Yanking the kd-tree out of pbrt. There are so many intra-dependencies that I couldn't succeed at this without pulling all of pbrt into my code. CGAL's AABB tree. Frustratingly...

How to keep a list of instances of a class?

I'm writing a raytracer in C++ and need to be able to check intersections with every object in a scene (optimizations will come later), and to do this, I need to keep a running list of class instances. A list of pointers, updated when a new instance is created, won't work because as far as I know there is no way to increase the size of t...

Elegant/Clean (special case) Straight-line Grid Traversal Algorithm?

I'm dusting off an old project of mine. One of the things it had to do was -- given a Cartesian grid system, and two squares on the grid, find a list of all squares that a line joining the center of those two squares would pass through. The special case here is that all start and end points are confined to the exact center of squares/c...

How can I change this raycasting algorithm to not go diagonally?

// Arg0 - Map, Arg1 - X, Arg2 - Y, Arg3 - Distance, Arg4 - MaxDistance var xx,yy,dist, x1, y1, dir, maxdist, obj, res, map; map = argument0 x1 = argument1 y1 = argument2 dir = argument3 maxdist = argument4 dist = 0 do { dist+=1 xx = x1+round(lengthdir_x(dist,dir)) yy = y1+round(lengthdir_y(dist,dir)) }...

Why won't my raytracer recreate the "mount" scene?

I'm trying to render the "mount" scene from Eric Haines' Standard Procedural Database (SPD), but the refraction part just doesn't want to co-operate. I've tried everything I can think of to fix it. This one is my render (with Watt's formula): This is my render using the "normal" formula: And this one is the correct render: As y...

Reading in polygons from a Object File Format (.off) file

Hi I need to read in a list of polygons from a Object File Format (.off) file (in c++). The format of .off files is basically like this: Header infomation x y z //co-ords for each vertex ... NVertices v1 v2 v3 ... vN //Number of vertices for each polygon, //followed by each vertex's index ... .off files all...

Ray tracing in modern OpenGL. Where do I begin?

So I'm at a point that I should begin lighting my flatly colored models. The test application is a test case for the implementation of only latest methods so I realized that ideally it should be implementing ray tracing (since theoretically, it might be ideal for real time graphics in a few years). But where do I start? Assume I have n...

Can someone describe the algorithm used by Ken Silverman's Voxlap engine?

From what I gathered he used sparse voxel octrees and raycasting. It doesn't seem like he used opengl or direct3d and when I look at the game Voxelstein it appears that miniature cubes are actually being drawn instead of just a bunch of 2d square. Which caught me off guard I'm not sure how he is doing that without opengl or direct3d. ...

C or ObjC for real-time raytracer on iOS?

I'm starting to build a real-time raytracer for iOS. I'm new to this raytracing thing, all I've done so far is write a rudimentary one in ObjC. It seems to me that a C-based raytracer is going to be faster than one written in ObjC, but the ObjC one will be far simpler, as object hierarchies come in very handy. Speed is very important,...

How to deal with refraction when the rays start inside of a nested object

I am building a simple raytracer for educational purposes and want to add refraction to objects. Using Snells Law, I am able to create a new ray recursively at the intersection points. The raytracer supports currently only spheres and I use a scene where I have multiple spheres nested inside of each other with different refraction indice...

Pointer giving garbage values even after being set

I am having a weird problem with pointers .I am building a k-d tree for ray tracing and during the BuildKDtree function I print root->left and root->right and I get correct values for various attributes stored at node. The moment I complete that code and then try to traverse the tree using the original root's pointer the root->left and r...

Arbitrary ray test using C# and WPF

I want to know if a ray from an arbitrary point will strike a polygon. It would be useful to know the point in space that intersection occurs and also a reference to that polygon. I'm using the System.Windows.Media.Media3D library and have done a ray trace test but have yet to crack any of teh information i want out of the HitTestResult ...

How to best store lines in a kd-tree

I know kd-trees are traditionally used to store points, but I want to store lines instead. Would it be best to split the line at every intersection with the splitting of the kd-tree? or would storing just the end-points into kd-suffice for nearest neighbor finding? ...