Horde3D

Next-Generation Graphics Engine
It is currently 24.11.2024, 04:16

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: Doom3 Style UI
PostPosted: 19.06.2012, 12:56 
Offline

Joined: 09.02.2012, 22:38
Posts: 26
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?


Top
 Profile  
Reply with quote  
 Post subject: Re: Doom3 Style UI
PostPosted: 19.06.2012, 14:18 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
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).


Top
 Profile  
Reply with quote  
 Post subject: Re: Doom3 Style UI
PostPosted: 20.06.2012, 02:26 
Offline

Joined: 15.02.2009, 02:13
Posts: 161
Location: Sydney Australia
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 :)

_________________
-Alex
Website


Top
 Profile  
Reply with quote  
 Post subject: Re: Doom3 Style UI
PostPosted: 20.06.2012, 17:35 
Offline

Joined: 09.02.2012, 22:38
Posts: 26
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.


Top
 Profile  
Reply with quote  
 Post subject: Re: Doom3 Style UI
PostPosted: 20.06.2012, 18:27 
Offline
Tool Developer

Joined: 13.11.2007, 11:07
Posts: 1150
Location: Germany
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 1478 times
Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group