Jump to content

  • Log In with Google      Sign In   
  • Create Account

nickwinters

Member Since 23 Nov 2002
Offline Last Active Jan 23 2014 08:59 PM

Topics I've Started

Performance problems at ~1,000,000 triangles. Am I doing something wrong?

01 January 2014 - 03:06 AM

Hello,

 

I've hit a snag with rendering triangles.  At approximately 1,000,000 triangles, the frame rate drops to 30-40 fps.  By the time I hit 5,000,000 triangles, I'm down to 10 fps.  My CPU is an i5-3570K @ 3.4ghz and my video card is a ZOTAC GeForce GTX 660 w/ 2GB of RAM.  Should I experience an fps drop at one million triangles?  Or am I doing something wrong?

 

My lighting model is a simple phong shading with only diffuse lighting.  I haven't added ambient or specular lighting yet.  There is only one point light source.

 

I've also enabled the following settings:

glEnable(GL_DEPTH_TEST);
glFrontFace(GL_CW);
glEnable(GL_CULL_FACE);     // Cull back facing polygons
glCullFace(GL_BACK);

Thank you for your help.

 

-Nick


Why are vertices represented as 4f, but normals and light positions as 3f?

17 December 2013 - 11:11 PM

I'm using GLSL specifically and attempting to reproduce the diffuse side of phone shading.  I've noticed in all example code I've seen, positions are represented as a vector of size 4, but normals and light positions are stored in vec3.  Why do positions need the fourth value but normals and lights do not?

 

Thank you for your help.

 

-Nick


Advice for turn based game, web and mobile

03 April 2011 - 01:16 AM

I'm attempting to build a turn based game that can be played on both WP7 and from a website (Silverlight), and am having thinking of ways to architect the server. The game will be played over several weeks, and each player will have a day or two to do their turn, which could take as little as a few seconds, to several minutes depending on the player.

Initially, I was considering creating a web service for the client to call. The difficulty with this is that there's no way to notify players when something has happened, so clients would have to poll regularly, possibly every few minutes. Because of this, I'm considering creating a server that communicates with the clients using TCP. My concern is for mobile devices. If I switched to sockets, how would it fare? I assume mobile device connections drop often due to inconsistent reception.

Is there a better way to do this?

Thanks.

-Nick

Need help with joint transformation

20 January 2007 - 12:25 PM

I have the following recursive function to set the global transformation matrix for each joint. I know I've named a class bone, but more accurately, it should be named joint.
public void SetGlobalMatrix(Matrix parent)
{
    Matrix quat = Matrix.CreateFromQuaternion(m_orientation);
    m_globalTransformation = parent * m_translation;
    Matrix temp = m_globalTransformation * quat;
    foreach(Bone bone in m_children)
    {
        bone.SetGlobalMatrix(temp);
    }
}
If I tell it to rotate a joint, it rotates, but the children do not rotate as well. Their position is correct, but they do not seem to inherit the orientation change. Am I misunderstanding something? I thought that the rotation should continue down since I am passing the same matrix down. Thanks. -Nick

skeletons using quaternions

11 January 2007 - 04:47 PM

I'm currently creating my skeletal animation system. Currently joints are stored as quaternions and an xyz translation. To find the transformation on the geometry, it seems that most samples I've seen, as they go through the hierarchy, they convert to a transformation matrix, and then multiply by parent, etc. Is there a way to do it without matrices? Thanks. -Nick

PARTNERS