Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!rpi!kyriazis From: kyriazis@iear.arts.rpi.edu (George Kyriazis) Newsgroups: comp.graphics Subject: Re: Ray Tracing Optimization Idea Message-ID: <4m4f2d-@rpi.edu> Date: 24 Mar 91 03:29:31 GMT References: <1991Mar21.183340.19319@dartvax.dartmouth.edu> <9B}=P0$@rpi.edu> <1991Mar24.012243.27780@dartvax.dartmouth.edu> Organization: Rensselaer Polytechnic Institute, Troy NY Lines: 50 Nntp-Posting-Host: iear.arts.rpi.edu In article <1991Mar24.012243.27780@dartvax.dartmouth.edu> npw@eleazar.dartmouth.edu (Nicholas Wilt) writes: >In article <9B}=P0$@rpi.edu> kyriazis@iear.arts.rpi.edu (George Kyriazis) writes: >>1. Since you are firing a ray from the object to the eye anyway, why not >> fire a ray from the eye to the object like you are doing normally? >> You'll be looking through the object database anyway. It all depends >> if the scene complexity is higher infront of the eye or behind the eye. >> When you fire a ray towards the eye, you may have complicated objects >> behind you that you may hit now that you did not hit before. If you >> are using some kind of voxel technique to walk through the scene, I >> think that you'll be just complicating the intersection algorithm. > >True. But how often is the scene complexity behind the eye? This >seems like an uncommon occurrence to me. If the scene complexity is >behind the eye, and the objects there aren't likely to be reflected >by mirrors in front of the eye, then they should be culled from the >database before you start tracing anyway. > It is not uncommon to be doing a flyby of a scene. In that case, you will most definetely have objects behind the eye. You are welcome to get rid of the objects from the database, but you may have to re-build the extent hierarchy, which could be inefficient in some cases. As I said before though, in some cases (voxel walking) you won't even have to cull the objects, since you can stop walking through the voxels if you hit the voxel that the eye sits on. >>2. Why do you think that works just for primary rays? It looks to me > >Because it exploits the tendency for objects in the scene to occupy >adjacent pixels. > True. But you can keep a cache for each object that contains the last object that a ray that emerged from the first object hit. In that case, the eye can be thought of as just another object. I think I implemented that method a while ago with some success. >find-nearest-intersection code. As implemented, it generates polygon- >intensive images _much_ faster, but quadric-intensive images much > What is your ratio of primary to secondary rays? If you are saying that polygon images are generated _much_ faster, that means that your primary/total number of rays ratio must be pretty close to 1. If it is, that means you are not getting too many reflections and refractions, not to mention light rays, so why bother ray-tracing? An image with not too many reflections and no refractions gives me a ratio of .3 -- ---------------------------------------------------------------------------- George Kyriazis kyriazis@iear.arts.rpi.edu kyriazis@rdrc.rpi.edu kyriazis@orion.phys.rpi.edu ----------------------------------------------------------------------------