Jump to content
  • Advertisement

Archived

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

PaulCesar

Something that has always bugged me

This topic is 5272 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

Ok, I could never figure out what this is, but a recent post (which I didnt feel like hijacking) I believe hit on the term. That would be an entity or charactor factory. When I create, say 2 models, what are some ways of which I can attach them together at runtime? This would be easy if the models would be static, but they wouldent be (well, 1 would probably be). I was thinking perhaps it was NECESSARY to have skel. animation for this effect, and SOMEHOW you miraculously attached some sort of megnetic part of each object together (like vertex to vertex with something like a direction normal?) I have no idea, im no 3d developer. If someone could solve this for me (or give me a tutorial or something that I could understand the concepts, it would make me feel better. Not that im really working on it for a nearby project, just that... well... its been bugging me for quite a few years, LOL. Thanks, Richard

Share this post


Link to post
Share on other sites
Advertisement
One option which worked for my small tank test (with rotating barrel) is to have an extra triangle at the point where the two parts will connect. This triangle should be a rightangled one (one of the corners should be 90 deg), and one of the side should be significantly longer than the other. Point this longer side forward, and the shorter side left or right (whichever you wish).

In the second modelpart (the head for instance) model the part relative to the position of that triangle.

Then in game, load the models, find the triangle in the base model, determine is position and orientation, and move the second model part to that position and orientation. And that''s it.

Search the net for how Quake 3 models are built up, they use the same system. The small triangles are called ''tags'' there.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
Just "bind" point to bone, then translate that point by bone, it''s attached to and you get your sub-models position.

Share this post


Link to post
Share on other sites
I think in most modellers you can give each part of the mesh a seperate name. In this case, name the triangle name_tag, and export is with the base mesh.

[edited by - rick_appleton on June 3, 2004 6:02:22 PM]

Share this post


Link to post
Share on other sites
In 3DStudio Max there''s a thing called a ''dummy'' which is basically a named transform with no geometry attached. That''s often used for marking an attachment point on a model. The benefit of a transform rather than a triangle as suggested here is that you get an orientation (and scaling) as well as a translation. It also seems cleaner as you don''t have a redundant triangle just for marking a position.

Share this post


Link to post
Share on other sites
We''re using the dummy analogy in our engine. A dummy is a named but invisible object (with all object properties such as a transform), that has a position in the scenegraph like any other mesh object. On attach, you can either directly attach to the dummy transform matrix (if you have the node of the object in the graph). Or search through the scenegraph for the named dummy (probably using some sort of hash key), and attach once you found the node.

Share this post


Link to post
Share on other sites
Sorry for not responding sooner, that clears a great deal up. Im bookmarking this for future referance (when I get back to a project that will need this).

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!