When geometry disappears from random directions like this, it’s usually because the bounds were not updated and so the object is getting culled at camera angles where it should be visible.
The only other cause of things like this is when competing with a similarly placed transparent geometry… which doesn’t seem like the case here.
its like “tell why my stomach hurts” without telling what i ate/did before it.
You might need provide us more information like some Code examples (Paul already managed to get some required information anyway, but its not enough for your second question)
To explain more, Model Bound when its “out of camera view” it cause Geometry to not render.
So it might help you find reason too.
Sorry, here’s the code that builds both the floor and the ceiling.
private void buildFloor() {
Box b = new Box(w, 0.5f, d);
Geometry g = new Geometry("floor", b);
g.setLocalTranslation(new Vector3f(0, -height*0.5f, 0).add(pos));
Material mat = new Material(manager, matType);
mat.setTexture(lightType, manager.loadTexture(floorTex));
g.setMaterial(mat);
g.setShadowMode(RenderQueue.ShadowMode.Receive);
room.attachChild(g);
}
private void buildCeil() {
Box b = new Box(w, 0.5f, d);
Geometry g = new Geometry("ceil", b);
g.setLocalTranslation(new Vector3f(0, height*1.5f, 0).add(pos));
Material mat = new Material(manager, matType);
mat.setTexture(lightType, manager.loadTexture(ceilTex));
g.setMaterial(mat);
g.setShadowMode(RenderQueue.ShadowMode.CastAndReceive);
room.attachChild(g);
}
Edit: This is the only code I could find dealing with either floor or ceiling.
except unknown lightType, height, w, d, ceilTex vars, it looks fine, so you probably have other code that cause issue.
Myself i had a lot of time issues that i didnt understand,
but its always easy to Debug when you will make easy TestCase, and suddently you might find issue yourself. (and even if not you can post more full-working code to us)
Anyway from my side, based on this code, IMO it should work. (except idk some param values)
My first guess would be that you have VERY BIG SCALE world, so camera frustrum(FAR) might cause some non-rendered mesh.
for example you might have code like rootNode.scale(100) Anywhere in code, and we would never know about it. Thats why TestCase is best option for you.
Yep, I agree. At this point, the best bet is to make a simple single class test case that reproduces the problem. Start with just the ceiling and then start adding things back until the problem occurs.
Either you will figure out your problem or you’ll have complete code to post so we can point to the problem.
When I rebooted by computer, the problem went away. When I’d been using it for another heavy program then ran the program again, it got worse (even the walls were buggy).