Not logged in, Join Here! or Log In Below:  
 
News Articles Search    
 


Submitted by Nils Desle, posted on April 04, 2002




Image Description, by Nils Desle



I'm working on a realtime raytracer in my spare time and have decided to release a demo (WIN32 platform) and some images of what I'm doing.

The raytracer gets its main speed increase from adaptive subsampling, i.e. I start by tracing the four corners of a N*N rectangle and compare color values. If the difference is too big, I subdivide the N*N into four N/2*N/2 rectangles and process those recursively and so on until I have reached pixel accuracy or the color differences have become too small to matter, in which case I let OpenGL draw the rectangle using interpolation. Texturemapping is done by the raytacer, not OpenGL.

The demo uses an initial rectangle size of 4*4 for the tracing since I want to show thin cylinders (casting thin shadows too) that sometimes will take up less than 4 pixels wide and risk flickering if I take a larger initial blockwidth. The demo runs fine in 320x240 on my PIII 900.

The top four images are stills from scenes in the demo, the bottom left is another scene and the bottom right is the same as the bottom left but showing only those pixels that are actually traced (shown as full white pixels here). All the black in that picture is where interpolated pixels go in the real picture.

You can find more pictures, a download and a full explanation of the engine at:
http://home.tiscali.be/slinline/trezebees.html

Cheers,
Nils Desle


[prev]
Image of the Day Gallery
www.flipcode.com

[next]

 
Message Center / Reader Comments: ( To Participate in the Discussion, Join the Community )
 
Archive Notice: This thread is old and no longer active. It is here for reference purposes. This thread was created on an older version of the flipcode forums, before the site closed in 2005. Please keep that in mind as you view this thread, as many of the topics and opinions may be outdated.
 
DarkReaper

April 04, 2002, 02:48 PM

First!! ;)

Very, very nice. Looking forward to testing it out on my home PC :D

 
Paul Hope

April 04, 2002, 02:59 PM

The link doesn't work, second.

 
Seb. Wagner

April 04, 2002, 02:59 PM

I like the "Tic Toc" scene best, but IMHO you should remove the lensflares.

 
viZual

April 04, 2002, 03:01 PM

Cool!

How many fps do you get on your pc?

 
z80

April 04, 2002, 03:07 PM

Well done. Worked fine on my P4 1.5GHz/GeForce 2/WinME. I think the lensflares are a bit too apparent too. Maybe if they were a bit softer and more transparent. Also it looks like the black part of them arent totally black, so you can actually tell its a square texture. Otherwise the demo is great, very fast!

 
MaxSt

April 04, 2002, 03:11 PM

For some reason I like low-resolution raytracers more then high-resolution ones.
If only someone could try to go one step further - trace more rays to add antialiasing, it would be totally cool!

downloading...

MaxSt.

 
SirLlamalot

April 04, 2002, 03:20 PM

Very nice looking, I just love to see realtime raytracers. I would love to see an interactive demo. let me run around in that last scene. It would be much more impressive IMO to see it from an angle of my choosing.

Kudos to you, I wish I was at your level. It is too bad that there is only one level of reflection, but I suppose the cost would be too high to make any more levels. How does your framerate change depending on the complexity of the scene? Are you only able to use perfect primatives?

 
davepermen

April 04, 2002, 03:32 PM

ok that was too much for my pc:) p3 500 in software-gl-mode.. i now try hardware..

 
DmNxia

April 04, 2002, 03:34 PM

Have you thought about implementing some anti-aliasing? Your images look nice, but there are a lot of jagged edges in them that if smoothed would probably make the pictures look even better.

Dmnxia

 
davepermen

April 04, 2002, 03:35 PM

with hardware not any faster (gf2mx)
i always try the highres modes, everything under it is just annoying:):):)

no, its great work.. now you need fast triangle-intersections (use gl for the first-ray-"intersections" ;))

 
Garett Bass

April 04, 2002, 03:37 PM

So, basically, you want him to trace @ 640x480, then downsample to 320x240? why not just keep the 640x480 once you've got it?

 
shadwstalkr

April 04, 2002, 03:40 PM

Like realtime radiosity? That would be cool.

 
MaxSt

April 04, 2002, 03:44 PM

Yes, antialiasing!
I would just love to see it, even in 320x240!
It's too bad nobody tried to implement it yet... :(

MaxSt.

 
MaxSt

April 04, 2002, 04:00 PM

