   simple raytracer...
  Here I just coded yet another raytracer, originally I got the idea from Jacco Bikker's article at flipcode, that's very good for the beginners. you can download the binary and source code here:http://www.gameprogrammer.org/downloads/raytracer.zipit supports Lua scripting, ambient, diffuse and specular lighting, raytraced shadows, reflection & refraction, super-sampling and linear Fog.
  Graet job! I love ray tracers - I really should get round to making my own. I like the way you use Lua, thats quite an inventive way of representing a scene. Also, great render times (all scenes in less than 10 seconds).   ;  Nice job! Anyway, I would point out a few things:-Rendering time seems too long. I guess that such scenes could be rendered in 3-4 seconds at most. Do you use spatial subdivision schemes (kd-tree or grids?). When I wrote my simple raytracer I came here and many guys gave me useful tips.-I see some artifacts here and there. Precision? You say that you do supersampling (I suppose for antialiasing) but the results does not seem very accurate to me. The antialiasing algorithm I used (also not advanced nor physically correct) worked as follows: fter the render, it calculated the difference between two adjacent pixels and if it resulted that those pixels were too much different, then  more rays were generated and a new value computed by averaging those rays. It was not correct, but it worked quite well without too much overheading. That removed those black points and the aliased borders.That said, I like how those sphere look like.Good luck!   ;  I couldn't see your raytracer screen shots, maybe you could give a correct link.., and about render time, I didn't any optimization on the code yet. May be I use BSP trees later..., also MFC waste a lot of performance.   ;Quote:Original post by kazemiI couldn't see your raytracer screen shots, maybe you could give a correct link.., and about render time, I didn't any optimization on the code yet. May be I use BSP trees later..., also MFC waste a lot of performance.Yes, I no longer have the subscription to the server where they were once, and I've lost them :-( but my RT is not much more advanced, I gave you the link because perhaps some of the replyes could be useful for you as they were for me.MFC shouldn't really eat to much CPU, but you could try by first rendering the picture and then displaying it at the end and see if the rendering speeds up.This  is a rendered scene of my rt (I don't understand why I'm not able to post them directly, have you some idea, btw?). It took 6 sec on my Athlon 2600. Shadows are produced by area lights (few samples in this pic though) and the simple AA was used. If I used point lights, It would have rendered the scene in a couple of seconds, and I don't use spatial partitioning at all, so if you're concerned about  performances, then you might find that topic useful.[Edited by - cignox1 on December 8, 2005 10:44:38 AM]