Inside3D!
     

Fake Vwep Attachment For Q1 MDL

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming
View previous topic :: View next topic  
Author Message
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Fri Jun 25, 2010 12:48 am    Post subject: Fake Vwep Attachment For Q1 MDL Reply with quote

Frame vertex 182 and 183 are two vertexes in the Q1 player model's non-weapon hand when he is using the axe.

Frame vertex 182 is where I'd like to do an attachment test (make him hold a bag or something, hehe).

I'm lacking imagination but any ideas on ...

1) how I can get the X, Y, Z values of vertex 182 and 183 from inside the engine for a current player frame.

I could then calculate the angles using the two points and theoretically render the gun at that location.

I may be able to mentally walk through this myself, but my 3D math skills are weak and slow and the Q1 model format's weirdnesses have so far frustrated me.

I'm thinking that should this work out that a fairly reasonable workaround standard might emerge (QC builtin) to allow more flexibility.

The Feral mod hardcoded all that stuff in the QC, which I don't see as necessary if you can just track vertexes or triangle positions and calculate angles.
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...
Back to top
View user's profile Send private message
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Fri Jun 25, 2010 1:34 am    Post subject: Reply with quote

would need 3 verts to specify full angles.
DP has some vectorvectors builtin that should do it. basically picks perpendicular vectors.
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
Error
Inside3D Staff


Joined: 05 Nov 2004
Posts: 558
Location: VA, USA

PostPosted: Fri Jun 25, 2010 7:24 pm    Post subject: Reply with quote

done:

http://projects.slipgateconstruct.com/index.php?dir=vweapon_framer%2F

download framer.rar. it assists you in the placement of weapon models on a player.mdl, then exports the offset origin and angle to a file. it's probably hard to understand, but it's all I came up with.

video of the actual mod that uses the exported info here:

http://www.youtube.com/watch?v=0TuohcmfDpA

it does have some problems.
_________________
Inside3D : Knowledge Is Power
Darkplaces Documentation Wiki
Back to top
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger
Baker



Joined: 14 Mar 2006
Posts: 1538

PostPosted: Fri Jun 25, 2010 7:35 pm    Post subject: Reply with quote

Error wrote:
done:

http://projects.slipgateconstruct.com/index.php?dir=vweapon_framer%2F

download framer.rar. it assists you in the placement of weapon models on a player.mdl, then exports the offset origin and angle to a file. it's probably hard to understand, but it's all I came up with.

video of the actual mod that uses the exported info here:

http://www.youtube.com/watch?v=0TuohcmfDpA

it does have some problems.


I'm very intrigued by this. Any method that gets the job done works for me.

Thanks Error!
_________________
Tomorrow Never Dies. I feel this Tomorrow knocking on the door ...
Back to top
View user's profile Send private message
gnounc



Joined: 06 Apr 2009
Posts: 120

PostPosted: Sat Jun 26, 2010 7:09 am    Post subject: Reply with quote

toldya there was interest.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Engine Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group