Crystal Space
Welcome, Guest. Please login or register.
December 21, 2014, 08:22:53 pm

Login with username, password and session length
Search:     Advanced search
9032 Posts in 2046 Topics by 9297 Members
Latest Member: Adrihjapa
* Home Help Search Login Register
+  Crystal Space
|-+  Crystal Space Projects
| |-+  Project Discussion
| | |-+  How to make 3D GUIs
« previous next »
Pages: [1] Print
Author Topic: How to make 3D GUIs  (Read 3289 times)
yoshi
Newbie
*
Posts: 40


View Profile WWW
« on: June 20, 2006, 04:32:32 am »

Hello, I don't know if this is the right place to ask this, so sorry if it isn't.

Recently, I was thinking of making a simple-ish GUI, but I was afraid that a GUI made by directly drawing to the screen using g2d would be too limited for certain effects that I might like to have.? So, I was thinking of making the GUI in 3D, i.e., map textures to quads, procedurally draw text to the GUI quads, etc.? However, mixing 2D GUI elements with the 3D environment introduces some interesting problems.

One problem that I cannot seem to figure out how to deal with is ...how to keep the things in the 3D world from intersecting the quads of the GUI.? I have an idea on how to do this, but I don't know if it's practical.? My idea is to set up a quad that the 3D environment camera renders to procedurally (instead of the backbuffer) and then have another quad in front of that one, to which the GUI elements would be rendered.

Is this practical?? If not, does anyone have any ideas on how to achieve what I want?
Eve online (www.eve-online.com) is a good example of a game that does what I am thinking:

http://www.eve-online.com/screenshots/collection.asp?col=28082003&n=12#sh

That little hemispherical thingy in the bottom-right corner is part of the gui, so it would never intersect with the world's entities.? Maybe the EVE developers just made sure that nothing ever gets close enough to the GUI for that to be a problem, but I doubt that they would risk it.? So how did they do it?? Anyone have any ideas?
Logged
yoshi
Newbie
*
Posts: 40


View Profile WWW
« Reply #1 on: June 21, 2006, 04:08:19 am »

All right, I got the answer to my own question.

For anyone who's interested, I will describe the solution.
In order to achieve what I am describing, apparently you do the following:

1. Draw the 3D Scene
2. Enter orthogonal projection
3. Disable lighting and z-buffering
4. Draw GUI elements in proper order (of depth)
Logged
Pages: [1] Print 
« previous next »
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC Valid XHTML 1.0! Valid CSS!
Page created in 4.161 seconds with 15 queries.