No!
He is not tracing 320x240 = 76800 rays, just 80x60 = 4800 rays, and adds some more in "problem" areas. He would need to go one step further in subsampling process - to add some subpixel rays in such areas, that's it. Performance hit will be 50% or something - but not 4 times slower, of course.

MaxSt.

 
MaxSt

April 04, 2002, 04:12 PM

> i always try the highres modes, everything under it is just annoying:):):)

Means realtime raytacing in not for you! :):)
Since geforce can't trace rays, it's CPU job.

 
Division By Zero

April 04, 2002, 04:14 PM

***

-IS THIS IOTD WORTH A COMMENT ?????-

***

Yes, it is

But I would like to see terrain :)

 
ramses0

April 04, 2002, 05:14 PM

Was able to get running w/o any troubles using linux/wine. Very nice looking work! :^)

--Robert

 
David Olsson

April 04, 2002, 05:21 PM

What kind of programs doesn't run on Linux/WineX ?

 
Kurt Miller

April 04, 2002, 05:41 PM

">>What kind of programs doesn't run on Linux/WineX ?"

I can't speak for ramses, but the only major problems I've really had with Wine are programs that do registry tricks or rely on weird services. For instance I couldn't get Kazaa to run at all because it was trying to use that ad banner spyware service that wasn't running properly.

Most games and small apps work nice and fast.

 
Division By Zero

April 04, 2002, 05:44 PM

PINK BLUE PURPLE PILLS ....

this name is the best for blue pills

 
Luke Philpot

April 04, 2002, 06:01 PM

Looks nice!!

 
Rand

April 04, 2002, 06:06 PM

I AM THE FIRST TO REPLY TO THE FIRST POST.!!!!

I OWNZ U FIRST POSTETSDKFER!!

BEHOLD MY FAST REPLY SKILLZ

 
Rand

April 04, 2002, 06:07 PM

I AM The *FIRST* to reply to the *SECOND* post!! I am so f***ing cool.

you first and second posters have nothing on me hahaha

FIRST !

 
Rand

April 04, 2002, 06:09 PM

oh crap I peeED in my pants cuz I was so excited to get the FIRST reply I am so damn cool... thanks I love you first posters

 
NovaCoder

April 04, 2002, 06:20 PM

I'm very very impressed with the demo!

It's the best real-time renderer I've seen, can't wait to try it out at home to see how my P4 mother runs it.

We're getting close to having this technology in games because PC's are now getting just about powerful enough to do this in real-time at an acceptable frame rate.

It would be good to include a frame-rate counter with the demo.


- NOVA

 
ramses0

April 04, 2002, 06:24 PM

There are two parts of the "wine" project (W.ine I.s N.ot E.mulator), the normal run of the mill "wine" project (www.winehq.com) which is focusing on getting things like Office, Quicken, and Notepad working. Another company (transgaming.com) is trying to get the DirectX stuff working, but they charge a subscription (like $5 per month) in order to devote programmers to improving the DirectX (read: gaming) portions of wine. So far it's pretty cool work, but the DirectX API is supposedly big and difficult to map into underlying OpenGL/Audio/Joystick/Networking calls on Linux.

I've had success with almost every business-style app using Wine (mail readers, IDE's, cheezy MFC video games, Win3.11 stuff), but games are a little more difficult. Since I run a strict Linux-only box, it's sometimes difficult to get the installers to finish properly, but once it's installed, the game works great.

About 60-70% of the demos offered here on flipcode work. The rest don't work because of unimplemented functions (like DDraw_set_cooperative_mm_level or something), and some because they're using the newest DirectX API's. It takes some time for WineX to catch up to DirectX since they are (by definition) behind the curve.

Hope that helps!

--Robert

 
Ratman

April 04, 2002, 07:03 PM

You realize you people that get so upset over someone saying "first post" cause more "spam" than the people who make first posts?

Just drop it. You'll never get people to stop doing it. It cant be bothering you THAT much...

 
lycium

April 04, 2002, 11:21 PM

awesome stuff!!! :)

 
lycium

April 04, 2002, 11:26 PM

also thanks for the credit on your page :)

 
lycium

April 04, 2002, 11:34 PM

no, like realtime antialiased ray tracing. radiosity is COMPLETELY different (it's a global illumination method which calculates light interreflection between diffuse surfaces, and is geometry-based).

this just means having smooth edges, that's all.

 
This thread contains 50 messages.
First Previous ( To view more messages, select a page: 0 1 ... out of 1) Next Last
 
 
Hosting by Solid Eight Studios, maker of PhotoTangler Collage Maker.