#115549 - The_Perfection - Wed Jan 17, 2007 2:23 am
Hello all,
I have recently started devving for the NDS (not giving up on the GBA though) and have started playing around with the OpenGL-ish interface to get various 3-dimensional things moving on the screen. I have run into a few problems though and thought you guys might be able to help.
Lighting:
I realize that the lighting is done with one sign and nine bits of fractional parts as a vector to determine which way the light is going. So would (in x, y, z)
be the same as
Since it is a vector, that's what I'm thinking, but I'm not sure since we haven't delt with vectors in my math class yet. (Although I did gleam much information from TONC.)
Normals:
I know that normals are extremely useful little things when it comes to lighting, but I don't know how to calculate them. I know it has to be done in the order the points were created, but don't know the actual math behind the little critters.
My friend also thought that I might be getting weird shading because the normals have to be calculated every frame. Do they? or do they automatically adjust when the figure is rotated? (Like I think they do...)
Texture Mapping:
I actually haven't attempted to texture map anything yet, but the reason I haven't is because I don't fully understand the process. I looked at the NeHe tutorial and they use a function to add the textures from a pcx file. What are the steps if I wanted to do it from an image binary?
I'm pretty sure there's more than that, but I can't remeber it right now.
Wii thank you in Advance.
I have recently started devving for the NDS (not giving up on the GBA though) and have started playing around with the OpenGL-ish interface to get various 3-dimensional things moving on the screen. I have run into a few problems though and thought you guys might be able to help.
Lighting:
I realize that the lighting is done with one sign and nine bits of fractional parts as a vector to determine which way the light is going. So would (in x, y, z)
Code: |
0x201, 0x201, 0x201 |
be the same as
Code: |
0x3FF, 0x3FF, 0x3FF |
Since it is a vector, that's what I'm thinking, but I'm not sure since we haven't delt with vectors in my math class yet. (Although I did gleam much information from TONC.)
Normals:
I know that normals are extremely useful little things when it comes to lighting, but I don't know how to calculate them. I know it has to be done in the order the points were created, but don't know the actual math behind the little critters.
My friend also thought that I might be getting weird shading because the normals have to be calculated every frame. Do they? or do they automatically adjust when the figure is rotated? (Like I think they do...)
Texture Mapping:
I actually haven't attempted to texture map anything yet, but the reason I haven't is because I don't fully understand the process. I looked at the NeHe tutorial and they use a function to add the textures from a pcx file. What are the steps if I wanted to do it from an image binary?
I'm pretty sure there's more than that, but I can't remeber it right now.
Wii thank you in Advance.