Jump to content
  • Advertisement


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


A basic misunderstanding

This topic is 5977 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Greetings, folks Despite my research, one important concept about D3D that, while most likely basic to those fluent in the library, still evades my understanding. In a nutshell, how do you move multiple untransformed objects independent of each other? For example, in an application that only draws two trianges, these objects, if created as transformed vertices, can be moved at will by locking each of their buffers, modifing the vertices, then drawing them again. This, however, seems rather inefficient for a real application that must draw a large number of polygons. From what I''ve read, another way to move objects would be to modify the world, view, and projection matrices. But it''s my understanding that this is done at the device level, so changing any of these matrices would modify the way all objects on that device are drawn. This is what confuses me. Look at the today''s 3D MMORPG''s (EQ, DAOC, etc) for instance. I''d assume the the PCs and NPCs being displayed are meshes, but they all move independent of one other. Do they simply modify the world, view, and projection matrices for every object being drawn? My theory would be no, but, like I said, I''m confused Any assistance in understanding this would be greatly appreciated. Thanks, //Serian

Share this post

Link to post
Share on other sites
Yes, the world matrix is passed to the device, but the matrix can be changed for every object.

Don''t think of the world matrix as "where is the world", think of it as "where is this object in the world". So, rendering multiple objects looks like this:


and so on...

Share this post

Link to post
Share on other sites
Transformation matrices.

Given an object X, multiplying each of its vertices by a transformation matrix will relocate them at a new position (say, X''). Since a single object may be composed of several composite polyhedra, a single "object" may employ several t-matrices. This transformations were traditionally done in software. I can''t give you specifics, but I wouldn''t be surprised if there was functionality to use a buffer of t-matrices in conjunction with an index buffer of some sort to allow the hardware do all that manipulation.

As always, someone better informed will come by and give you more details.

Happy Hacking!

[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!

Share this post

Link to post
Share on other sites

  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!