Well, I know a ray tracer won't work.

Started by
6 comments, last by phantomus 15 years, 10 months ago
(or at least the ones I have seen...) Ok, some time ago I wrote a ray tracer (class project) and not so long ago I wrote a photon mapper (a different classes project). What I am wanting to do is to instead of making still images, I want to make a time based display (but keep in simple, say spheres moving around). Now, in this I have a few problems. First off, ray tracing cannot (at least on the level which I know it, which is intro level) be rendered quick enough to make a 'movie' (maybe around 15 fps) that is a couple seconds long without taking hours. As such, I was wondering if either there are up grades to standard ray tracing that improve this or if there is a better form of rendering out there for this, and if so, what is it called. Also, I don't have a clue how to: Put out image files of any non ppm format. Take said image files and change them into a video of some sort. I know there are programs, free and costly, which will do exactly what I am thinking of many times better than what I can produce, but I am wanting to try this as a learning exercise, and also to better understand what ever language I do this in (since I'm not sure how to use JIT in Java, and I don't know enough C# to even try this right now, I was thinking of either C or C++, but really leaning on the C++ side as I don't like doing pseudo OOP in C using structs, which is how my raytracer was programmed. So, to better facilitate responses, here is a list of questions. Is there a better way to render what I am trying to (and if yes, can you give me a name so I can go research/learn it)? If raytracing is a viable way to do this, what are some 'tricks' I can use to make the render time bearable? What is the best way to do this output (I was thinking different still images linked together)? If the still images linked together is a viable option, what image format would you suggest I use, and how in the world do you take multiple images of said file format and link them together into a video?
If history is to change, let it change. If the world is to be destroyed, so be it. If my fate is to die, I must simply laugh.- Magus
Advertisement
Well, after doing some more research, it seems that current interactive products (video games) use a mix of rasterisation and ray casting.
If history is to change, let it change. If the world is to be destroyed, so be it. If my fate is to die, I must simply laugh.- Magus
I dont see why you can't write a raytracer fast enough to animate some spheres...Several raytracing engines exist that can do much more than this at even realtime framerates (including reflections and shadows).

No modern game uses anything called "raycasting"..the original Doom engine did but that is not considered 3D anyway. Games use rasterization almost exclusively.


Commercial releases tend to use rasterization, but those crazy bods in academia can get away with all sorts, what with them not having a publisher making unreasonable demands constantly.
OP: download and view Heaven Seven, by exceed. You were looking for intro-level raytracing?

http://pouet.net/prod.php?which=5
RIP GameDev.net: launched 2 unusably-broken forum engines in as many years, and now has ceased operating as a forum at all, happy to remain naught but an advertising platform with an attached social media presense, headed by a staff who by their own admission have no idea what their userbase wants or expects.Here's to the good times; shame they exist in the past.
Or check Arauna. http://igad.nhtv.nl/~bikker .
I suppose that if you want to do raytracing, then do it. If you want to do realtime, use DirecX or OpenGL, because writing a realtime raytracer requires great skills and hard work (I never attempted to make my raytracer realtime, I leave that to persons like phantomus (aka Jacco Bikker) :-)

Of course, things change if you want to do it all from scratch, without using existing libraries. Then writing a performant rasterizer will most probably be not much easier than a performant raytracer...
The advantage of implementing a software ray tracer instead of a fast software rasterizer is that the problem is much more focussed. You won't be battling on a dozen fields, instead you will 'just' be optimizing ray traversal, and shading. Once that is fast, everything else is a piece of cake. Read a few papers, implement something basic, and then optimize it for two years straight. :)

This topic is closed to new replies.

Advertisement