Horde3D
http://horde3d.org/forums/

Doom3 Style UI
http://horde3d.org/forums/viewtopic.php?f=7&t=1683
Page 1 of 1

Author:  Christoph [ 19.06.2012, 12:56 ]
Post subject:  Doom3 Style UI

Hi,

I was thinking about how to do this (Doom3 UIs):
Image

The basic idea behind these "in world user interfaces" is usually:
  1. render the UI to a FBO
  2. use the FBO as Texture for the the world geometry (console/computer/whatever) so that it gets properly shaded
  3. map the cursor using raycasting and projection to the UIs plane
  4. implement the usual textbox-focus handing

I see two options to implement this:
  • write a Horde3D Extension (class UINode : public SceneNode - should be good, but tricky to implement, but there is a "reference implementation")
  • use h3d(Un)MapResStream and convert the FBO to a H3DRes (using CPU - this will be slow!)

Am I right about this?

Author:  Volker [ 19.06.2012, 14:18 ]
Post subject:  Re: Doom3 Style UI

Not sure what system you are planing to use for rendering the UI, but another possibility would be to create an extension that allows only the creation of Horde3D texture resources by using existing OpenGL textures created outside of Horde3D.
That's something I did some time ago but it felt a bit hacky because normally Horde3D should abstract the rendering backend from the user, so OpenGL texture IDs are not supposed to be passed to Horde3D (extensions).

Author:  MistaED [ 20.06.2012, 02:26 ]
Post subject:  Re: Doom3 Style UI

This might be the perfect place to start:
http://horde3d.org/forums/viewtopic.php?f=6&t=1065
Looks exactly like what you're after :)

Author:  Christoph [ 20.06.2012, 17:35 ]
Post subject:  Re: Doom3 Style UI

Volker wrote:
Not sure what system you are planing to use for rendering the UI, but another possibility would be to create an extension that allows only the creation of Horde3D texture resources by using existing OpenGL textures created outside of Horde3D.

This is a good idea, because we're currently evaluating the use of CUDA/OpenCL, thus integration would be easier. Thanks.

Author:  Volker [ 20.06.2012, 18:27 ]
Post subject:  Re: Doom3 Style UI

Just found the old code. Actually I haven't created the texture outside but within Horde3D and passed the OpenGL ID back to the external rendering system. It's not a big deal and never was used in productivity cases, but maybe you can benefit from it somehow.

I adjusted the code to compile with beta 5 but haven't setup a test scenario, so maybe the ImageSpriteNode functionality will not work anymore.

Attachments:
Gui.zip [10.47 KiB]
Downloaded 1110 times

Page 1 of 1 All times are UTC + 1 hour
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/