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


Submitted by Jacco Bikker, posted on April 29, 2005




Image Description, by Jacco Bikker



A while back I sent in an ray tracing IOTD showing the Stanford bunny, rendered at high speed. I've been busy since I made that demo, and these shots show the current state of the art. The top shot represents the maximum image quality: There are textures, adaptive super sampling (for edge anti aliasing), a bloom filter causing a subtle glow and of course the reflections. Sadly all this eye candy comes at a cost. The lower shot shows a very good performing model: The number of rays per second is no less than 3 million on a 1.7 Pentium-M - on a P4 @ 3.2Ghz this would be about 6 million rays per second, which is better than the SaarCOR FPGA ray tracing chip.

Over the past months, many things have improved: The overall speed of the ray tracer has been improved considerably due to some stiff competition from tbp (the odd french dude), there's a complete tool chain now to get from downloaded content to ray traced images (via the .obj file format), and the functionality has been extended considerably (textures, reflections, HDRI, networked rendering etc.).

There will be more good stuff, I'll keep you all informed. Greets - Jacco.


[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.
 
Scali

May 03, 2005, 01:56 PM

davepermen wrote: well, the trick is.. in a raytracer, every pixel results in a ray that has only a direction. it doesn't have a width. so theoretically, you'd have to pointsample only for textures..


But that's not true, since you aren't tracing infinitely thin rays... Your rays are effectively small beams of light, that are the size of exactly one pixel (or well, subpixel in the case of AA).
So in practice there's no difference between rasterizing and raytracing, as far as texturing goes. You are trying to map a piece of a texture onto the pixel area. And this mapping requires a filter.

but one thing remains true: there is NO need for anisotropic filtering, or mipmapping, or anything else. because one ray only needs to sample one point on the texture.


That is true if you assume you are using infinitely thin rays, and you are using multiple rays to make up one pixel (which has to either be dynamically, or be tuned to the worst case)... Else you get sampling issues, because your texture has a higher frequency than what you're sampling at (your rays). Just think about a floor texture... it samples fine nearby... but in the distance you may try to map pretty much the entire texture onto a single pixel on screen... ofcourse if you only pick one sample, even with a bilinear filter... the result is going to be pretty much 'random'.
AA is one way to increase the sampling frequency... but presampled textures is another. So my question is... why AA instead of presampled textures?

the only correct way is with antialiasing.


True, but 3d accelerators and offline renderers give plenty of evidence that mipmapping and anisotropic filtering can give results that are about as good, visually, and take only a fraction of the processing time.

now you state: anysotropic, mipmapping, etc, would be much cheaper than tracing additional rays. yes, this is true, for ordinary textures. but what if that texture would instead be a bumpmap, wich reflect the rays back into space? if it would just get mipmapped or anyostropic filtered, you would still just fire back one reflected ray. the texture would get filtering, the bumpmapped reflection on it wouldn't. en contraire, it would result in a very aliased reflection image, quite high frequent noise.


But you're arguing a different point here, I think...
I'm not saying that you don't need AA, I'm just saying that for textures, you may get better results with less AA, if you use a better texturefilter.
This case could use a special solution... for example... you could calc 4 jittered reflection rays, so you basically increase the AA only for reflections... That would still be cheaper than using the higher AA setting on the entire scene.

theres a big difference to rastericers. they most of the time rely on big detailed textures, and only need them antialiased as cheap as possible. but by today, we see that shader aliasing artefacts start to stress quite a bit. moving to procedural textures gets quite a no-no due to that.


That's true, but there are some tricks to reduce shader aliasing by using biased mipmaps for the normalmaps... 3DMark05 uses this for example.
But effectively it's still a sampling problem... it's just the normalmap instead of the texturemap now, so it needs a bit of extra attention...

2) is essential in a rastericer due to it's nature, and it's very specific domain of applications. it is not really useful for raytracers. but still, they could be used as approximations and shortcuts.


