Path: chuka.playstation.co.uk!news From: "Mario Wynands" Newsgroups: scea.yaroze.programming.3d_graphics,scee.yaroze.programming.3d_graphics Subject: Billboarding - fast method? Date: Wed, 6 May 1998 15:53:21 +1200 Organization: Sidhe Interactive Lines: 53 Message-ID: <6iomsu$jpr33@chuka.playstation.co.uk> NNTP-Posting-Host: p9-max5.well.ihug.co.nz X-Newsreader: Microsoft Outlook Express 4.72.2106.4 X-MimeOle: Produced By Microsoft MimeOLE V4.72.2106.4 Xref: chuka.playstation.co.uk scea.yaroze.programming.3d_graphics:237 scee.yaroze.programming.3d_graphics:539 I am once again revisiting the topic of billboarding (thats having objects always face the camera when they are drawn). Given that I want to be able to use this effect for rendering (amongst other things) particle objects, I am looking for the fastest solution possible that doesn't directly affect the coordinate system of the object itself. At the moment I am trying to do the appropriate transformation at draw time by modifying the screen transformation matrix along the lines of - void DrawTMD(GsDOBJ2 *dobj, GsOT *ot, int billboard) { MATRIX screen_matrix; GsGetLs(dobj->coord2, &screen_matrix); if (billboard) { screen_matrix.m[0][0] = ONE; screen_matrix.m[0][1] = 0; screen_matrix.m[0][2] = 0; screen_matrix.m[1][0] = 0; screen_matrix.m[1][1] = ONE; screen_matrix.m[1][2] = 0; screen_matrix.m[2][0] = 0; screen_matrix.m[2][1] = 0; screen_matrix.m[2][2] = ONE; } GsSetLsMatrix(&screen_matrix); // perspective, etc) GsSortObject4(dobj, ot, 14 - ot->length - OT_SHIFTMOD, (u_long *)getScratchAddr(0)); } This kind of works, but by zeroing out all the rotations I am also the killing perspective transformation meaning the object is slightly stretched. I am using a reference point camera system so I don't really want to redo the perspective correction if I can help it. Has anybody stumbled across a way to leverage the Yaroze libraries to perform billboarding at draw time? Thanks Mario