andrea@hp-sdd.HP.COM (Andrea K. Frankel) (03/02/88)
I've just started looking at the problem of rendering polygons with different colours specified for each vertex, and I'm hoping there are some good references out there! (Of course, free code which is portable, debugged, and documented would simplify matters ever so much ;@) ;@) ;@) Seriously, though, any help getting started would be appreciated. Andrea Frankel, Hewlett-Packard (San Diego Division) (619) 592-4664 "...like a song that's born to soar the sky" ______________________________________________________________________________ UUCP : {ihnp4|decwrl|sun|tektronix|<other hub>}!hplabs!hp-sdd!andrea or {nosc|hpfcla|sdcsvax}!hp-sdd!andrea Internet : andrea%hp-sdd@ {nosc.mil | sdcsvax.ucsd.edu | hplabs.HP.com} CSNET : andrea%hp-sdd@hplabs.csnet USnail : 16399 W. Bernardo Drive, San Diego CA 92127-1899 USA
sow@cad.luth.se (Sven-Ove Westberg) (03/06/88)
In article <1203@hp-sdd.HP.COM> andrea@hp-sdd.UUCP (Andrea K. Frankel) writes: > >I've just started looking at the problem of rendering polygons >with different colours specified for each vertex, and I'm hoping >there are some good references out there! (Of course, free code >which is portable, debugged, and documented would simplify matters >ever so much ;@) ;@) ;@) Seriously, though, any help getting started >would be appreciated. > > >Andrea Frankel, Hewlett-Packard (San Diego Division) (619) 592-4664 > "...like a song that's born to soar the sky" The question is trival as soon as you have defined your interpolation path in the colorspace. Most postprocessors for finite element programs has this feature. Get one and you get the algorithms in FORTRAN!!!! :-) :-) But you can use the hardware for gouraud shading, together with a clever loaded lookup table. This is a short description of the loading of the lookup table. As known gouraud shading does a linear interpolation of the intensites in the vertex over the surface. Load the lookup table with color values from your selected path in the color space. When you now gives values from this path as the "intensity values" to the vertex the shader will do the colorinterpolation. Here we got a small problem. If you have a 3D object which you want to render with color fringes. The object will appear totaly flat. But if you section the table in different sections you can have a number of colorpathes (the same path with different illumination). Then you can render different sides in different shades. A sketch of the lookup table: 123456789123456789123456789123456789123456789 aaaaaaaaabbbbbbbbbcccccccccdddddddddeeeeeeeee 1-9 the values of a colorpath. a-e different shades of the colorpath. I have implemented this in MOVIE.BYU which utilises the GP/GB hardware on a Sun workstation. Unfortunally I don't have access to the lower level routines in SunCore so the implementation is not as beutiful as it could be. And NOW my question!!! Did anyone knows anything on SunCores internals?????? Sven-Ove Westberg, CAD, University of Lulea, S-951 87 Lulea, Sweden. UUCP: {uunet,mcvax}!enea!cad.luth.se!sow Internet: sow@cad.luth.se