[Gman-toolkit-devel] Architecture
Status: Inactive
Brought to you by:
john187
From: Daniel B. <dac...@pi...> - 2001-01-06 22:12:44
|
Hi all, I've been looking over the code strucutre so far and I have some questions. I just finished a course of computer graphics last term and one of the assignments was to write a ray tracer; I figured I would try to put in the basics of one into gman, since they aren't too hard to get going. But I am confused as to how you see the different renderers working and what exactly the inheritance levels represent. In the zbuffer code it iterates over each body, surface and face. What do each of these correspond to? I am guessing that it is something like body: compound object, eg. polymesh or nurbs mesh surface: single object eg. polygon or nurbs surface face: tesselated object faces eg. 200 triangles for a nurbs surface Is this right at all? If so (or if not), where are objects tessellated (or where WILL they be tesselated). What is the relationship between GMANPrimites and GMANObjects/Bodies etc.? What is the purpose of the getRSSphere etc. functions? How should they be called and from where? Anything else you think I might need to know to take a crack at raytracing? Also, two quick comments. The intersects function needs to return a t value which is the distance of the intersection from the eye (divided by ray length, usually). I know it's early for this, but I am not sure the radiosity renderer should really be a renderer. I think it's more of a prepass that calculates lighting (at verticies) that the real renderer uses later. In other words, it can act as input for either a zbuffer, raytracer or anything else. Could be wrong here, but... (besides, I think it's kind of early to start worrying about that too much, on the other hand, best to get your architecture down pat early). Thanks for the help and with a little luck I'll pay it back in code shortly (no promises, another busy term ahead, as always :) Daniel |