| 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 :)
|