Well then at least you more or less agree with what I said :)

 
Scali

May 03, 2005, 02:02 PM

dummy wrote: Fact. >6Mray/s with gcc, my code, on my box.


Even if that is a fact (which I cannot verify), as I already stated... I don't know anything about your code, so I don't know if it is comparable to this IOTD... So that figure by itself doesn't mean anything...
What does your code, on your box, do when compiled with icc?
And what does a P4 do with your code?
So fact or no fact, it doesn't back up your statement of gcc ruling without any other facts to measure against.

dummy wrote: But contradicting facts/data points with extrapolations/wild guesses is not only insulting but absolutely silly and totally irrelevant.


And there is your problem... I am not trying to contradict you. You weren't giving any hard evidence, just your opinions/experiences. I did the same, and apparently we have slightly different opinions and experiences. And I wasn't intentionally insulting you either. It's all in your head.
If you take someone with a different opinion as an insult, you have a problem, really. In fact, you seem to think that anyone with a different opinion than yours must be a clueless idiot. Who is in need of a reality check, really?

 
davepermen

May 03, 2005, 02:19 PM

yeah we sort of agree, we just look from different sides, i'd guess.

but in one thing, i disagree. raytracers don't trace small beams. they just trace rays. and thats why filtering theoretically doesn't mather. the only real thing is to integrate over the pixel area and sum up all those rays. aa is way to go.

but of course, you can have some simple approximations stored per ray to have additional "beam-information" and then do some aa with simpler tools like mipmapping etc.

but i prefer to just have great aa, as it solves all issues :D (i don't care to have lowres images, i prefer to have a good looking lowres image than a aliased, artefacted, banding affected highresimage.. i prefer to look at 320x240 than 1280x960 but have great aa on everything :D .. but i'm in the minority here i'd guess)

but yes, we definitely more or less agree. i just think weighting of issues is different placed in raytracers, ergo filtering doesn't mather that much..

 
Scali

May 03, 2005, 04:23 PM

davepermen wrote: but in one thing, i disagree. raytracers don't trace small beams. they just trace rays. and thats why filtering theoretically doesn't mather. the only real thing is to integrate over the pixel area and sum up all those rays. aa is way to go.


Well true... I guess we both know what we mean... beam may not be the best term for it.
I just mean to say that without AA, you trace one ray for each pixel... which means that that single ray should sample the texture for that entire pixel's area. By using AA you reduce that area, so you get a better discrete approximation of the integration... By using advanced texture filtering, you do (part of) the integration before the ray intersection.

While AA is nice in theory, I just thought that texture filtering would be better in practice.

Well, at least we have had a sensible, technical discussion of the matter now, at last :)

 
davepermen

May 03, 2005, 04:43 PM

yeah. but i prefer the bruteforce solution, as it will, once speed is available, be less hacky and thus result in a bether overall solution for highquality images in practise, that has tons of shaders, procedural textures, complex materials with interreflections and gi and all the fuzz :D


hehe, i'm currently writing out differnet interpolators to set up a nice texture sampler :D:D heck, i don't even get cubic working :D but i got cosine..

well, i'm WAY too tired to think currently, so i'm just hacking numbers :D but hey, it's fun :D

 
Yonaz

May 03, 2005, 04:57 PM

hehe you are ashamed and hide it in a reply, there you have it! :P

Now i want to see that in the main thread again :)

 
Yonaz

May 03, 2005, 04:59 PM

I guess it wouldn't rule the dualcores right now since it is just singlethreaded at the moment.

 
davepermen

May 03, 2005, 05:01 PM

but running two instances would rule :D

 
Scali

May 03, 2005, 05:30 PM

As requested by Yonaz:

Well I have a 1.6 GHz Celeron in my laptop... and I get about 3100 max, 1900 min... So there!

I'm not ashamed of that...
What I am ashamed of is that my main desktop PC uses an Athlon XP processor, so it cannot run the thing at all... but I would never dare to post that in the main thread... :)

 
dummy

