Tempust85 Posted February 7, 2014 Author Posted February 7, 2014 SoF2 made first person arms (one GLM per arm, but shares the same GLA), that were bolted to the weapon via the 'gun' bone. They have a different GLA than the weapons, and with slightly different names. I'm guessing the animations are told to run at the same time via code. The arms GLA contains a 'master list' of every weapon animation it has animations for. It's a clever method, but don't I think we need to do things this way. Their scene file must have been massive to have every weapon mesh, every weapon bone, and every weapon animation. Here's a sample of my idea: - e11_fp.GLA (E-11 first person weapon & arms GLA)- e11_fp.GLM (first person weapon mesh, runs off of e11_fp.GLA)- default_arms.GLM (first person arms mesh, runs off of E11_fp.GLA) Load the weapon GLM, then load the arms GLM similar to how the code looks for _hand.MD3 but in this case _arms.GLM. If we separate the arms and weapon mesh, we can set things up for later on if anyone decides on changing viewmodel arms depending on the player model chosen.
eezstreet Posted February 7, 2014 Posted February 7, 2014 Sounds like a solid plan to me. Do note that the loading order is actually backwards - the _hand.md3 (_arms.glm in this case) actually gets loaded first, and then the weapon GLM/MD3 gets bolted to the tag_weapon on the hand. BUT. if the tag doesn't exist, it puts it at 0 0 0. Currently I'm working on a chunk of code that allows you to specify what _hand model to use (or, if you don't want to specify one, simply flag with NoHandModel and it'll just not use it and use 0 0 0) Tempust85 likes this
eezstreet Posted February 7, 2014 Posted February 7, 2014 @@DT85: not quite there yet: Tempust85 likes this
Tempust85 Posted February 7, 2014 Author Posted February 7, 2014 Well at least it loaded and you can see it, good progress. EDIT: Will this overwrite the current MD3 view model code, or is MD3 to be treated as a fallback incase GLM isn't found?
eezstreet Posted February 7, 2014 Posted February 7, 2014 Well at least it loaded and you can see it, good progress. EDIT: Will this overwrite the current MD3 view model code, or is MD3 to be treated as a fallback incase GLM isn't found?It checks the extension. If it's .md3, it uses the original viewmodel code. If it's .glm, it uses the custom GLM code, but both sections of their code are almost identical (just checks for GLM/MD3 in a few spots). I have to actually write the code that does muzzle flashes and animations yet. I'd like it if you could rotate and position the gun model properly for me, so I can get a better view of the animations.
Tempust85 Posted February 7, 2014 Author Posted February 7, 2014 The weapon is positioned the same way player models are in modview, Z axis as up. The image you posted looks to be using the model's X axis as up. Must be a leftover MD3 tag axis thing which rotates the model 90 degrees along the Y axis, resulting in the X axis being up.
eezstreet Posted February 7, 2014 Posted February 7, 2014 The weapon is positioned the same way player models are in modview, Z axis as up. The image you posted looks to be using the model's X axis as up. Must be a leftover MD3 tag axis thing which rotates the model 90 degrees along the Y axis, resulting in the X axis being upExcept I disabled MD3 tags. I checked and the code it's using only does angle calculations based on viewaxis, which ought to be correct.Viewmodels are weird like that, that's why Raven opted for the weird positioning of stuff in _hand. It's not your model though, because it looks fine in third person (other than being more forward than it should be) EDIT: nope, it's bobbing calculation that does it, I think. EDIT2: nope, not it.
eezstreet Posted February 7, 2014 Posted February 7, 2014 @@DT85: ingore me, i am an dum nob There WAS some leftover tag crap. D'oh. As you can see though, positioning is still a little wrong, this is probably because they set some positioning and scale stuff externally via some plaintext files, BUT the scale looks correct relatively speaking for JA. Lemme manipulate cg_gun_x and cg_gun_y to get some results. EDIT: Looks more menacing than a blaster, i'll give it that. fix position tho pls cuz it breaks animations when i use cg_gunx/cg_guny :<
Tempust85 Posted February 7, 2014 Author Posted February 7, 2014 Yeah don't worry about the position, that will be fixed when I make my own view model. The model_root (used as the view position no doubt) is positioned far away from the weapon mesh, but I'll be sure to position it closer in mine. Brilliant work though eez.
Tempust85 Posted February 7, 2014 Author Posted February 7, 2014 Judging by your JK2HD post, the animations are working now?
eezstreet Posted February 7, 2014 Posted February 7, 2014 Not quite. I have a plan on how to accomplish things though. It might be easier if the animations.cfg was in the same folder as the .glm though, as there isn't a way (currently) to get the animations.cfg when it's in other folders (such as skeletons/) Probably going to hammer stuff out more this weekend. I also got a fix for Angelscript stuff, so I have a big weekend ahead of me in terms of coding. Tempust85 and Stoiss like this
minilogoguy18 Posted February 8, 2014 Posted February 8, 2014 On objects with custom animations that aren't player models the animation.cfg should be in the same folder, models using the _humanoid.gla are the only exception. Not sure if that helps any to know that though. Nice progress so far though.
Tempust85 Posted February 8, 2014 Author Posted February 8, 2014 The GLA + animation.cfg would be with the GLM because I see no reason for it to be separated.
eezstreet Posted February 8, 2014 Posted February 8, 2014 Alright then. Also note, you'll need a *flash tag in order for muzzle flashes to show up in their proper position.Otherwise, it should be alright. Have you got any plans for other GLMs? That SOF2 model has no *flash tag or an animations.cfg in the proper place (+ bad positioning)
Tempust85 Posted February 8, 2014 Author Posted February 8, 2014 I'll need to tweak it ingame to get the position just right, which I can't do because JK2HD's code doesn't compile for me. I get a bunch of unresolved externals that look to be due to angelscript in the JK2 game library.
eezstreet Posted February 8, 2014 Posted February 8, 2014 I'll need to tweak it ingame to get the position just right, which I can't do because JK2HD's code doesn't compile for me. I get a bunch of unresolved externals that look to be due to angelscript in the JK2 game library.Two things -1. There's a code release in the news section which you can use2. Yea, that's a bug with CMake. Go to CMake and copy the AngelScript_LIBRARY_DEBUG (or AngelScript_LIBRARY_RELEASE) field's contents. Paste them into the JK2 Game Library's project properties, in Linker -> Input (pasting it at the beginning and adding a semicolon after that) Tempust85 likes this
Tempust85 Posted February 9, 2014 Author Posted February 9, 2014 Ok so now it's compiling. I run the game and all looks fine until after the STAR WARS then there's several missing 2D textures mentioned in the console and no models loading whatsoever in the first level including player models. Tried both debug and release, same thing. I have +set com_jk2 1 +set fs_game JK2HD in my shortcut, so I have no idea what's going on.
eezstreet Posted February 9, 2014 Posted February 9, 2014 Ok so now it's compiling. I run the game and all looks fine until after the STAR WARS then there's several missing 2D textures mentioned in the console and no models loading whatsoever in the first level including player models. Tried both debug and release, same thing. I have +set com_jk2 1 +set fs_game JK2HD in my shortcut, so I have no idea what's going on.Would this perhaps be due to your skeleton? You are using JK2 assets, correct?
Tempust85 Posted February 9, 2014 Author Posted February 9, 2014 I've taken it out and it still happens. I have all of JK2's assets in the JK2HD folder.
eezstreet Posted February 9, 2014 Posted February 9, 2014 Try putting them in the base folder. EDIT: unless you have JKA assets as well?
Tempust85 Posted February 9, 2014 Author Posted February 9, 2014 I have JKA assets in the base folder, and JK2 assets in the JK2HD folder. EDIT: Putting JK2's assets in the base folder instead of JKA's causes a crash when creating a new game.
eezstreet Posted February 9, 2014 Posted February 9, 2014 Get rid of the JKA assets. They're likely the source of the issues. Do you still have the assets in your base folder?
Tempust85 Posted February 9, 2014 Author Posted February 9, 2014 I've tried removing the JKA assets, still not working. Now it's crashing to do with the vanilla dll, I have no idea what's going on. :\
eezstreet Posted February 9, 2014 Posted February 9, 2014 This sounds all so familiar... What error does it give you?EDIT:Did you enable BuildJK2Support in cmake?
Tempust85 Posted February 9, 2014 Author Posted February 9, 2014 Yeah I did. I'll try a fresh /build dir and see how I go. Normal JKA works fine with what I compile, though I need to set the com_jk2 to 0.
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now