Jump to content
The Dark Mod Forums

Applying Af Attachments


Springheel

Recommended Posts

  • Replies 91
  • Created
  • Last Reply

Top Posters In This Topic

Thanks Dram, that was the problem. :rolleyes:

 

Unfortunately, that map has revealed some bad news. While the belt pouches and keys look great while they're on a guard that isn't moving, they *don't* look good at all when they're walking. The objects rotate up and down as the guard walks, clipping into his leg and back. :(

 

I don't think that joint is going to work. I'm going to have to find one that doesn't move so much, if there is one, which means coming up with all new rotation and orientation numbers. Bah. :angry:

Link to comment
Share on other sites

Thanks Dram, that was the problem. :rolleyes:

 

Unfortunately, that map has revealed some bad news. While the belt pouches and keys look great while they're on a guard that isn't moving, they *don't* look good at all when they're walking. The objects rotate up and down as the guard walks, clipping into his leg and back. :(

 

I don't think that joint is going to work. I'm going to have to find one that doesn't move so much, if there is one, which means coming up with all new rotation and orientation numbers. Bah. :angry:

 

If it helps spring, try importing the mesh into milkshape. No exporting there but it helps find these coordinates.

Link to comment
Share on other sites

Well, good news. :)

 

I tried the "RightHips_Dummy" joint, and didn't have to do much tweaking to get the objects in the same position. Better still, this joint barely moves during the walk cycle. I'm hoping it will work as a default 'belt attachment' area.

 

I've uploaded all the relevant files and a test map.

 

http://forums.thedarkmod.com/index.php?act=S...st=0#entry78347

Link to comment
Share on other sites

One other problem I noticed with attachments that we'll have to address--currently, when the model goes to ragdoll, the attachment disappears. This is good for things the AI is holding in their hands (because you spawn a moveable version and it just looks like they dropped it) but not so good for things on their belts. Coders will have to come up with something to keep the objects on the AI even after it goes to ragdoll state.

Link to comment
Share on other sites

One other problem I noticed with attachments that we'll have to address--currently, when the model goes to ragdoll, the attachment disappears. This is good for things the AI is holding in their hands (because you spawn a moveable version and it just looks like they dropped it) but not so good for things on their belts. Coders will have to come up with something to keep the objects on the AI even after it goes to ragdoll state.

 

Wierd. I know we can attach things to dead AI because the arrows etc. This is strange, we must have the objects set up wrong, because the arrows that hit the ai stay even when they die, so this must be from what the object is derived from.

Link to comment
Share on other sites

One other problem I noticed with attachments that we'll have to address--currently, when the model goes to ragdoll, the attachment disappears. This is good for things the AI is holding in their hands (because you spawn a moveable version and it just looks like they dropped it) but not so good for things on their belts. Coders will have to come up with something to keep the objects on the AI even after it goes to ragdoll state.

 

Yeah. This seems to be the default D3 behavior since they only wrote it with stuff that the AI would hold in mind. Actually though, the head of certain AI is also attached and it doesn't disappear when they die, but I think they may store that in a different list from the rest of the attachments.

 

There may be a spawnarg to determine whether it goes away when they go ragdoll. I'll check tonight. If there's not tho, we'll have to add one and mod it. Shouldn't be too hard.

 

@Dram: THe arrows are different, they're attached "manually" with the Bind function. These attachments we're talking about are attached and added to a special attachment list that it probably goes thru and destroys when they die. It seems like kind've a bad way of doing it, to destroy it and then spawn a thing that is dropped, instead of just unbinding it and letting it fall, but that's how they did it.

Link to comment
Share on other sites

I tested the key and purse on the builder and pro guard, and the coordinates work pretty well for them too. There's a little bit of clipping on the builder, but not enought to warrant a separate entry for them.

 

That's good news--I was worried we'd need a separate prop_key entity for each model. It's still possible that position won't work well on models that are quite different, like the noblewoman. We'll have to see.

 

I'll run some tests to see if it's possible to attach more than one object to the same joint. If so, we'll have no problems at all attaching things to AI's belts. If there is though, we'll be limited to one object and one weapon.

 

I'll also see if there's a joint that would work for weapons that go on the back, like hammers/bows.

Link to comment
Share on other sites

I'll run some tests to see if it's possible to attach more than one object to the same joint. If so, we'll have no problems at all attaching things to AI's belts. If there is though, we'll be limited to one object and one weapon.

 

I'll also see if there's a joint that would work for weapons that go on the back, like hammers/bows.

It should be possible to add more than one object to one joint, from the code. The joints are just reference points and two objects should be able to share the same one with different offsets.

 

Also, if necessary, we can always change the MD5 mesh to have a uniformly named joint in the right place so we won't have to make different offsets for different AI (like joint_hipAttach, joint_backAttach, etc). that would probably require rerigging and stuff though, so maybe that should just be a "from now on" thing.

Link to comment
Share on other sites

Man, I'm going to have to figure out how to use modeling software for these coordinates. I spent twenty minutes getting longsword.low into a half-decent position so I could test 'spine_dummy', (it has a definite swing back and forth as the AI walk/run, so no good). I then went to test 'spine', and the sword was *totally* out of alignment. Don't know how it could be so far off when the two joints must conceivably be close together, but I don't feel like spending another 20 minutes right now trying to reposition the sword.

Link to comment
Share on other sites

The orientation of the joint relative to the world can also vary from one joint to another, so that might be why you got such a big change switching between two nearby joints. The coordinates are all relative to which way the joint is pointing (it needs to be that way so it can rotate when the joint rotates and basically stick with it during animations). For me, this also makes it nearly impossible to put the right numbers in the angles variable, because I don't know what axes I'm pitch yawing and rolling around.

Link to comment
Share on other sites

It's also annoyingly time-consuming because the only way to view it is to load up a map. So it's load D3, load map, look at AI, exit D3, modify numbers, load D3, load map, look at AI, exit D3, repeat for twenty minutes.

 

There's got to be an easier way.

Link to comment
Share on other sites

It's also annoyingly time-consuming because the only way to view it is to load up a map. So it's load D3, load map, look at AI, exit D3, modify numbers, load D3, load map, look at AI, exit D3, repeat for twenty minutes.

 

There's got to be an easier way.

 

Yeah, it's really too bad they couldn't be placed through some kind of 'in-editor' system. Out of curiosity, what does the af editor do?

Link to comment
Share on other sites

Sounds like this might be a good feature to implement (I modified it to include rotation);

 

Perhaps one of the programmers could make the ability to adjust the offset values of a bound object and it's local rotation during the game, and a command to display the current offset & rotation coordinates in the console. So when you get the position right, print the coordinates, write them down, and THEN edit the .def file to make it permanent.

 

It could work like testModel how it simply spawns one entity at a time - in fact it could piggy back off the testModel feature.

Type

testModel charactername

as usual, and then type

af_attachMesh mesh joint

where mesh is the name of some mesh, like purse, or key, and joint is the name of a join on the model that was loaded with testModel, like rightHand, hip, etc.

 

Then... maybe override the keys to move the object and rotate it, or simply just add more commands like af_setOffset x y z

af_setRotation x y z

and of course

af_print

to get the current position and rotation values.

 

Then you can even use

nextanim

to preview all the animations and see if any clipping occours. You could even then adjust it while the animation is still playing.

Link to comment
Share on other sites

It's also annoyingly time-consuming because the only way to view it is to load up a map. So it's load D3, load map, look at AI, exit D3, modify numbers, load D3, load map, look at AI, exit D3, repeat for twenty minutes.

 

There's got to be an easier way.

 

I suppose both objects are sperate entities, right? I can create some cvars to manipulate their position so you can move them around in realtime, then you can note the numbers and apply it. What steps are taking to do this right now? Can you give me a sample?

Gerhard

Link to comment
Share on other sites

Then... maybe override the keys to move the object and rotate it, or simply just add more commands like af_setOffset x y z

af_setRotation x y z

and of course

af_print

to get the current position and rotation values.

 

Why would you need an af_print if you just entered the numbers yourself? LOL

Gerhard

Link to comment
Share on other sites

Why would it roll off the screen? If there are to many console outputs you will most likely not see one or the other and you have to scroll up anyway. LOL indeed.

 

And you also have a history, so even if they scrolled up or you don't remember it, you just have to press CRSR-UP to see what you just typed.

Gerhard

Link to comment
Share on other sites

Well imaging typing af_setPosition several times in a row to get the position right.

 

Then you move on to getting the orientation right, which involves typing af_setOrientation several times in a row.

 

You could scroll up and try to find where the orientation started and the positions ended, but as a simple matter of convenience, how hard would it be to implement a command that prints all the current values to the console together? It wouldn't be.

 

It's a triviality, you just want something to argue about again. I won't continue this line of discussion further.

Link to comment
Share on other sites

Look, final example, then the time required to explain this simple concept to you becomes not worth it;

 

Find both the latest position AND orientation, together, scrolling back through this list in the Doom console through this;

 

af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setOrientation 4 3 6
af_setOrientation 5 3 6
af_setOrientation 3 4 5
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46
af_setPosition 32 34 9
af_setPosition 52 33 56
af_setPosition 52 33 46

 

or typing af_print and seeing this;

af_print
position: 52 33 46
orientation: 3 4 5

 

Which would you preffer?

 

I've printed out to the console from the script and the SDK before, I know how easy it is to implement something like af_print.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Recent Status Updates

    • nbohr1more

      The FAQ wiki is almost a proper FAQ now. Probably need to spin-off a bunch of the "remedies" for playing older TDM versions into their own article.
      · 1 reply
    • nbohr1more

      Was checking out old translation packs and decided to fire up TDM 1.07. Rightful Property with sub-20 FPS areas yay! ( same areas run at 180FPS with cranked eye candy on 2.12 )
      · 3 replies
    • taffernicus

      i am so euphoric to see new FMs keep coming out and I am keen to try it out in my leisure time, then suddenly my PC is spouting a couple of S.M.A.R.T errors...
      tbf i cannot afford myself to miss my network emulator image file&progress, important ebooks, hyper-v checkpoint & hyper-v export and the precious thief & TDM gamesaves. Don't fall yourself into & lay your hands on crappy SSD
       
      · 7 replies
    • OrbWeaver

      Does anyone actually use the Normalise button in the Surface inspector? Even after looking at the code I'm not quite sure what it's for.
      · 7 replies
    • Ansome

      Turns out my 15th anniversary mission idea has already been done once or twice before! I've been beaten to the punch once again, but I suppose that's to be expected when there's over 170 FMs out there, eh? I'm not complaining though, I love learning new tricks and taking inspiration from past FMs. Best of luck on your own fan missions!
      · 4 replies
×
×
  • Create New...