Sign in to follow this  

Game programming and raytracing

This topic is 3718 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Quote:
Original post by Vilem Otte
Good day, Im asking a simple question, is raytracing in games useable, I have my own realtime raytracing api (it isn't completed yet, work in progress), so is there any possiblities for programmers to use it?


Not as the main method for rendering, not *just* yet. But soon.

Share this post


Link to post
Share on other sites
If it works, looks good, and doesn't consume too much resources, then sure, why not. The biggest problem is that there is really tons of hardware support for rendering lots of triangles with all kinds of fancy effects thrown in, so it's tough for a ray-tracer to be competitive.

The things that can be done with ray tracers that can't be done with triangle rendering also tend to be really computationally intensive, and an effect that is good enough can usually be achieved with hardware rendering.

Share this post


Link to post
Share on other sites
There are multiple uses for RT.
Use it full force to create realistic backdrops to replace far rendering.
Use ray casting where only samples are traced to locate light source, objects and reflections real-time to use in normal polygon rendering, lighting, shadows and reflection.
As for full blown realtime, we will have to wait a little longer for that kind of procssing power.

My current ray tracer first used on the Amiga in 1988 ran in a little over 20 seconds to render 3 reflective spheres and a tile floor at 320x200. It now runs in a little over 1 sec with 2 cores at 1024x1280. This is simple sphere collision with recursion pegged at 3 to eliminate wasted time bouncing between the spheres.

Share this post


Link to post
Share on other sites
There are techniques like Parallax Occlusion Mapping which uses essentially small amounts of raytracing to achieve greater detail in less geometry. It is still a very slow technique, but can be quite powerful even when used in small quantities.

Share this post


Link to post
Share on other sites
Maybe it's true, that processors havent enough power now for realtime raytracers, but what about in 5 years? I'm building raytracing api, and it has quite a good (really good) results, but the main problem is - OpenGL api is easy to use, my realtime raytracing api will not be so easy (I'm writing it mainly in Assembly - it's much more harder than coding it as object oriented). Well, if you want - you may combine my RT with ogl/d3d (the raytraced scene is in ONE BUFFER - which can be INT buffer - LDR or FLOAT buffer - HDR) It'll not use GPU if you wouldn't want, but it can use it (well, right now, it cannot - it's still not completed - but i'm gonna to drop it out in few years (one or two), but i cannot promise it. I have nonrealtime raytracer, which i use as a reference (it can handle GI, Ambient Occlusion, NormalBumpMapping, Frensel Reflection+Refraction, Soft Shadows, and so on. But I must write it few thousand times faster :-( - it's hard, but not impossible.

Lexdysic - I have Parralax Occlusion Mapping in my previous engine (OpenGL rendering), but I need some api with dynamic physically correct shadows, reflections, refractions, GI, ... in Real Time (so I decided to write my own api, yes it's quite a crazy idea - but I've got few more people to help me with this)

AlabamaCajun - with recursion pegged at 3 - My RTRT use limited recursion of reflections too, it's close the same as with 3000 reflecting passes, but it's faster - much more faster.

Drigovas - yes, it's nice :-), but it's probably write in Object Oriented programing (much more slower and simpler than my ASM version, which is damn hard)

Vorpy - I'm gonna to run it on 3 GHz single core CPU (well, i've got dual core, but i wanna one core to do some stuff with AI, Physics, ...) - with most of effects (like GI, Reflecting+Refracting, ...)

Steadtler - It's not just yet completed, but maybe it would be soon :-)

Share this post


Link to post
Share on other sites
I don't know if you already heard it, but the OpenRT project is already working on a real time RT api. Perhaps you can get some ideas about how to design the interface...

AFAIK intel is moving toward RTRT with a new multicore processor based on x86 instruction set:
-paper about RT from intel
-Intel planes seem to include a new generation processor highly suited for raytracing. Here discussion on the topic


Personally, I think that RTRT will in the future replace the current tecnology: not only is RT easier to write (think at soft shadows in RT and in rasterization), but it also almost only depends on one parameter: Rays shoot per second. Most effect only require more rays to be performed, and the quality of a game could be scaled to match the power of the system (more samples on faster systems, better shaders and so on).
This is reductive: there is more to say about RT not only shooting rays. AFor example, dynamic scenes are hard to build in structures suited to raytracing. But many people complain that RT don't take GI into account. Rasterization don't too, unless other algorithms are added. But precomputed lightmaps, fast AO and so on could be added to a raytracer too. Sooner or later game developers will be given the opportunity to switch to RT: I would be happy to stop wondering how to reduce my soft shadows artifacts or how to inprove the quality without using bigger buffer. And lights management would be easier as well (each pixel can be lightened with a different set of lights).
This is what I think of it, but I recognize that there are problems: high resolutions and dynamic geometry are a couple of them. Transition and compatibility with older games another one. Rays are not, IHMO: take a geForce8800, mantain its power but convert it to shot rays, and I think that we would get rays/s enaught to reach at least current games quality...

Share this post


Link to post
Share on other sites

This topic is 3718 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this