[SOLVED] Cannot find SceneNode "ImpostorPage::renderNod

pissantgod

07-05-2008 06:20:45

First, allow me to say that this add-on looks amazing! Excellent work! :D

I am having a problem (I don't know if it's my code or PagedGeometry's that is the cause) with using the impostor LOD. My code exactly matches the basic setup for adding trees in the tutorial and the examples (believe me, I've checked again and again!) Basically, when a tree that falls within the range of the impostor LOD is encountered, Ogre throws an ItemIdentityException. It appears that it can't find a scene node called "ImpostorPage::renderNode". If I comment out the code that sets the LOD for the ImpostorPage, everything works fine (rendering just using batch LOD).

Any idea what the problem could be?

Thanks!

pissantgod

07-05-2008 20:43:25

For the sake of simplicity, here's my code:

m_pTrees = new PagedGeometry(m_pCamera, 50);
m_pTrees->setInfinite();
m_pTrees->addDetailLevel<BatchPage>(1000, 100);
m_pTrees->addDetailLevel<ImpostorPage>(1500, 100);

TreeLoader2D * pTreeLoader = new TreeLoader2D(m_pTrees, TBounds(0, 0, 4000, 4000));

pTreeLoader->setHeightFunction(&HeightFunction::getTerrainHeight);

pTreeLoader->setMaximumScale(4.0f);

Entity * pTree1 = m_pSceneMgr->createEntity("Tree1", "fir05_30.mesh");

for(int i = 0; i < 400; i++)
pTreeLoader->addTree(pTree1, Vector3(Math::RangeRandom(0, 4000), 0, Math::RangeRandom(0, 4000)), Degree(Math::RangeRandom(0.9f, 1.1f)), 4.0f);

m_pTrees->setPageLoader(pTreeLoader);


And then in the frame listener's frameStarted (this is where the exception is thrown):

m_pTrees->update();

Amenothep

08-05-2008 00:50:35

Dunno if that is important

you write


Impost------------------>e<-------------rPage::renderNode




Source states: ImpostorPage.cpp

if (++selfInstances == 1){
//Set up a single instance of a scene node which will be used when rendering impostor textures
geom->getSceneNode()->createChildSceneNode("Impost---------->o<----- rPage::renderNode");
}

Maybe that's just your typo and a red herring, just checking.
:wink:

pissantgod

08-05-2008 00:54:24

Yeah that's just me not knowing how to spell apparently. :wink:

Amenothep

08-05-2008 01:01:53

http://www.ogre3d.org/docs/api/html/cla ... ption.html

Maybe if you try to catch the exception you can nail it down what it doesn't identify.


enum ExceptionCodes {
ERR_CANNOT_WRITE_TO_FILE, ERR_INVALID_STATE, ERR_INVALIDPARAMS, ERR_RENDERINGAPI_ERROR,
ERR_DUPLICATE_ITEM, ERR_ITEM_NOT_FOUND, ERR_FILE_NOT_FOUND, ERR_INTERNAL_ERROR,
ERR_RT_ASSERTION_FAILED, ERR_NOT_IMPLEMENTED
}


http://www.ogre3d.org/phpBB2/viewtopic. ... 6f4e2718c6

Personally I would check that you're synchronising the DLLs correctly, that you're not accidentally mixing different versions, particularly for plugins. Mismatches can result in some very weird errors.


Otherwise maybe because you call it in frame started an not in render as in the examples the texture stuff PG does doesn't work.
:?

If that's not it you have to wait for master John. :shock:

JohnJ

08-05-2008 01:32:59

(Sorry I didn't reply earlier)

Liek Amenothep said, this is likely a DLL synchronization issue. It's extremely unlikely that it's not finding the impostor renderer scene node, due to the way the code works (the impostor scene node is always created when the first ImpostorPage is initialized).

I remember a while back I updated Ogre but forgot to copy the latest Ogre DLLs into my bin folders, and I was getting an obscure bug that was practically impossible to debug, because the DLLs were out of sync.

If that doesn't solve it, then it may be a bug after all. Let me know how it goes.

pissantgod

08-05-2008 21:52:22

I fixed the problem. As I suspected, it had nothing to do with PagedGeometry. =P Again, excellent work on this system, it's quite impressive! :D

mkiv

12-08-2009 14:55:38

I'm having the same problem -

OGRE EXCEPTION(5:ItemIdentityException): SceneNode 'ImpostorPage::renderNode' not found. in SceneManager::getSceneNode at OgreSceneManager.cpp (line 829)


- the examples do compile and run
- I'm using the same version of Ogre (1.6.2) and the same library code (1.05_linux) for both the examples, and my code
- my code runs if I comment out the line:
mTrees->addDetailLevel<ImpostorPage>(400, 50);

could this be an internal memory allocation overflow or error?

mkiv

11-09-2009 09:16:18

The only difference that I can see is that the billboarding demo that works is using 2D trees and I'm using 3D.
I tried debugging the PagedGeometry code to find the cause of the error but the process got messy very quickly.
Catching the exception just plain didn't work.
Any further hints? I'm not using the latest svn version - should I try that?