Trickle's Vwep Wisdom?

Discuss the creation of various model formats for Quake engines, and related matters to modeling.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Trickle's Vwep Wisdom?

Post by Baker »

Trickle, you've made countless "fake" vwep animations for several models in Team Fortress.

How hard is your mysterious method and could you do it with player models other than the standard Quake guy?

The real vwep via tagging looks well beyond the reasonable boundaries of standard Quake (since the model format doesn't support it) but your lies on the edge of the possible.

I'm really just wondering how model specific it is, like is it locked to the Quake player model.

The main reason I'm asking is because it would be nice if for a custom player model for a total conversion if the guy could have several weapons available as the view weapon.
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Post by ceriux »

why would it only be possible with the quake guy? all it is , is mesh and animations. it should defiantly be doable which i think a cleaner and easier way would to just have multiple versions of the player model player.mdl , player_shotgun.mdl , player_pistol.mdl , ect... and just change the .mdl on if (self.weapon == IT_WEPNAME) - do code.
Trickle
Posts: 66
Joined: Thu Mar 26, 2009 11:20 pm

Post by Trickle »

the problem with that is the wrapping of textures if the vwep model is too large. the method of assigning other models to one single player model via code is easier in my opinion(and more CLEAN). not only that, but it would be more annoying if an engine like Qrack ever had that type of addition as you would have to make player_0_pants and player_0_shirt for each player weapon combination model.

Baker, as for the custom animations for several models in TF..Avirox had a lot to do with that. I only animated the models and then Avirox made cool stuff happen that I requested like making w_knife.mdl switch to w_knife2.mdl after attacking something to show the blood..also we had a whole new model to replace w_rock.mdl called w_rockfl.mdl as the pyro actually uses some of the shotgun firing frames for the flame thrower. we also had the sniper rifle aim as you held +attack stuck on the first shotgun frame. Painkeep was interesting too, when I worked with the airfist..I found that it uses 3 different frame sets for firing.


the reason I haven't made any tutorial yet is the lack of interest, every server that has vwep enabled I have helped out with which includes

MegaTF Co-Op
Weenieville Painkeep
VA.telefrag.ME [TWCTF]


I'm sure for a mod like Malice it would be easy as hell to do as far as coding. my method is long depending on the g models used and the amount of objects it has(Plagues g_nail.mdl had 224), if no g model exists(like the single shotgun) I have a new model made. making the actual vwplayer.mdl is as easy as deleting the pseudo gun and axe. so in the case of Malice it would be that large cannon. at one point I thought it would be cool if the sniper enforcer on the megatf server held the sniper rifle or the rocket grunt holding a rocket launcher.

you also have to realize, I didn't come up with the vwep code..I believe oldman or Tonik did. I just so happened to have an extreme interest in it and wanted to make them more accurate + updated with the newer remade quake models. I also pointed out some flaws with the ezquake team and that sort of thing(like switching from axe to a gun would make this dropping effect happen due to poor interpolation or something).


current engines supporting this are ezQuake, FuhQuake XE, zQuake(I think), and FTE.
Image
ceriux
Posts: 2230
Joined: Sat Sep 06, 2008 3:30 pm
Location: Indiana, USA

Post by ceriux »

i dont see what you mean by that, youd simply just replace quakes base gun with that of the custom one as an example... the textures would all be the same and using seperate models would give the developer more texture space...
Trickle
Posts: 66
Joined: Thu Mar 26, 2009 11:20 pm

Post by Trickle »

I know that would be extremely easy, I'm just saying if you separate the models you can have a bigger texture range. try importing g_nail.mdl from Plagues pak to the vwplayer.mdl and you'll see what I mean..the textures warp.
Last edited by Trickle on Tue Jan 12, 2010 6:03 am, edited 1 time in total.
Image
Trickle
Posts: 66
Joined: Thu Mar 26, 2009 11:20 pm

Post by Trickle »

Death Match Essentials worked out great for the time, the low poly gun models and all.

it featured the same style you were suggesting of course.
Image
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

Trickle wrote:I only animated the models and then Avirox made cool stuff happen that I requested like making w_knife.mdl switch to w_knife2.mdl after attacking something to show the blood.
I've looked at the vwep code in the engines, so what I am most intrigued about is how the hell you are lining up the weapon model animation frames for the weapon line up to the player.
the reason I haven't made any tutorial yet is the lack of interest
There isn't a lack of interest per se, but a lack of exposure and probably a lack of being able to implement it for various reasons (NetQuake protocol, supposedly but I'm not so sure ...)

People see a lot of things in videos that they can't actually do for reasons x, y or z.

So let me ask you this:

If I have a player model (non-Quake) and a gun or 2, how hard is it using your method to create the vwep model for the 2 guns?
r00k
Posts: 1111
Joined: Sat Nov 13, 2004 10:39 pm

Post by r00k »

This difference between engine-side vwep and qc side is that, in quakeworld, the weapon/weaponframe for all players are sent to everyone via the player_state_t (i think). So, checking that value you can place a model at the same location as the player's entity. Same method used for the CTF flag in QW. The only thing close to this would be movetype_follow in netQuake. But because the server doesnt tell all the clients the weaponmodel/frame to everyone, in netQuake it's best handled in quakeC. Each vwep in this case would have a player model holding each gun, and setting the appropriate modelindex. You wouldnt need to worry about teamskins unless using an external scheme, as the team colors are specific values in the Quake palette.
So it's either more bandwidth sent telling everyone the weapon in hand, or more memory used precaching 8 player models.

