
1. On complexity of objects:
We are expecting the objects you submit to be about the same order of complexity as the objects shown in Lecture 1. For example, a simple rectangular bookshelf with parameters setting the number of levels is on the too simple side.
2. CSG (Constructive Solid Geometry)
Some students have asked about possibility of cutting/merging primitives. In general these CSG operations are not supported in Inventor. Clipping plane is an option but please avoid using too many of them as it will get really slow.
3. Programming Language
Any language is fine, *subject to the constraint that the resulting executable satisfied the specification in asst1*. Namely, that it: is executable stand-alone by the staff and by other students; that it accepts parameters on the command line; and that it produces a valid inventor file on stdout.
4. "man -k" not working on linux
"man -k" is currently not working on linux. To use it, the students must log into an IRIX machine in 4-035.
5. How do I change normal vectors?
There are a number of ways to do this. the easiest is to specify only the vertices, and let Inventor compute the normals automatically. Otherwise, you should look at the sample inventor files in the directory given in lecture, and grep for uses of "Normal" and "NormalBinding".
6. Can I use texture maps?
Please don't use textures in your objects for assignment 1. Most graphics cards have limited texture memory, and if too many textures are necessary (for example in assignment 2), the rendering will become intolerably slow. Another problem is that the use of texture introduces external dependencies to your program, which will cause problems when others invoke it in assignment 2.
7. Sample Inventor Models
They are located:
on irix:
/usr/share/data/models/
on linux:
/mit/inventor/distrib/share/data/models/
8. Unknown arguments in Makefile
If your compiler complains about the flag -fullwarn or -Xcpluscomm, try either:
1) compiling on SGI's OR
2) removing those compiler arguments from the Makefile
9. SceneViewer location
/usr/sbin/ on Irix
/mit/inventor/arch/i386_linux24/bin/ on Linux
10. What does it mean to strip the executable?
strip removes symbols and debugging information from executable. To do that, run 'strip uid_object', where uid_object is your executable.
1. Gallery of assignment 1 objects :
http://graphics.lcs.mit.edu/classes/6.837/F02/assignment1/gallery
1. The code we provide only work when the entire object is visible. If any vertices is clipped, the outcome is not determined. For example you will end up with spurious edges in EdgeRecTable[0] . To fix this particular case (optional), you can
On line 431 of ScanWrap.C
change:
for (j = 0; j < env->numPoly; j++) {
to:
for (j = 0; j < env->nextPoly; j++) {
(Contributed by Paul Elliott)
2. Makefile for linux is now updated so that you can compile even with the LD_LIBRARY_PATH set. You can get the updated version of the Makefile from /mit/6.837/F02/asst3/Makefile.linux.new . Copy it to your ivscan directory and rename it to Makefile. (Contributed by Vladimir Fleurima)
3. One way to evaluate your results is to compare them with the results from
the reference executable. To compare images, on Irix you can use /usr/sbin/sub
inimage1 inimage2 outimage to produce a difference image, and /usr/sbin/imgexp
inimage outimage
to expand the dynamic range of the difference image, making discrepancies more
evident.
4. If you cannot compile the original tar package successfully on athena linux, first thing we suggest is to get rid of any .environment file you are using, and any non-standard setenv you have. If it still fails, report to us and in the meantime work in the irix environment.
5. In the LINUX version, you will see some random stripes appearing when you run the blownup versions. This is an unsolved problem of our code on the linux platform and it will not affect your grade. In most cases, you can still tell what pixels you have set. If anybody find out the way to fix this please let us know : )
6. In EdgeRec::Init(), the printf statement given has incorrect type "%d". Change them to "%f". (This is not important as it's just for printing out the debugging purpose)
1. Shininess - the shininess you get that is passed to LightPoint() is not the exponent of the Phong equation. You should multiply shininess by 128 to get that exponent. (In Inventor spec, shininess is ranged between 0 and 1. In OpenGL spec it is ranged from 0 to 128. That's why you will need to multiply by 128)
2. Depth interpolation - Notice depth do not change linearly with respect to screen space x. Its reciprocle does. (This is due to perspective projection)
3. Bugs from assignment 3 - If your assignment 3 is not perfect you should not try to fix it before starting on assignment 4. The thing you need to get correct is the Edge update and the AEL. The rasterization code (RenderScanLine()) for wireframe and polygon is quite different and there are special cases which exist in assignment 3 but it is not a problem in assignment 4 anymore.
4. Horizontal edges - you don't need to deal with them anymore. Indeed with the updated ScanWrap.C you will never see them as they never get into the EdgeTable. They are handled by the span filling of the two adjacent non-horizontal edges. The presence of horizontal edges would very likely cause problems with your span-filling code because they are a degeneracy.
5. Seg fault! - This is very annoying especially for beginners in C/C++. Calm down, this is not the end of world. To figure what is actually going on run 'gdb'. First say 'gdb ivscan.linux' . Then you will get the gdb prompt. Next type 'run myfavorite.iv' (or whatever iv file). Then it will crash somewhere, and it will report which line in which function is crashing. And if you type 'where' it will show you the call stack(the series of function call that take you to the current line of code) Seg fault always occurs because you are trying to access invalid memory locations, which in turn is a consequence of incorrect pointer handling. For example, trying to access the NULL element on the end of the linked list. For more information about gdb see the man pages.
6. rgb images - to view .rgb files, use 'xv'. On athena linux you will need to 'add graphics' first. Right click on the XV window to get the interface.
Assignment 6:
1. There is a wrong comment in SoSpotLight.h
SoSFFloat cutOffAngle; // Angle (in radians) outside of which
// intensity is zero, measured from
// edge of cone to other edge
The cutOffAngle is measured from center to edge, instead of edge to edge.
2. The angular falloff is underspecified by inventor/opengl. So there's no right
answer for this one, just do some attenuation that make use of the cutoffangle
and dropoff rate in a consistent way. (max at center, 0 at cutoff, dependency of
dropoff)
3. In the reference executable, the shininess is multiplied by 256 to get the
Phong exponent.
4. In the reference executable, the reflectionRadiance is multiplied by obj->shininess.
5. RayTraceStart and RayTraceFinish are already implemented in RayTrace.C . You
don't need to add code to that, contrary to what is said on the assignment.
![]()
Last Modified 10/28/2002