May 04, 2005, 02:37 AM

Scali wrote: Even if that is a fact (which I cannot verify), as I already stated... I don't know anything about your code, so I don't know if it is comparable to this IOTD... So that figure by itself doesn't mean anything...

Again, it has been developped in parallel with Jacco's, and the basic features are more or less the same.
In english it's a Wald style raytracer with a SAH kdtree compiler bolted on.

What does your code, on your box, do when compiled with icc?

As stated earlier, it runs. Faster in 32bit, slower in 64bit.
And not just for the rendering part.

Compilation times (SAH, enhanced heuristic, 64bit):
gcc:
~> first node done in 27.020 seconds.
build::build: 69.730 seconds for 247120 tri, nodes 1282341, leaves 641171.
build::build: stats: max lvl 25, 1324318 items, 204631 empty leaves ( 32%), 96 max items per leaf.

icc:
~> first node done in 27.058 seconds.
build::build: 82.836 seconds for 247120 tri, nodes 1282341, leaves 641171.
build::build: stats: max lvl 25, 1324318 items, 204631 empty leaves ( 32%), 96 max items per leaf.

Rendering a simple model (legocar), with nothing but basic features (because it's even worse for icc otherwise), rounded, 64bit:
gcc: 603xKray/s, 39.x ms, 25.1x fps
icc: 544xKray/s, 44.x ms, 22.7x fps

And by icc i really mean icc9.0 (for Intel(R) EM64T-based applications, Version 9.0 Beta Build 20050324) because it's worse with 8.1. IPO and everything turned on (as could attest those insane compilation times).

Gcc is from a recent snapshot namely,
Using built-in specs.
Target: x86_64-linux
Configured with: ../configure --prefix=/usr/local/gcc-4120050501 --with-gcc --enable-languages=c,c++ --disable-multilib --with-cpu=k8 x86_64-linux
Thread model: posix
gcc version 4.1.0 20050501 (experimental)

Tests done on an Opteron 146 (2ghz).

Is that enough or do you want even more?

And what does a P4 do with your code?

As stated earlier, i don't have access to a 64bit enabled P4.
And unlike you, i don't speculate.

To alleviate the global warming and in a bandwith saving move i won't comment the gibberish found in the last half of your post.

 
Scali

May 04, 2005, 04:33 AM

dummy wrote: To alleviate the global warming and in a bandwith saving move i won't comment the gibberish found in the last half of your post.


I will ignore the gibberish in your post then, and restate that you really have a problem in the way you react on people who disagree with you. Don't you get it? I really don't care what you say anymore. All this childish banter of yours makes me not even want to bother listening to what you say. I can't take you seriously.

If you weren't so childish, you could at least admit that I did have some valid points in the texture-filtering discussion. At least davepermen thinks I did. Or have you not seen any of his code either, so you assume he doesn't know anything?

 
davepermen

May 04, 2005, 05:01 AM

HEY! I DO NOT KNOW ANYTHING!

oh wait.. you supported me :D

hehe, my filtering works currently, now i just have to recode it for texturing something :D

lets see when i get time for that step..

 
dummy

May 04, 2005, 05:11 AM

Scali wrote: I will ignore the gibberish in your post then, and restate that you really have a problem in the way you react on people who disagree with you.

Err, you don't disagree with me per se but with facts, measures and other reproducible things.
And you haven't provided any yet to prove your point.
You don't make sense. At all.
So don't expect a civilized discussion.

If you weren't so childish, you could at least admit that I did have some valid points in the texture-filtering discussion. At least davepermen thinks I did. Or have you not seen any of his code either, so you assume he doesn't know anything?

Davepermen, unlike you, isn't mesmerized by the sound of his own voice as to not listen to what other ppl say.
Now would you keep that other thread where it belongs and discuss the topic at hand?

 
Scali

May 04, 2005, 05:29 AM

dummy wrote: Davepermen, unlike you, isn't mesmerized by the sound of his own voice as to not listen to what other ppl say.


That's rich, you should look in a mirror sometime. You're the one not listening to anyone else. Plenty of evidence of that in this thread right here.
I listen to other people... but not when they talk rubbish like "the number of polys in a scene affects the texture filtering required".

My impression of you so far has been that you have a very limited insight in raytracing/texturefiltering (based on that polycount nonsense), and despite your limited knowledge (or perhaps because of it), you insist that you are right, and everyone else must be a clueless idiot. Looks like someone here is insecure about his ego.

Just think about this one... Why was it possible for me to have a serious discussion about texturefiltering with davepermen, but not with you?
Look at where you went wrong.

 
davepermen

May 04, 2005, 06:15 AM

i think you should both look into the mirror while acting against the other one, and then note you both behave about the same against eachother. not against third persons, like me. both behave nice towards me. but dummy scali is a misscombination that just results in both acting childish.

problem is:
both have points
both have knowledge
both think the other one acts stupid
both act stupid

get over it. eighter forget about these discussions, and start some new ones, without any personal attacks, or continue discussing and try to find a solution that way.

but you both have to stop acting like .. morrons.


so, please cool down and chill. both of you :D everyone is proud of his work, believes in it, and in its own measurements. we know all that those can differ by a great margin sometimes. thats why i stopped measuring, and moved towards theoretical subjects, away from performance coding.

i prefer to dj:D there, everyone is happy as long as it sounds good. no one asks why :D no one thinks he knows bether. if people are happy, then so am i :D

please both cool down :D

 
Scali

May 04, 2005, 06:20 AM

i think you should both look into the mirror while acting against the other one, and then note you both behave about the same against eachother. not against third persons, like me. both behave nice towards me. but dummy <-> scali is a misscombination that just results in both acting childish.


I really don't think I have to take any of the blame for this... Things went fine until dummy started claiming I didn't write any raytracers, and asked me to prove my skills with showing examples of my code.
What kind of nonsense is that in a technical discussion?
The way I see it, he started acting that way, because he realized I had a point, and he could no longer win the discussion on technical arguments.
Then he started to overreact on some comment I made on icc aswell. Really, it's just pathetic.
I tried to stay calm and friendly, but the guy just kept on insulting me.

 
Corre

May 04, 2005, 06:29 AM

davepermens advice is good. Take it.

 
Daniel Povlsen

May 04, 2005, 06:56 AM

Hi Jacco,

That is some really impressive work you have done. I think I am speaking for many when I say that I am hoping to see another installment of your very nice article series, Raytracing Topics & Techniques. It seems like you have come a long way since the last article - please share some of your gems with us. :-)

