[Solved] Opaque object blocks translucent bucket after being removed from the scene graph

I’ve been getting this really weird bug for some time now when sometimes the spacestations’ silhouette stays on the screen after being removed.

Mostly a “shadow” or something of it appears that blocks pixels from rendering in the translucent bucket. This doesn’t make much sense since the station is a completely opaque object (using the lighted material).

(as you can see here the dlsr shadows are turned off so they aren’t likely to be the cause)

Now in some recent tests I’ve seen something like this, to which I can offer no explanation at all.

It seems like the object is somehow still there and being lit by a light, despite the fact that raycasts find no mesh in the scene at that position.

I’d post some code but I’m not sure what exactly triggers it… but I can give you the node removal code if that says anything:

@Override
public void disable() {
    setCullHint(CullHint.Always);
    setShadowMode(ShadowMode.Off);
	
    removeLight(ambientlight);
    ambientlight = null;
	
    detachAllChildren();
}

The space station node is not removed itself (to be reused later) but a parent node of it is detached from the scene graph following this.

The thing is, I think that the removal part isn’t the problem here at all as the oddity gets triggered sometime when the node is still on the graph but the shadow only becomes apparent after its removal.

So I’m asking if anyone has ever seen anything simmilar or has any idea as to what might be going on here since I have no clue. Thanks!

Slight follow up, it also appears that the sections (sub nodes) that the station is made out of get moved to odd locations before becoming ghosts.

I don’t think I have any code that would move them after being created.

Also this.

I think that may be the station’s glowmap overlaid across the entire screen.

Honestly I don’t even know where to start debugging this.

Is removing the bloom filter fixes the issue?

Removing the bloom has no effect. Removing all filters has no effect.

Here it is with the entire filterpostprocessor detached from the viewport:

ok, then that rules that out… which is somehow unfortunate because I have no clue then…
Could you explain the setup a bit more in depth? why is the station in the translucent bucket in the first place?

is it possible you’re firing a ray at a node that doesn’t contain that “ghost”? Are you firing the ray in the app.rootNode?

It’s not, that’s what baffles me the most. It’s a regular opaque object in the opaque bucket. It’s just that it starts to block the translucent bucket after being detached for some reason.

Here’s how the entire spacestation class looks like: Spacestation.java - Pastebin.com

Yes I know “MakeWorld.masklighted” doesn’t say much about its material shader but it happens the same way with a standard lighting.j3md.

It’s then used by this class: PlanetarySystemData.java - Pastebin.com which adds one in one of its constructors. The disablePhy() method then calls all disable() methods in the subnodes. That includes the spacestation which should remove it entirely aside from the node itself.

Yep, modified some guns to do exactly that (double checked now). It’s like it’s not present in the scene as a mesh/geometry at all, like it was only on a gpu buffer somehow if that’s even possible.

Okay by sheer coincidence I realized that it doesn’t happen when there aren’t any damage texture projections going on.

It was the TextureProjectorRenderer. Also explains why the raycasts couldn’t detect it.

Guess I’m axing it from the setup, it hasn’t been working that well lately anyway.

1 Like