Archived

This topic is now archived and is closed to further replies.

Cedric Perthuis

Multi-mesh Objects - SetTransform

Recommended Posts

I am wondering what is the fatest way to render objects made of several meshes that are rotated and scaled each time. Actually I would like to render player models in a 3D action game. I would like to turn head, and body, legs separately. With about 10 players on screen that could make about 50 meshes of 300 vertices each to render each frame in addition to a static world of 6 000 vertices on screen. Do I have to create a new vertexbuffer each frame for each mesh with polygons rotated and scaled in the right way, or set a world transfrom matrix for each mesh ? I ''ve read previous discussion on this subject, but in that case the problem is to know if one or two hundreds of SetTransfrom each frame is not too much. Does someone already focus on the problem of rendering multi-mesh model with D3D8 and its vertex buffers ?

Share this post


Link to post
Share on other sites
Create your vertex buffer just once, lock it, fill it, unlock it and then don''t touch it anymore. This is how I do it.

To rotate objects, use SetTransform. I think SetTransform is always faster that locking and refilling vertexbuffers.

Share this post


Link to post
Share on other sites