vbisme

Members
  • Content count

    517
  • Joined

  • Last visited

Community Reputation

100 Neutral

About vbisme

  • Rank
    Advanced Member
  1. Is there a faster way to calculate vertex normals using face normals other than the linear method, which is: For every vertex Find all face normals referencing the vertex Add the normals Normalize
  2. Class default contructor

    What if class B needs to initialize an object after it's constructor and then use that object to initialize object A. As mentioned, by the time we get to the constructor's body it's too late.
  3. MAC vs PC

    This is only really programming but I couldn't find an appropriet forum. Why is MAC so much more expensive than PC give the lower CPU speed and such? In addition, is it true that the industries like movies and games use MAC more to create cinematics and graphics? Why?
  4. Let's say you have a class with no default constructor: class A { public: A( int ID ); //Some other stuff }; Then you try to contain it in another class: class B { private: A m_myA; //this won't compile }; Is there a solution to this without specifying a default constructor in class A?
  5. Looking at the source of a md3 model view, I see that it draws a single triangle at a time without using vertex or index buffer. Although it seems necessary for interpolation, from what I know it is quite in efficient. Are there any solution to this? By the way, key frame animation seem to be out of date to make way for skeletal animation. However, models like .md3 are more freely available from the net. Are there any free skeletal model sources. In addition, any article on skeletal animation? Thanks.
  6. Loading MD3 In DirectX

    Hey thanks. Actually I've looked at this and ran into the problem since for OGL it was able to use indexed texture coordinates. I wasn't wonder if anything out there that dealt with the situation.
  7. Are there any samples, tutorials, or articles on how to load MD3 models using DirectX? Thanks
  8. My question for the vertices duplication is, sticking with the original example I posted, the vertex list duplicated would be: Vertex 0a, Vertex 0b, Vertex 1, Vertex 2, Vertex 3a, Vertex 3b So vertex 0 and vertex 3 are duplicated, the index(face) this would then have to be changed. Original: { 0, 1, 3, 0, 3, 2 } Changed to: { 0, 2, 4, 1, 5, 3 } Am I thinking in the correct way? How about using dynamic vertex buffer and do the modification. Would probably kill performance by a great deal wouldn't it. [Edited by - vbisme on February 13, 2005 12:47:51 AM]
  9. Makes sense, but the point of using indices to to eliminate vertex duplication? Anyway, if we duplicate the vertices are pack them into say a vertex buffer, the faces(indices) information have to change as well to compensate for the added vertices. No better solution?
  10. Let's say that I want to create a rectangle using indexed vertices. Thus, I would only have 4 vertices and 6 indices or two faces. Assume vertices are setup as follow: 1----3 | | | | 0----2 Index list would be: { 0, 1, 3, 0, 3, 2 } This is all fine until texture coordinates are considered. Let's say I want the texture coordinate for vertex 0 and vertex 3 to be different for the two different face. In Direct3D, the texture coordinate are defined with the vertex information. How would I have to change the texture coordinate before drawing each face? I seen in an MD3 loading example using OpenGL in which texture coordinate indexing are used in assosiation with each face. In OGL, submitting vertex information this way maybe done like so (psuedo code): BeginTri Vertex1(...) Vertex2(...) Vertex3(...) TexCoor(..) EndTri Thus, the texture coordinate does not have to be stored with the vertex and are applied during look up. What are good solutions to this? Thanks in advance.
  11. Regarding the Mesh template, is the number of indices for the face there for flexibility's sake, in which it's is almost always 3? In some cases I see that there are 4, how to deal with those? For the MeshNormals, for the time being is it pretty much safe to ignore the index part? For example a simple geometry with 2 faces, 3 indices each. There may be syntax errors, but hopefully you'll get the idea: Mesh Rect{ 4; 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0; 2; 3;0, 1, 2; 3;2, 1, 3; MeshNormals { 4; 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0; 2; 3;0, 1, 2; 3;2, 1, 3; } } The only case I sometimes see is that one vertex may have many normals. Is there any examples out there where it loads meshes correctly and still providing the flexibility? What about the idea of a "subset". I have a feeling that a subset is something( a group of faces) that uses the same material. How to correctly divide subsets while loading meshes? Thanks.
  12. How do you profile in VS .NET? I could not seem to find the functionality. Thanks.
  13. Is the number of indices for the face there for flexibility's sake, in which it's is almost always 3? For the MeshNormals, for the time being is it pretty much safe to ignore the index part? For example a simple geometry with 2 faces, 3 indices each. There may be syntax errors, but hopefully you'll get the idea: Mesh Rect{ 4; 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0; 2; 3;0, 1, 2; 3;2, 1, 3; MeshNormals { 4; 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0, 1.0, 0.0; 2; 3;0, 1, 2; 3;2, 1, 3; } } The only case I sometimes see is that one vertex may have many normals. Is there any examples out there where it loads meshes correctly and still providing the flexibility? What about the idea of a "subset". I have a feeling that a subset is something( a group of faces) that uses the same material. How to correctly divide subsets while loading meshes? Thanks.
  14. If we don't want to use the ID3DXMesh, how to interpret the X file data manually? Specifically regarding the Mesh template, it contains: NumVertices Array of vertices NumFaces Array of MeshFace Optionals are MeshFaceWraps, MeshTextureCoords, MeshNormals, MeshVertexColors, MeshMaterialList. For simple meshes I could get by with loading the vertices in the array to a vertex buffer. As for the MeshFace array, I ignore the first item, which is the Number of FaceVertexIndices (seems to be always 3, I could be wrong since I don't really understand); then I just load the rest into an index buffer. I could anyone provide a better explaination to the inter-working of this? What about the MeshNormals, seems to have the same dilema. Thanks