For your last question, you take the player model, remove the "object" of the default gun. Now you havea player model holding nothing. Save that as a base reference. Then, import your gun model as anew object, and position it on the hand. Each frame of the player model, you need to tilt/ move position of the gun object to sync with the player. after 142 frames and about an hour later, you have a fully animated player model holding a new gun. Now what Trickle did was just removed the player object and save the gun only with complete animations. Later in the engine, the gun model and the player model will share the same origin, and seem as if its one model sequence. So, imho if im precaching 7 gun models anyways the only advantage to doing it client-side is it will work on older mods, and multiple player models. There could easily be an extension to the netquake protocol to broadcast edict->v.weaponmodel and edict->v.weaponframe for all entities. But then .tag support might be better in the end.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

I'm wondering if Trickle did all 100% manually.

If not and he has a specific method, I guess I am looking to collect information.

I'm trying to figure out how to generate these frames with a non-Quake player model.

I'm thinking that if Trickle doesn't have special method and it is all manual, that there might just be a way to track the location of, say, 2 or 3 vertexes of a model in the hand area and calculate the position and the angles and from a single frame generate all the vwep frames.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Trickle
Posts: 66
Joined: Thu Mar 26, 2009 11:20 pm

Post by Trickle »

my secret recipe
Image
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

I'm thinking for a non-Quake player model, a single triangle could be used to generate the positions for all the weapon animation frames.

I'm trying to think of ways for total conversion modders to easily be able to make a guy and have him be able to have several objects at his disposal without the onerous need to animate a crapton of weapons.

Here is my thought:

Image

Take a single triangle. Say triangle in the hand # 319. A single triangle is enough information to calculate all the X Y Z offsets and the angles.

Export all the frames in the Breeze Autocad format, have some math fun and make a quicky program to take that information to do the same for a weapon with modified triangle/vertex coordinates.

The Breeze Autocad output looks like this:
version 1.3
distance 20.3961
_camera _camera0
size 0 0 0
extra -1.33 0 1
scale 0 0 0
rotate 0 1 0
move 0 4 20
_light _light0
size 1 1 1
extra -20 35 34
scale 1 1 1
move -20 35 34
_light _light1
size 1 1 1
extra 0 0 24
scale 1 1 1
move 0 0 24
points frame
3
F -2.48 1.31 -0.13 -2.48 1.76 -0.13 -2.53 1.76 -0.13
F -2.29 1.31 -0.13 -2.48 1.31 -0.13 -2.53 1.31 -0.13
F -2.48 2.20 -0.13 -2.48 1.76 -0.30 -2.53 1.76 -0.13
F -2.48 1.31 -0.30 -2.53 1.31 -0.13 -2.53 1.76 -0.13
.
.
.
F -0.36 1.31 1.02 -0.17 1.31 -0.46 0.60 3.40 2.49
F -3.83 4.60 -0.46 -5.95 1.46 -2.43 -5.76 1.90 -3.58
F 6.77 1.90 -5.38 7.73 1.90 -4.72 7.54 2.35 -3.74
F 7.92 -8.28 0.69 3.68 -8.43 0.69 4.84 -7.68 1.67
F 4.84 -7.68 1.67 3.68 -8.58 2.99 8.12 -8.28 2.66
F -10.00 -10.53 -3.25 -10.77 -10.83 -3.25 -10.96 -6.19 -3.25
end
end
Plus this would help for any potential NPCs so they wouldn't have to always be armed. Or enemies could wield different gun types.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Trickle
Posts: 66
Joined: Thu Mar 26, 2009 11:20 pm

Post by Trickle »

how I did my vweps were basically in these steps.

1. load the player model.
2. import the vwep model(make sure all objects are attached).
3. make sure the model has the right scale size.
4. begin positioning.
5. after you're done with one frame set, delete the player model.
6. now export the frames.
7. open up the vwep model by itself and import the frames(this way the player skin isn't part of the base skin at all).
8. repeat for next frame set.

the last steps would obviously be if you wanted the gun to be animated such as the nail gun's cannons moving back and forth. so you would reconstruct all the objects and only connect the ones you want animated.


added suggestions would be to always have the eye position set to x = -6 y= 0 z = -24.

always keep the frames in the exact order as the player model.

I do this all in qME.
Image
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

Yeah and everyone appreciates all the work you did to open up eyes and make people think. Plus, those vweps are sweet.

http://qexpo.tastyspleen.net/booth.php?id=87&page=353
http://qexpo.tastyspleen.net/booth.php?id=87

I just cringe at the idea of having to manually place the weapon a lot for several different weapons. I want bad guys to have vweps too that are appropriate for the enemy so a model can be re-used but it looks wrong for an enemy holding a laser gun to throw a grenade and vwep is the obvious solution but q3 model and attachment is a bit much to get such a result.

Thanks for sharing your manual method, making the automated weapon in my head will take some work.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Trickle
Posts: 66
Joined: Thu Mar 26, 2009 11:20 pm

Post by Trickle »

I know its a lot of work, but in the end it pays off as you'll have each unique weapon fitting properly.
Image
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

Trickle wrote:I know its a lot of work, but in the end it pays off as you'll have each unique weapon fitting properly.
Would you be interested in doing a couple for me? It's a non-Quake player model ... a modified one.

I'd have to troll for a couple of GPL weapons first because I don't have any. Eh, maybe I could "Quick3D" convert a Nexuiz gun or 2.

I'm trying to make a basic prototype mod. That way total conversion modders aren't having to bang their heads and do everything from Stage 0. Sheesh!

I mean even the guys here, and I've ragged on this before, how many mod examples do you want to see with a Shambler and a Rocket Launcher (ugh!) in engines capable of so much more.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Post Reply