How to set camera postion to make 3D models look like 2D GUI

If you are a new Irrlicht Engine user, and have a newbie-question, this is the forum for you. You may also post general programming questions here.
Post Reply
Beginner

How to set camera postion to make 3D models look like 2D GUI

Post by Beginner »

For some reason(mainly for ANIMATED GUI effect), my GUI menu is a 3D Model with some buttons attached to it.
I make the camera Scene Node the parent of the GUI menu, so the menu will always follow the camera, and i

think the menu will look like a 2D GUI menu.

but i don't know how to set the relative position between camera and menu, to make the menu look fill some

rectangle region of the screen, could someone help me?

Thanks in advance!
b1_77y
Posts: 24
Joined: Sat Jun 11, 2005 11:04 am

Post by b1_77y »

i don't get it right about your question :?:

but are you already see the demo in irrlicht (the demo that come's with irrlicht). in it's GUI MENU there is a animated feary, it's looks 3d because the background. isn't that what you mean?

i'm sorry if i make wrong answer :)
bil':)
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

The faerie in that example IS 3D. :roll:

No what he wants is 3d models to make his GUI.

I highly suggest you abandon this idea I see absolutely no reason to do it like this unless you wanted the inside of a helmet HUD or something.

very graphically intensive could slow down your whole app.

anyways I don't know much about the 3d side of Irrlicht yet otherwise I would explain sorry.

I'm almost positive the fps camera will give you bugs with this however you'll have a problem getting the object to rotate along with your camera mostly.

Good Luck!
Beginner

Post by Beginner »

Thanks, b1_77y and Midnight.

Yes, i mean i want to use 3d models to make GUI.

I have found that the GUI of Warcraft3 is made with animated models, and i wonder how to implement this.

I have already read a GUI model of Warcraft3 with Irrlicht, but i can't get the right scene whatever position i set the camera in, especially when i rotate the model, it doesn't look like what i wanted at all.

Is it very time-consuming with animated models to make GUI? but it looks very cool in Warcraft3.
Spintz
Posts: 1688
Joined: Thu Nov 04, 2004 3:25 pm

Post by Spintz »

RenderToTexture will accomplish this. You'd setup you're 3d model, create a new camera and get the desired "snapshot" of the 3d model onto a texture.
Image
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

make your guinode a child of the camera, set its position relatively like you would with a gun.
or you could use guinode->setPosition(getRayFromScreenCoordinates(x,y)->start) and guinode->setRotation(camera->getRotation())
Midnight
Posts: 1772
Joined: Fri Jul 02, 2004 2:37 pm
Location: Wonderland

Post by Midnight »

bitplane wrote:make your guinode a child of the camera, set its position relatively like you would with a gun.
or you could use guinode->setPosition(getRayFromScreenCoordinates(x,y)->start) and guinode->setRotation(camera->getRotation())
I like your approach rather then spintz's on this one render to texture would use even more resource am I correct? however both ways will work and on a small scale it wouldn't make much difference.

Beginner have you seen guice?? it has 3d backgrounds for the main program and shortly for the main window as well.

having an animated background can also be done with rendered movies or animations as well very effectively "faking" a true 3d scene...such as game intros and cut scenes. this would be the lowest resource hogging method.

part of being a good programmer is being a good optimizer it only makes sense to do something more efficiently when plausible and I think this is very much so.

As for GUI well render to texture will do nothing for you in that respect either. It amazes me how afraid people are to create there own GUI classes. I plan to do something about that personally. 8)
Guest

Post by Guest »

Midnight, No doubt i agree with you on your being a good programmer theory :D
BTW:I have seen your GUICE project, it is a valuable work for all GUI programmers.

But what i wanted is not the BACKGROUND of GUI but the GUI itself is a 3d model.

Thank you all!
Post Reply