Cheers,

Daniel

 
Scali

May 04, 2005, 07:03 AM

Oh, everyone against the 'new guy', is it?

 
Nick

May 04, 2005, 07:05 AM

Nobody answer that. He loves it: http://www.flipcode.com/cgi-bin/fcarticles.cgi?show=65113

 
Scali

May 04, 2005, 07:27 AM

Ah, another "I'm always right, even when I'm wrong"-guy joins the party... geez.
Still pissed about me pointing out the flaw in 'your' shader?

 
davepermen

May 04, 2005, 08:12 AM

i've enough psychological discussions in reallife, with people having problems with each other, missunderstanding, and hanging up into an endless loop. i'm one doing that myself all the time, had big problems to see my errors and faults, and even to say i'm wrong.

believe me i know your position, but you're NOT the white paper you try to be. you're no bether than dummy. but it's up to you to get that.

 
Scali

May 04, 2005, 08:24 AM

davepermen wrote: you're no bether than dummy. but it's up to you to get that.


I know that, I'm fighting fire with fire... an eye for an eye... etc.
But that is just a reaction, not an action.
The action was to just insult my knowledge... I decided to not just let that slip, especially not since I actually made a valid point, and he didn't, so I reacted.
But I would never make that action... I think making the action is far worse... if you make the action, you should expect the reaction.

 
Corre

