Jump to content

  • Log In with Google      Sign In   
  • Create Account


anique

Member Since 21 Nov 2011
Offline Last Active Dec 31 2012 02:25 PM
-----

Topics I've Started

How do I animate in games

31 December 2012 - 02:13 PM

Hi. I'm a beginner in game development and im making a 3d game in opengl. I'm loading 3d models in the game using an Obj parser and now that I have to animate the 3d models, I was wondering how animation is normally done in games. I couldnt find any good resources on the subject. Are skeletons used? or are they simply done using models in different postures as 'frames'. links to appropriate resources would be highly appreciated.


Texturing light dependance?

23 December 2011 - 11:41 AM

I use the following code and get nice red cubes on a white plane:
		glColor3f(1,1,1);
		for(int z=0;z<100;z++){
			for(int x=0;x<100;x++){
				if(pathMap[x][z]==1){
					glPushMatrix();
						glColor3f(1,0,0);
						glTranslatef(x,0,z);
						glutSolidCube(1);
						glColor3f(1,1,1);
					glPopMatrix();
				}//else{


				//tm->BindTexture(TEX_GROUND);
				glBegin(GL_QUADS);
					glNormal3d(0,1,0);
					//glTexCoord2f(0.0f, 0.0f); 
					glVertex3f(x, 0, z);

					//glTexCoord2f(1.0f, 0.0f);
					glVertex3f(x, 0, z+1);

					//glTexCoord2f(1.0f, 1.0f);
					glVertex3f(x+1, 0, z+1); 
					
					glTexCoord2f(0.0f, 1.0f);
					glVertex3f(x+1, 0, z);
				glEnd();

Then i remove the comments to apply the texturing and the cubes darken. Any idea whats happening?
How does texturing the ground darken these cubes?

OpenGL question

21 November 2011 - 06:53 PM

I want to put a texture on an .obj such that the alpha region doesn't appear(only want the mapped texture to appear like branches of a tree mapped on a plane).
Here is my code snippet so far:
model1 = glmReadOBJ("object.obj");
glmUnitize(model1);
glmFacetNormals(model1);    	
glmVertexNormals(model1, 90.0);
glmDraw(model1, GLM_FLAT| GLM_TEXTURE);	

Problem is that the area with alpha just appears white. I want it invisible. Only the texture.

PARTNERS