Draw spatial over all other spatials

Hi guys,



how can I draw a spatial in front of all other spatials? I make a liitle 3D Editor and there I need to show the gizzmo (the three arrows) through all other objects (like i Blender). In jme2 it was done with a RenderPass and the BasicPassManager bit I can’t find a solution in jme3. I tried already with SceneProcessor but it didn’t help, because the SceneProcessor Method

public void postQueue(RenderQueue rq) {

}
need Geometries and no Spatials.



Any help?

Put it on the gui node?

Or if you need it in 3D, another main viewport will also work.

yes, I need it in 3D.



I will try the a second main viewport. Thanks

Use render to texture and draw a quad on GUI?

@InShadow said:
Use render to texture and draw a quad on GUI?


Ewww.... why not just add another main viewport. It will be 1000x faster... and at least 10x easier.

Just when you are managing your own viewport you need to make sure to call the right updateXXX methods on its root node. You can do a forum search (google custom search in the upper right) for ViewportState if you want to see what they are.

To setting up a seconde Viewport was a good idea. Then setting the depth test and depth write to false and my problem was solved.



Thanks a lot.

1 Like