Jump to content

Viewmodels & Ghoul2


Recommended Posts

Well basically you'd need to swap out the viewmodel rendering code with something more akin to how playermodels work. I can try it out, but I'm going to need an actual model and a plan before I proceed. I'd recommend taking one of @@Resuru's or @@Silverfang's weapons, putting a texture on them, and then exporting to both MD3 and GLM (MD3 as more of a fallback in case GLM fails, which at this point I don't yet expect to happen)

 

I know @@Silverfang wants to have idle animations, and there's a possibility for reloading, but not too sure on how that would fit into gameplay yet. You might find Silverfang on #JACoders, and Resuru usually hangs out in #JKGalaxies.

Link to comment

Missed this thread before but will definitely follow it since it would make every gun and thrown weapon look so much better.

 

Why not just look at SoF2's code directly? It was released wasn't it?

That's what I plan on doing. However I want to get Angelscript support finished first. (Best to get something finished before tackling something else and winding up with broken features, eh?)
Link to comment

@@DT85 / @@minilogoguy18: Here you are, one semi-functional, badly rotated GLM viewmodel:

 

 

shot2014-02-05_21-49-40.jpg

 

 

I didn't use any SOF2 code for this, rather I hijacked the viewmodel code to a large extent. I used the blaster viewmodel on the briar hand model (still a necessity because it's responsible for the raising/lowering of the weapon among other things), hence the bad rotating (because as you'll note, the blaster.md3 is way differently rotated/positioned from the worldview).

There's still a few bugs that I need to work out though (stun baton looks fucked, for instance).

 

Now go forth and make me some GLAs and GLMs so I can properly finish this, damn it. <3

Link to comment

I had a go at pinching SoF2's code and while it compiled, the game crashed upon switching to the weapon I wanted to load as a GLM. Someone with actual programming knowledge could get it to work I'm sure. :P

 

Probably would be good to use SoF2's code though, seeing as it allows for arms to be bolted to the weapon viewmodel which are changed when you select a different player model.

Link to comment

I had a go at pinching SoF2's code and while it compiled, the game crashed upon switching to the weapon I wanted to load as a GLM. Someone with actual programming knowledge could get it to work I'm sure. :P

 

Probably would be good to use SoF2's code though, seeing as it allows for arms to be bolted to the weapon viewmodel which are changed when you select a different player model.

The arms aren't actually bolted to the model at all. They use a specific animation which matches the gun's animations to a T. I suspect that we could get something similar to work with a modified _hand.md3 which has an extra tag for the actual hands.

However, the important thing is that I get it animated. Oddly enough, the mine monster doesn't use an external .gla but it works perfectly fine. I'd suggest looking into that model for a general idea how we could handle the GLM. As for the hands, I don't think it actually matters for JK2:HD in particular (and I don't anticipate more than one model being used anyway). We can always just swap those out and use a different GLM.

Link to comment

Well for modview at least, you load the weapon then bolt the left arm & right arm to the model_root bone. But yeah, first things first which is getting animated GLA for view models. For now the arms + weapon can be part of the same GLM. Here's the AK74 view model + GLA:

 

https://www.dropbox.com/s/oc2z7lrmn9kmkaf/sof2_ak74.pk3

 

I've made an animation.cfg for it seeing as SoF2 ran off of .frames files. There's idle, reload, fire & melee animations.

Archangel35757 likes this
Link to comment

Well for modview at least, you load the weapon then bolt the left arm & right arm to the model_root bone. But yeah, first things first which is getting animated GLA for view models. For now the arms + weapon can be part of the same GLM. Here's the AK74 view model + GLA:

 

https://www.dropbox.com/s/oc2z7lrmn9kmkaf/sof2_ak74.pk3

 

I've made an animation.cfg for it seeing as SoF2 ran off of .frames files. There's idle, reload, fire & melee animations.

I'll take a look at it later tonight. Did you position it according to the Bryar's _hand.md3? otherwise it'll have...interesting positioning like the blaster rifle example above.

 

@@mrwonko: I need a tag_flash, and that's about it. Maybe a basic firing anim too. I'm mostly just rounding up what I can and testing stuff out. The model will also need to be positioned and scaled similar to how the Bryar pistol is scaled and rotated in its .md3.

Link to comment

It is a SoF2 weapon, I haven't edited it at all. The model itself looks to be a fair bit in front of the origin point in modview, so you *shouldn't* have an issue where it's positioned behind the first person view and you can't see it.

hmk. Whenever I get it ingame I'll provide you with a screenshot so you can see where it's at.

We could also make the bryar's _hand.md3 a GLM as well, and make it have actual...um..hands as well as the original gun model (bolted via a tag)

Link to comment

What about using the player models arms but making it so that the rest of the model isn't rendered for the person using first person to help increase performance while reducing the need to make a set of arms to match every model?

 

Seems like if you made only arms/hands for the weapon they would never match the 3rd person model being used, you'd just have like Kyle arms and hands.

Link to comment

What about using the player models arms but making it so that the rest of the model isn't rendered for the person using first person to help increase performance while reducing the need to make a set of arms to match every model?

 

Seems like if you made only arms/hands for the weapon they would never match the 3rd person model being used, you'd just have like Kyle arms and hands.

Some issues with doing this:

  • This doesn't actually increase performance, since the entire player model needs to be evaluated for animations, and either way, performance is not a key factor here.
  • You then need to write out a text file for surfaces that need to be turned off, and modelers like to vary what surface names they use.
  • Numerous issues with clipping, especially with stuff like rodians and grans which have oddly shaped hands
  • The hands will be lower quality in general, as third person models aren't meant to be nearly as detailed as stuff in first person
Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...