Sibylle Steck (sib++at++kyb.tuebingen.mpg.de)
Fri, 19 Feb 1999 09:45:20 +0100
I have an application with a lot (180) of billboards. The Billboards cause a
performance leakage. I have modeled a tree as a billboard in MultiGen. I load
the tree and make several SCS with coordinates. I have attached my code.
How can I improve my performance?
Is it better for the performance to use the billboards, implemented with the
example code libpf/C++/billboard.C?
Is there any sample code, which use this billboards?
On the very interesting billboard page from Angus Dorbie a method is described,
which update the billboard not every frame, is there any sample code available?
Thanks in advance for your help.
Sibylle Steck
P.S.: We have a OnyxII 3 pipe InfiniteReality2
void SceneryPerformer_C::scnPlantTree(double x, double y, double alpha, int
placeNumber)
{
pfMatrix mat, matT1, matT2, matR, matTmp;
static int i = 0, j = 0;
static int jMax;
double beta;
pfSCS *treeSCS;
float treeMatrix [6][2] = {
{40.8, 12.4}, {38.1,27.4}, {30.2,42.4},
{19.9, 51.4}, {5.3, 45.4}, {-8.7, 39.4}};
beta = alpha - 30.0;
jMax = 3;
scnRoot = pfdLoadFile("tree1.flt");
for (i = 0; i<6; i++){
for (j = 0; j<jMax; j++){
matT1.makeTrans(treeMatrix[i][0],treeMatrix[i][1], 0);
matR.makeRot(beta+j*120.0, 0,0,1);
matTmp.mult(matT1, matR);
matT2.makeTrans(x, y, -3.0);
mat.mult(matTmp, matT2);
// static coordinate system
treeSCS= new pfSCS(mat);
treeSCS->addChild(scnRoot);
myScene->addChild(treeSCS);
treeSCS->setTravMask(PFTRAV_ISECT, 1, PFTRAV_SELF, PF_SET);
}
}
}
-- -----------------------------------------------------------_/ _/ _/_/_/ _/_/_/ Sibylle Steck _/_/ _/_/ _/ _/ _/ Max-Planck Institut f"ur _/ _/ _/ _/_/_/ _/ biologische Kybernetik _/ _/ _/ _/ Spemannstrasse 38 _/ _/ _/ _/_/_/ 72076 T"ubingen, Germany
phone: +49-7071-601 630 fax : +49-7071-601 616 web : www.kyb.tuebingen.mpg.de email: sibylle.steck++at++tuebingen.mpg.de -----------------------------------------------------------
This archive was generated by hypermail 2.0b2 on Fri Feb 19 1999 - 00:45:29 PST