Hi, this my first post to the forums, be gentle
I’ve ran into a bug in jme3, it involves BillboardControl and multiple viewports…
After creating the BillboardControl, I add it to a scene Node named bb, with bb.addControl(bbControl) and get the following error thrown: “SEVERE: Uncaught exception thrown in Thread[LWJGL Renderer Thread,6,main]
java.lang.IllegalStateException: Scene graph is not properly updated for rendering.
Make sure scene graph state was not changed after
rootNode.updateGeometricState() call.
Problem spatial name: Root Node”
Strangely enough, ParticleEmitters dont behave that way, and are rendered correctly, facing the screencamera on all viewports…
I should mention the viewports are rendered to textures, though i doubt i makes a difference… (I use for dynamic planarcubemap reflection)
Thanks in advance, gershon.
Yes that’s because the updateGeometricState is only called on the rootNode in SimpleApplication.
You probably attached a scene to the second viewport, you have to call updateGeometricState and updateLogicalState on the root of this scene on every frame (in the simpleUpdate for example) look at the update method of SimpleApplication to see how it’s done.
The issue is probably where you add it. If you do it after the root node was updated, you will have this error.
10x, but still can’t get it working…
Not sure i understand what Momoko meant though…
Yeah, i’ve attached the rootNode to the second viewport too… should this be done another way?
calling updateGeometricState() & updateLogicalState() didn’t help it… (called in simpleUpdate)
Something about the viewport, I’m using createPreView(), and implementing SceneProcessor, most stuff then happens in postQueue(), ripped off the water reflection stuff, shooting a ray onto a plane to get the reflected position for the camera…
My code’s in a bit of a mess, but i’ll try creating a simpler testcase…
Oh, and i’m using jme3 svn r7222.
10x.
SceneProcessors are executed after the root node is updated, so if you do any modifications to the scene graph there, you will have this error.