Re: Bumpmapping

New Message Reply Date view Thread view Subject view Author view

From: Angus Dorbie (dorbie++at++sgi.com)
Date: 06/12/2000 14:40:04


P.S. Tangent and binormal vecrors should be normalized. Implicit in this
description and my code is the assumption that the texture has been
applied to polygons where the t derivative is at least approximately the
cross product of the s derivative and normal. i.e. if you look at your
texture as viewed looking back down the surface normal is like the
original image, it's not a mirror image and hopefully isn't too
radically sheared. Rotations are OK as is scale etc.

One other thing, if scale changes significantly, you may want to adjust
the coordinate shift in the code so it might be usefull to store a
peturbation value based on the length of the derivatives and weight the
texture peturbation. This will also be resolution dependent because the
shift is in texels so peturbation will be k * derivative_length /
texture_resolution.

Cheers,Angus.

Angus Dorbie wrote:
>
> The bump mapping itself is pretty well documented in my opinion, but I'm
> biased :-). The procedural code to generate the logo has some
> appropriate comments but was never really the objective of the exercise
> and isn't documented. It is pretty complex code.
>
> Ignore my procedural code and strike out on your own, the only missing
> part for geometry which isn't procedurally generated is the production
> of tangent vectors and binormal vectors based on available geoset
> information rather than implicit surface functions.
>
> The tangent vector should be computed using the three dimensional
> texture derivative for the s texture coordinate and the binormal should
> either be the cross product of this and the surface normal or it should
> be the 3D derivative for the t coordinate.
>
> You will want to average these vectors for gouraud shaded contiguously
> texture mapped adjacent triangles, just as you average surface normals
> for gouraud shaded lit objects.
>
> Cheers,Angus.
>
> Sakns wrote:
> >
> > Hi there,
> >
> > Angus has written a couple of bumpammaping demos applying bumpmaps
> > to known/constructed geometry where coords/colos/norms/tex_coords
> > are calculated on the fly by the application.
> > I am trying to generalize the procedure to any pfb file where some
> > of the above might not be specified. But I need to understand
> > better the code and having problems since it is undocumented. Is
> > there a more detailed explanation somewhere?
> > Has anybody else done the same thing?
> >
> > Thank you.
> >
> > =====
> > Athanasios Gaitatzes (Saki)
> > e-mail: gaitat++at++yahoo.com
> > url: http://www.i.am/gaitatzes
> >
> > __________________________________________________
> > Do You Yahoo!?
> > Yahoo! Photos -- now, 100 FREE prints!
> > http://photos.yahoo.com
> > -----------------------------------------------------------------------
> > List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> > Submissions: info-performer++at++sgi.com
> > Admin. requests: info-performer-request++at++sgi.com
>
> --
> For Performer+OpenGL tutorials http://www.dorbie.com/
>
> "In the middle of difficulty lies opportunity."
> --Albert Einstein
> -----------------------------------------------------------------------
> List Archives, FAQ, FTP: http://www.sgi.com/software/performer/
> Submissions: info-performer++at++sgi.com
> Admin. requests: info-performer-request++at++sgi.com

-- 
For Performer+OpenGL tutorials http://www.dorbie.com/

"In the middle of difficulty lies opportunity." --Albert Einstein


New Message Reply Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Jun 12 2000 - 14:40:13 PDT

This message has been cleansed for anti-spam protection. Replace '++at++' in any mail addresses with the '@' symbol.