Page 1 of 1

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

Posted: Thu Jul 21, 2005 12:21 pm
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!

Posted: Fri Jul 22, 2005 8:37 am
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 :)

Posted: Sat Jul 23, 2005 7:19 am
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!

Posted: Sat Jul 23, 2005 2:02 pm
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.

Posted: Sat Jul 23, 2005 2:42 pm
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.

Posted: Sat Jul 23, 2005 5:42 pm
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())

Posted: Sun Jul 24, 2005 7:09 am
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)

Posted: Sun Jul 24, 2005 11:27 am
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!