pim

Members
  • Content count

    130
  • Joined

  • Last visited

Community Reputation

118 Neutral

About pim

  • Rank
    Member
  1. Hi! I've just benchmarked a couple of different ways to render dynamic meshes. The benchmarks are just simple random polys so it's not really representative for a real world situation, the other downside with this testing is that I've only tested it on one gfx card. Even though the test isn't representative, what I found surprises me a bit. So I was wondering if anyone could shed some light on this. The results were as follows (ranked after timings): 1: write directly to vertex/index buffer 2: write directly to vertex/index buffer in batches (ms way) 3: write to array, then copy to vertex/index buffer (to prevent long lock) 4: write directly to d3d w/no buffers Have anybody tested these different approaches in a better way and found different results (I for one guess that the ms way should be the fastest)? What's the fastest way to render dynamic models? [Edited by - pim on August 4, 2005 1:03:46 PM]
  2. Rating

    Hi! I'm a bit surprised by how people seem to rate other people. When only answering questions without critique and asking my own questions I sometimes get rated down.. so my question is: how do you rate people? what makes you rate a person up/down?
  3. Thanks alot :)! which algorithm is it based on?
  4. have a look at this article http://msdn.microsoft.com/library/default.asp?url=/library/en-us/winui/winui/windowsuserinterface/dataexchange/clipboard/usingtheclipboard.asp
  5. hmm... I guess in a game I would do something like this: -One large v/i buffer for static terrain data -Multiple v/i buffers for different static items and items animated on the gpu w/some sort of instancing -One dynamic v/i buffer for dynamic data that gets filled and flushed on the run does this sound righ or have I completely missed the point? :P
  6. Yes.. I'm refilling every frame.. this is because most of at least the vertex buffer data is/might be changing. I'm planning on using the class for RAD - so I don't have to set up vertex buffers and index buffers just to test some different things - but also for dynamic data. Let's say I'll have alot of splines moving around the screen for instance... when I think about it this really breaks down into a couple of different questions: 1: Let's say I've got lots of different models (like different objects/scenery in a game like warcraft 3) with different transformations. How should I render this for maximum speed? (I guess your links help here :)) 2: What's the best way to render completely dynamic data? Let's say I've got a scene with 20 different rotating objects that are also deformed on a per frame basis (not in a vertex shader). 3: How would you create a class with the same functionality as opengl immediate mode? I've seen a couple of different examples but none of them take the world matrix into account..
  7. Hi! I'm trying to create a 3d engine in d3d and I've come to the part where I'm coding a class to make batching of polygons easier, but I've run into a problem. The class puts vertices/indices into one index and one vertex buffer until I change the type of shape or the vertex format. Then the class flush the polys to the screen and another batch starts. The problem arises when I'm using lots of small objects (for instance 100 polys) which needs to be transformed. When using SetTransform to translate/rotate the different objects, I need to flush the buffers for EVERY shape which will result in one DrawIndexedPrimitive call for each of them. How should I solve this problem? Any suggestions? Thanks!
  8. ZQJ: Thanks.. I'll look into ear clipping then. There's a good reason to generate a new vertex, and that is visual quality when interpolating colors/normals etc. One thing you can try is to create a convex polygon (based on a circle) with 20 vertices with different colors and try different triangulation methods. There's no way to get good quality interpolation here unless you generate a new vertex in the middle of the polygon!
  9. Hmm... noone has really answered the question, so I'll try to be a bit more clear (edited the original post with the new info!)
  10. Well.. there are some different ways to triangulate a convex polygon (zigzag, fan, subdivide++) but I need a way that works with concave polys as well!
  11. Hi! I'm currently working on my 3d engine, and I'm in need of a fast polygon triangulation algorithm. What's the fastest one if I'm mainly (but not exclusively) working with convex polygons? And do you have any links to an explanation of the given algorithm? Edit: Ok.. I seem to have been a bit unclear, so I'll try to be as clear as possible. What I'm wondering about is the following; [A] Which general purpose algorithms are there for triangulating a simple (convex or concave) polygon and what are their complexity? I've found Ear Cutting, Delaunay and Seidel's Algorithm. I'd prefer that it doesn't generate any new vertices but it's not critical (for instance if it increases visual quality). [B] Which of the given algorithms are fastest when working on primarily (but not exclusively) convex polygons with few vertices? [C] Do you know of which triangulation algorithms different games use? Thanks! [Edited by - pim on July 29, 2005 7:00:23 AM]
  12. You can just swich the malloc like this: //Malloc Node* pNode = reinterpret_cast<Node*>(malloc(sizeof(Node))); free(pNode); //new Node* pNode = new Node(); delete pNode; or wasn't that what you were looking for?
  13. jyk: Thanks ALOT! I'll have a look at it later on (don't have time right now). Mercury & kwijibo: I'm visiting that page all the time, but thanks anyway ;) Now when it comes to normals and texture coordinates I've decided that I'll add them as a "post processing" step to all the primitives that don't have a trivial solution to how they're generated.