From: Martin R. <ma...@MP...> - 2004-10-28 13:09:13
|
Hi Andreas! > I committed some improvements to the triangle mesh code. > It now uses a fast rejection mechanism, which can speed up > rendering of the teapot scene by a factor of about 4. It seems to work nicely for me, thanks! > Next thing would be hierachical ordering of the triangles to > handle hudge meshes. > > I also added code to smooth the triangle mesh using normal > interpolation. The teapot looks much nicer now. > > Apart from the triangle mesh stuff I submitted a patch in the > source forge system. It introduces a flexible sampling class. > This comes from my path tracing code, but I already added > it to the ray tracer which uses it for subsampling pixels. > See phongtest.cxx for an example how to use it. > > Please have a look at the patch. I'd like to commit it to CVS > if nobody shouts... ;-) I can't look very deeply at the moment. In any case I think you should move the SAMPLING2D class into utils, since it is not needed by anything in kernel/. There also seems to be some complicated interaction between the renderer and the sampling object in RAYTRACER::Get_Pixel(). It might be easier to have a method SAMPLING2d::Calc_Pixel(u,v,du,dv), which in turn calls Renderer->Trace_Camera_Ray() as often as it needs to, and returns the final colour. This is possible since the renderer is a public global variable, and it would make the interfaces and interactions much simpler. Thanks, Martin |