Etty
14-05-2013 13:09:32
Hello,
I had two problems with my impostors. Their positions weren't perfect and the png generated had no image for most of my entities ( probably cause they were too small i think ).
In ImpostorPage.cpp I changed the code in void ImpostorTexture::renderTextures(bool force) to this :
This fixed both problems. My results :
Using batch page :
Same place but from farther with impostors :
Same view after I edited the code :
( notice you see bushes impostors now )
And about the png, here is the one for bushes ( the one given with pagedGeometry ) :
( yes it's all transparent )
After my edit :
And for the tree before :
and after :
( they are more centered )
Adding Vector3(10, 0, 10) was probably not here by mistake so I'm wondering what was its role ? Am I correct to change it or will it have an undesired effect ?
I had two problems with my impostors. Their positions weren't perfect and the png generated had no image for most of my entities ( probably cause they were too small i think ).
In ImpostorPage.cpp I changed the code in void ImpostorTexture::renderTextures(bool force) to this :
Ogre::SceneNode *n1= node->createChildSceneNode();
n1->attachObject(entity);
//n1->setPosition(-entityCenter + Vector3(10,0,10)); // EDITED
n1->setPosition(-entityCenter + Vector3(0,0,0));
Entity *e2 = entity->clone(entity->getName() + "_clone");
Ogre::SceneNode *n2= node->createChildSceneNode();
n2->attachObject(e2);
//n2->setPosition(-entityCenter + Vector3(10,0,10)); // EDITED
n2->setPosition(-entityCenter + Vector3(0,0,0));
This fixed both problems. My results :
Using batch page :
Same place but from farther with impostors :
Same view after I edited the code :
( notice you see bushes impostors now )
And about the png, here is the one for bushes ( the one given with pagedGeometry ) :
( yes it's all transparent )
After my edit :
And for the tree before :
and after :
( they are more centered )
Adding Vector3(10, 0, 10) was probably not here by mistake so I'm wondering what was its role ? Am I correct to change it or will it have an undesired effect ?