Path: chuka.playstation.co.uk!news From: "Craig Graham" Newsgroups: scee.yaroze.programming.3d_graphics Subject: Re: What is a normal? Date: 15 Aug 1998 08:54:35 GMT Organization: PlayStation Net Yaroze (SCEE) Lines: 35 Message-ID: <01bdc829$a8f0a740$230b0a0a@Angela1.intelligent-group.com> References: <35D3F965.D5D79825@nospam.easynet.co.uk> <35D402A6.8830674@parny.force9.co.uk> <01bdc76a$e03e9320$230b0a0a@Angela1.intelligent-group.com> <35D42CF4.A08257E5@ndirect.co.uk> <35D43084.7E98EFAA@nospam.easynet.co.uk> <35D4306C.F7A1B5AF@ndirect.co.uk> <35D435D7.3A82@mdx.ac.uk> NNTP-Posting-Host: d2-s16-110-telehouse.mistral.co.uk X-Newsreader: Microsoft Internet News 4.70.1155 Robert Swan wrote in article <35D435D7.3A82@mdx.ac.uk>... > Alex Herbert wrote: > > > > normals are stored in the TMD. Yes they should be normalised to ONE (4096). You > > don't need to get hold of them unless you are greating/modifyinf TMDs dynaically. > > Check out the File Formats PDF on this site. Ignore the TMD file format HTMD doc > 'cos > > its precisely cos you need to calculate the normals yourself when > creating tmds dynamically that I er, dont include those primitive types > :) seeing as I only ever wanted primitives without light calculations // Cross Product==Normal Vector void CrossProduct(SVECTOR *a, SVECTOR *b, SVECTOR *c, SVECTOR *out) { SVECTOR ab,ac; ab.vx=b.vx-a.vx; ab.vy=b.vy-a.vy; ab.vz=b.vz-a.vz; ac.vx=c.vx-a.vx; ac.vy=c.vy-a.vy; ac.vz=c.vz-a.vz; out->vx=ab.vy*ac.vz - ab.vz*ac.vy; out->vy=ab.vz*ac.vx - ab.vx*ac.v.z; out->vz=ab.vx*ac.vy - ab.vy*ac.vx; } Then unify to length 4096 using the usual methods. > Robert Swan Craig.