GUI questions for a newbie

Hello everyone,



I’m looking into making a custom GUI right now and am not planning to use NiftyGUI (I’d like to build the GUI from the ground up). So I’ve been trying to figure out how to do this with JME3 and have a few questions.



First, what’s the difference between a MainView and a PostView? It seems like the PostView is rendered after all the MainViews? Does this mean that objects in a postViewPort will always stay static and cannot be animated, transformed, etc.?



Does the GUINode differ fundamentally from the RootNode? It appears to be the same, but the GuiNode is attached to a postViewPort rather than a main ViewPort. It also is not attached to the RootNode, which I thought was necessary for anything to be rendered and displayed–so how is it that GUI elements attached to the GUINode are displayed?



Finally, could I create a custom guiCam that is associated with a MainView instead of a PostView? Would this enable me to render a GUI within the main game view that can display dynamic images, animations, etc. I’d have to translate and zoom it with the player’s viewpoint so it maintained the same position and size. I’m guessing I’d have to render it right at the closest possible depth for the camera view (just inside the frustrum) and then figure out some way to make sure game objects don’t “poke through” the GUI. Does any of this make any sense or am I crazy? :slight_smile:



I’m going to play around with this stuff over the next few days, but any guidance that could save me time and steer me in a better direction would be most appreciated!

It seems like the PostView is rendered after all the MainViews? Does this mean that objects in a postViewPort will always stay static and cannot be animated, transformed, etc.?

Yes a post view is rendered after main views, but I don't see how you come to your conclusion after that.

Does the GUINode differ fundamentally from the RootNode? It appears to be the same, but the GuiNode is attached to a postViewPort rather than a main ViewPort. It also is not attached to the RootNode, which I thought was necessary for anything to be rendered and displayed–so how is it that GUI elements attached to the GUINode are displayed?

???
The gui node is attached to a post viewport. All viewports are rendered, thus gui node is rendered.

Finally, could I create a custom guiCam that is associated with a MainView instead of a PostView? Would this enable me to render a GUI within the main game view that can display dynamic images, animations, etc. I’d have to translate and zoom it with the player’s viewpoint so it maintained the same position and size. I’m guessing I’d have to render it right at the closest possible depth for the camera view (just inside the frustrum) and then figure out some way to make sure game objects don’t “poke through” the GUI. Does any of this make any sense or am I crazy?

There's no need to do any of that... Just use the current system.
The reason that the gui viewport is separate from the main one is so that special effect filters attached to the main viewport do not apply to the gui, thats all.

Ah, I think I see where I’ve gone astray. I swear I read that JME3 doesn’t do GUIs beyond basic text and still pictures and for some reason took that to mean that it simply cannot do anything else–when in reality, I should just be able to extend and build upon what’s already there.



I’ll play with things a little more in the next day or two and straighten my thinking out. Thank you!