May 04, 2005, 08:27 AM

Can't let it go, eh?

Anyone know if there is an "ignore user" option on this forum?

 
Scali

May 04, 2005, 08:42 AM

Yea, I could use it to ignore people like you, who just randomly start attacking people.
What the heck are you trying to achieve?
You are just another person making the action, expecting a reaction.
You're no better than dummy... You're actually worse, because you never even tried to seriously participate in a discussion, you just started flaming right away.
The same goes for Nick ofcourse.

 
davepermen

May 04, 2005, 08:58 AM

you should never insult or attack nick, he's one of my favourites. and with reason. with much reason.

no mather what action happens, you should NEVER react similar, if you dislike the action. NEVER. you should always be the smart one, and not let yourself go down onto the same primitive level wich you don't want to get attacked on.

but you do, thus you're yourself no bether than dummy. merely worse, as you think you are bether.

 
Scali

May 04, 2005, 09:04 AM

davepermen wrote: you should never insult or attack nick, he's one of my favourites. and with reason. with much reason.


Well, as you can see, it's him attacking me, not the other way around.
I don't attack people, and I rarely go as far as insulting them, even if they insult me.

no mather what action happens, you should NEVER react similar, if you dislike the action. NEVER. you should always be the smart one, and not let yourself go down onto the same primitive level wich you don't want to get attacked on.


I don't think I've sunk quite as low as dummy... I never asked him to show any of his code to prove his point, for example... nor did I question his knowledge on the basis of him disagreeing with me.

I don't think I go quite as far as Nick or dummy do.

 
davepermen

May 04, 2005, 09:40 AM

i think it sounded just as bad, the way you wrote. you painted all of dummys statements meaningless without showing anything by yourself that supports your statements. looks quite attacking, insulting, and doesn't show any base you can stand on.

even while YOU think it wasn't bad, at least dummy thinks you where unfair threating him. and you have to accept that, and change your behaviour to show you didn't wanted to attack him.

this is the first real lesson i've learned with women: you don't have to understand why they have a problem with you, why they mean you do something wrong, or hurt them, or what ever. you just have to accept it. and then, you can show that you don't want to, as you actually love her (in case of a gf). and _then_ you can start to find out why she felt that way.

but the first and most important step to find together again, and not end this bullshit in a big war with you against anyone is to simply accept the other view. you don't need to understand dummys feelings, but you have to accept them.



and you should never ever ever ever attack nick :D NEVER :D

 
Scali

May 04, 2005, 09:53 AM

davepermen wrote: you painted all of dummys statements meaningless


Don't know what you mean... if you mean that whole compiler thing, that was not a discussion to begin with... dummy wanted to make it a discussion, which I just never joined.

without showing anything by yourself that supports your statements.


I don't know about this either... I get the feeling that you can only post here if you put your resume and your code up first.
As you yourself agreed, my ideas on texture filtering weren't all that crazy... so what does the rest matter then... Does it matter who I am, or what I've coded? Doesn't change anything about the ideas and statements I've posted. They'd still be just as right, or just as wrong.

even while YOU think it wasn't bad, at least dummy thinks you where unfair threating him. and you have to accept that, and change your behaviour to show you didn't wanted to attack him.


Well that's nice and all, but so far I've had you, Nick and Corre discussing my behaviour, while nobody seems to discuss dummy's behaviour... which is the whole reason for all of this.
As far as I'm concerned, dummy got what was coming to him, and he should change his behaviour if he doesn't like the way he was treated now.
You don't just go around insulting people for absolutely no reason (having a different opinion is NOT a reason!), and think you can get away with it.
So dummy has to change, and that's the end of it. If he doesn't go around insulting people, then people will see no reason to react to it.

 
ZEN

May 04, 2005, 10:21 AM

i haven't seen any results like that, do you have any links on benchmarks or demos? preferably not affiliated with the physics card manufacturers.

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