Rendering GUI to flat quad in 3D space

For virtual reality, it’d be great if I could take what is drawn on the GUI & make it a floating quad infront of the player.

Currently, I convert GUI elements to render in the Translucent bucket, on a scaled node floating infront of the player. However, the Z coordinate is tricky. I don’t necessarily want things popping out at the player from the GUI node, but I need to order elements so they are not hidden behind each other. The normal GUI node, with paralell projection, just kinda looks flat – which is what I want, but in a positional floating space infront of the player.

Do I need to render to texture somehow here…? Thank you for the help!

Yeah, if you want a flat UI then you’d render to texture. You don’t really say how your GUI is constructed (or which library you use) so it’s hard to offer specific advice.

But the render to texture example is what I used when I needed to do this.

I’m not using any external libraries to draw the GUI. Just trying to take something originally drawn on the guiNode in the GUI bucket, but instead projected on a flat quad in 3D space. I presume this is what I’ll need to do?

http://jmonkeyengine.googlecode.com/svn/trunk/engine/src/test/jme3test/post/TestRenderToTexture.java

1 Like

That’s what I used to learn how to do it.