[SOS] Is the wind effect in PG only for special trees?

sunrisefe

05-05-2009 02:58:06

From example8 of PG, wind effect is supplied. However, when change the tree's mesh to others, the trees dont display.
For example, I change the Entity *tree2 = sceneMgr->createEntity("Tree2", "fir14_25.mesh"); to Entity *myEntity = sceneMgr->createEntity("Tree", "yezi.mesh"); why the yezi tree doesn't display in the scene? Is the wind effect only for special trees supplied in the example or special trees that meet some reqiurement? My yezi.mesh's relative material is as follows:

yezi.material file:

material 123321/Material_#429
{
technique
{
pass
{
ambient 0 0 0 1
specular 0 0 0 1 10
scene_blend alpha_blend
alpha_rejection greater 128
cull_hardware none
cull_software none

texture_unit
{
texture_alias Map #133
texture shu1.png
}
}

}

}

material 123321/Material_#430
{
technique
{
pass
{
ambient 0 0 0 1
specular 0 0 0 1 10
alpha_rejection greater 128

texture_unit
{
texture_alias Map #135
texture shu1.png
}
}

}

}

Hackslash

06-05-2009 11:24:17

Did u set the first Parameter of setCustonParam to your new Entity name (Tree)?


Entity *myEntity = sceneMgr->createEntity("Tree", "yezi.mesh");
treeloader->addTree(myEntity , pos, yaw, scale); // pos, yaw, scale of myEntity
trees->setCustomParam(myEntity->getName(),"windFactorX", 10 / scale);
trees->setCustomParam(myEntity->getName(),"windFactorY", 0.0005 / scale);


Code is not tested but should work.