2 questions

Started by
6 comments, last by dbzprogrammer 18 years, 4 months ago
Hey guys, i have 2 questions. 1) I did the NeHe tutorial 14, and learned how to make 3d text, which is pretty cool :) How can i "fix" it to the camera so that it ALWAYS stays in one place on the screen? 2) I have altered a 3ds loader i downloaded to load multiple 3ds models i have made. How can i do skeletal animation? Thanks :) Mike
Advertisement
Well, the easiest way i can think of would be to

render scene
push a modelview matrix,
set it to identity,
move your text into position
render text
pop matrix

(of course if your scene transform changes every frame as i suspect it does, you could instead of pushing and popping the modelview matrix, simply set the current matrix to identity and then move your text. since theres no sense in saving a state that wont be used again anyways)

i have a question for you though: Unless you have your text at a little angle so you can see the bottom of the text, whats the point of having 3d text anyways? you might as well use bitmap fonts if you ask me.

as far as the 3ds skeletal animation question goes, i'm sure there are some tutorials out there, though i gotta ask, why do 3ds anyways? there are other formats far more suited for games anyways

cheers (hope that helps)
-Dan
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out his new home he rounded a corner and saw someone in Marine Dress Blues. He ran back to St. Peter and yelled "You lied to me! There are Marines in heaven!" St. Peter said "Who him? That's just God. He wishes he were a Marine."
Be patient with gamedev, it'll take some time, but it will go. You can edit/modify 2 of your posts, and in the page, you should see a delete checkbox where you can delete the post.
We should do this the Microsoft way: "WAHOOOO!!! IT COMPILES! SHIP IT!"
Quote:Original post by Ademan555
Well, the easiest way i can think of would be to

render scene
push a modelview matrix,
set it to identity,
move your text into position
render text
pop matrix

(of course if your scene transform changes every frame as i suspect it does, you could instead of pushing and popping the modelview matrix, simply set the current matrix to identity and then move your text. since theres no sense in saving a state that wont be used again anyways)

i have a question for you though: Unless you have your text at a little angle so you can see the bottom of the text, whats the point of having 3d text anyways? you might as well use bitmap fonts if you ask me.

as far as the 3ds skeletal animation question goes, i'm sure there are some tutorials out there, though i gotta ask, why do 3ds anyways? there are other formats far more suited for games anyways

cheers (hope that helps)
-Dan




ok. It's working. Only problem is this - when i turn the camera with the mouse or keyboard, the text doesn't turn with it - meaning that if i turned the camera 90 degrees for example, i see the side of the 3d text
Well if you're setting the modelview to identity, and then translating your text into position (in screen space), it should stay anchored to the camera, because the translations and rotations associated with the camera arent applied

hope that helps
-Dan
When General Patton died after World War 2 he went to the gates of Heaven to talk to St. Peter. The first thing he asked is if there were any Marines in heaven. St. Peter told him no, Marines are too rowdy for heaven. He then asked why Patton wanted to know. Patton told him he was sick of the Marines overshadowing the Army because they did more with less and were all hard-core sons of bitches. St. Peter reassured him there were no Marines so Patton went into Heaven. As he was checking out his new home he rounded a corner and saw someone in Marine Dress Blues. He ran back to St. Peter and yelled "You lied to me! There are Marines in heaven!" St. Peter said "Who him? That's just God. He wishes he were a Marine."
You mean "glLoadIdentity()" ?
erm... anyone?
I think that you're rotating the camera around the text. The glLoadIdentity function will clear the current matrix to an identity matrix. Can you post some code?
We should do this the Microsoft way: "WAHOOOO!!! IT COMPILES! SHIP IT!"

This topic is closed to new replies.

Advertisement