[Mod]3d Armor - Fly and Swim (Player Animations)
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
minor fix to git version, surprised no-one noticed armor effectiveness went to nearly 1/5 what it is normally with capes enabled :).
Git version updated, I'll wrap a new version shortly just trying to get enough fix's changes together and clean.
Edit: I'm also trying to figure out some way to remove capes from the "set" check without changing 3d_armor. So far no luck, if i can't fix that code wise i'll just add capes for each material type.
Git version updated, I'll wrap a new version shortly just trying to get enough fix's changes together and clean.
Edit: I'm also trying to figure out some way to remove capes from the "set" check without changing 3d_armor. So far no luck, if i can't fix that code wise i'll just add capes for each material type.
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
Isn't compatible with skinsdb :c
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
Runs nailed it :)
Saying that I am trying to do some fix's and feature adds to base 3d_armor. I could have just added those fix's to my mods ie this one, gloves and another I'm working on. But the functionality I believe is better if it's in the base 3d_armor mod as it has more generic application to anyone using 3d_armor - bare in mind all the below I'm still testing and tweaking.
Little fix - https://github.com/minetest-mods/3d_armor/issues/34
Another little tweak - https://github.com/minetest-mods/3d_armor/issues/30
bigger change - https://github.com/sirrobzeroone/3d_arm ... p/3d_armor
If you raise an issue under the base 3d_armor, then adding skinsdb support could be looked at by someone, if it looks easy enough to do I'll add it or if you have time yourself?.
https://github.com/minetest-mods/3d_armor/issues
Maybe something like "Add skinsdb support" as a title :)
Edit: There's also this little tidbit included in 3d_armor which might mean skinsdb needs to add support for 3d_armor - armor:update_skin(player_name) - I haven't looked into that just noted it was available.
-
- Member
- Posts: 1118
- Joined: Mon Dec 29, 2014 08:07
- Location: USA
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
At one point, stu, the creator of 3darmor, cobled together a collection of mods for the player. It included player_api, 3d_armor, clothing, character_creator, homedecor_wardrobe, multiskin, skin_admin, skins, skinsdb, and wieldview.
Whether it all worked, I can't remember. I recall numerous issues.
However, I did use the player_api mod, which was folded into MTG. I scrapped the rest, and found the appearance mod, by GreenDiamond iirc, and hacked that into 3d_armor. I now have a player that can change hair, eye, and skin color, as well as, shirt, belt, shoes, and pants color, while still using 3d_armor.
It's in my GAL project, in the mod gal. Here's a shortcut to the player code. https://github.com/ShadMOrdre/GAL/tree/ ... gal/player.
In my "hack" of 3d_armor, I embedded the armor api into a player object, gal.player.armor. I configure the armor from the gal_geology mod, the mod that provides the materials. I create the armor in lib_armor. While it may sound convoluted, it actually works very well, and certainly better than the original, with all the required materials mods lagging everything else.
To use gal proper, all you really need is the lib_gal, lib_geology, and lib_tools modpacks from the above referenced project.
Whether it all worked, I can't remember. I recall numerous issues.
However, I did use the player_api mod, which was folded into MTG. I scrapped the rest, and found the appearance mod, by GreenDiamond iirc, and hacked that into 3d_armor. I now have a player that can change hair, eye, and skin color, as well as, shirt, belt, shoes, and pants color, while still using 3d_armor.
It's in my GAL project, in the mod gal. Here's a shortcut to the player code. https://github.com/ShadMOrdre/GAL/tree/ ... gal/player.
In my "hack" of 3d_armor, I embedded the armor api into a player object, gal.player.armor. I configure the armor from the gal_geology mod, the mod that provides the materials. I create the armor in lib_armor. While it may sound convoluted, it actually works very well, and certainly better than the original, with all the required materials mods lagging everything else.
To use gal proper, all you really need is the lib_gal, lib_geology, and lib_tools modpacks from the above referenced project.
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
That's really cool, I like the customisation level to the underlying character skin and the ability for players to customise.
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
maybe you will add a cape with the "hanglider" effect?
- StarNinjas
- Member
- Posts: 411
- Joined: Wed Mar 14, 2018 00:32
- GitHub: starninjas
- IRC: StarNinjas
- In-game: J1
- Location: Terrarca
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
Hey! I just wanted to say thanks again for the amazing mod! Is it possible if you could make a version that doesn't need 3d armor? Can you explain why it needs it anyways? Also maybe just add functions from 3d armor that you want into it?
Thanks!
-StarNinjas
Thanks!
-StarNinjas
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
I need to check but it might actually function without 3d_armor. The 3d_armor support is more because I used the base Sam model from 3d armor it has an "armor" shell around it. I'm fairly sure 3d_armor doesn't change the basic texture layout.
I'm not at my home computer at the minute but it shouldn't matter if fly/swim override the base model with those extra data vectors that never get textured. If you like try changing the mod.conf so 3d_armor is an optional depends, I'll test once I get home in a few hours and see what happens as well and edit results onto this post.
Edit: Okay quick testing it works, I mean quick ie it loaded and flying worked I had to:
to
I can make all those optional checks, when i do some fixes i'll decouple from 3d_armor and make it optional.
I'm not at my home computer at the minute but it shouldn't matter if fly/swim override the base model with those extra data vectors that never get textured. If you like try changing the mod.conf so 3d_armor is an optional depends, I'll test once I get home in a few hours and see what happens as well and edit results onto this post.
Edit: Okay quick testing it works, I mean quick ie it loaded and flying worked I had to:
- Change mod.conf to depend on "default"
- turn off capes under settings
- change init.lua line 88 from:
Code: Select all
armor.default_skin..".png",
Code: Select all
"character.png",
- StarNinjas
- Member
- Posts: 411
- Joined: Wed Mar 14, 2018 00:32
- GitHub: starninjas
- IRC: StarNinjas
- In-game: J1
- Location: Terrarca
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
Awesome, thanks so much!
Don't go to bed tonight, without knowing what would happen if you died. https://thegospelfilm.org/
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
Okay nearly did my head in but after 5 hours of tinkering between 3 blender files and b3d exports. I have the skinsdb b3d player model with working fly/swim et al animations. Now I just need to figure out how to impliment it in my mod to override skinsdb version....currently have it running around the otherway with skinsdb providing the model and my mod the functions for the new animations.
Edit 15 mins later: Um yes well that was surprisingly easy to overide in the end after the 5 hours of blender torture. New version soon checking I haven't broken anything else.
Edit 15 mins later: Um yes well that was surprisingly easy to overide in the end after the 5 hours of blender torture. New version soon checking I haven't broken anything else.
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
Okay I've run some quick testing and everything appears okay.
If you want to give it a try grab the master from git:
https://github.com/sirrobzeroone/3d_armor_flyswim
However feel free to give it a try if you like and provide any bugs here :)
If you want to give it a try grab the master from git:
https://github.com/sirrobzeroone/3d_armor_flyswim
- 3d_armor is now optional ie you can get the new animations with just player_api running
- 3d_armor has the option with/without capes but I have set capes to off by default
- Works with Simple_Skins either with or without 3d_armor - capes untested
- Works with Skinsdb either with or without 3d_armor - capes untested
- Got rid of a couple of old bugs; walking on unknown node and swiming animation when attached to boats
However feel free to give it a try if you like and provide any bugs here :)
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
Okay more testing finished and everything appears to work well although mod interactions can get slightly confusing but here goes:
Just player_api:
fly,swim,crouch,climb animations work, enabling capes will do nothing as you cant wear them
after this assumed you have player_api
Just Simple skins
fly,swim,crouch,climb animations work, enabling capes will do nothing as you cant wear them
Just 3d_armor
You have the option to have capes on or off upto you, capes are considered armor
3d_armor and Simple_Skins
You have the option to have capes on or off upto you, capes are considered armor
Just SkinsDB
Fly,swim,crouch,climb animations work, enabling capes will do nothing as you cant wear them
3d_armor and SkinsDB
Fly,swim,crouch,climb animations work you can enable capes but they wont be visible - It may be possible to mke this appear I just need figure out how to make the cape an armor and a SkinsDB clothing item but for now I haven't figured that out - essentially the cape is being applied as a texture to wrong layer of b3d model- armor layer not clothing layer. I might be able to workaround that but not sure at this point so for the moment not visible.
3d_armor, SkinsDB and Clothing_2
Fly,swim,crouch,climb animations work, visual cape provided by clothing_2 however can also enable capes but they wont be visible and it's a bit strange wearing two capes....but one can be used as armor....no just weird.
Think that covers it, I'll add the above info into the fly and swim mod readme.
For reference I now have 4 different Sam b3d models to cover the above scenario's, hope I don't need to add a 5th to cover another mod....Davethegamers objects for visible items is looking real good to me at this stage :).
Just player_api:
fly,swim,crouch,climb animations work, enabling capes will do nothing as you cant wear them
after this assumed you have player_api
Just Simple skins
fly,swim,crouch,climb animations work, enabling capes will do nothing as you cant wear them
Just 3d_armor
You have the option to have capes on or off upto you, capes are considered armor
3d_armor and Simple_Skins
You have the option to have capes on or off upto you, capes are considered armor
Just SkinsDB
Fly,swim,crouch,climb animations work, enabling capes will do nothing as you cant wear them
3d_armor and SkinsDB
Fly,swim,crouch,climb animations work you can enable capes but they wont be visible - It may be possible to mke this appear I just need figure out how to make the cape an armor and a SkinsDB clothing item but for now I haven't figured that out - essentially the cape is being applied as a texture to wrong layer of b3d model- armor layer not clothing layer. I might be able to workaround that but not sure at this point so for the moment not visible.
3d_armor, SkinsDB and Clothing_2
Fly,swim,crouch,climb animations work, visual cape provided by clothing_2 however can also enable capes but they wont be visible and it's a bit strange wearing two capes....but one can be used as armor....no just weird.
Think that covers it, I'll add the above info into the fly and swim mod readme.
For reference I now have 4 different Sam b3d models to cover the above scenario's, hope I don't need to add a 5th to cover another mod....Davethegamers objects for visible items is looking real good to me at this stage :).
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
New version released 5.6.0.1 - all the above simple_skins/skinsdb/clothing changes have been rolled in and I fixed a few weaknesses in the code. related to assuming the character is always doing activity on nodes.
- j0j0n4th4n
- Member
- Posts: 256
- Joined: Tue Jan 26, 2021 06:45
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
Does 3d armor Fly and Swim works for stu model with bendable knee and elbows (viewtopic.php?t=5768 ) ?
cdb_894a100ddd76
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
Ahh thats a no at the moment, I'd have to adjust the model for skinsdb as well thats a bit of work. Not sure does that mod support 3d_armor? If not also need to update 3d_armor one as well..so that would be at least 2 new sam models.j0j0n4th4n wrote: ↑Mon Aug 15, 2022 22:04Does 3d armor Fly and Swim works for stu model with bendable knee and elbows (viewtopic.php?t=5768 ) ?
I'd probably have to edit my animations to allow for bending elbows and knees otherwise it would look funny.
It's a bit of work but can be done, do you know how many ppl use bendy elbows and knees?
I also want to re-code parts of this mod, to harden it against crashes so servers can make use of the animations more confidentally/at all and I can shift it out of WIP state.
- j0j0n4th4n
- Member
- Posts: 256
- Joined: Tue Jan 26, 2021 06:45
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
I checked now, it doesn't support 3d_armor... I don't understand why though, it does use the default texturing so it should support, doesn't it?
I'm not sure but I don't think many people use bendy elbows and knees, I had to dig a lot to find it. If it is too much of hassle then it may not be worth, I just thought it was a easy swap from one model to the other.
I'm not sure but I don't think many people use bendy elbows and knees, I had to dig a lot to find it. If it is too much of hassle then it may not be worth, I just thought it was a easy swap from one model to the other.
cdb_894a100ddd76
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
The code swapping part is fairly easy, just a bunch case statements, the hard part is creating the combined blender model and keeping them consistent. I worked out a few shortcuts that speed that process up in blender but in the case of bendy elbows/knees to do it properly I'd need to recreate the animations in blender so the animations use the knees/elbows.j0j0n4th4n wrote: ↑Tue Aug 16, 2022 17:21I just thought it was a easy swap from one model to the other.
Next time I'm playing around with the models I'll have a look, Stu linked to his original blend file which helps.
On the code cleanup, I've removed a couple of minor bugs, not crash events more just animation states being allowed when they shouldn't. I've also rolled a few else's together, it's not a huge overhead on cpu but I know even 1 cpu cycle saved can be meaningful when multiplied by x number of players - not so much an issue for singleplayer.
I do wish there was someway to place the code inside each player object rather than using globalstep...maybe there is and I just need to dig more as entities run their animation from inside self/object, I probably need to go read that section again in the api, really could use a player.on_step bit like entity.on_step...maybe at the engine/server level it wouldn't matter much.
hmm that or possibly I need to improve the smarts in my code and just check if the player has moved and/or has velocity if not just exit code early and not update current animation leave it running code sort of does that now but it checks every case first....bit heavy for a non-moving player.
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
Just uploaded a slightly cleaned up version to github master.
Not sure if anyone wants to give it a try, it should break nothing about the only noticable thing is when flying down with flying you wont get fall animation any more or very very rarely. The other animations should trigger the same.
I've dropped about 150 lines of code and consolidated several elseif's togther into a single case. Much easier to understand and debug issues now, still some formating and structure issues I'm workin on.
Not sure if anyone wants to give it a try, it should break nothing about the only noticable thing is when flying down with flying you wont get fall animation any more or very very rarely. The other animations should trigger the same.
I've dropped about 150 lines of code and consolidated several elseif's togther into a single case. Much easier to understand and debug issues now, still some formating and structure issues I'm workin on.
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
5.6.0.2 release, cleanup and annoying unable to jump out of water bug addressed
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
I'm working on that bailout code when player is stationary essentially don't run all the animation checks just do a quick shortcut set checking a few special cases.
i've used minetest.get_us_time as it counts microseconds. It's a bit variable and rough but it does appear to make a difference:
Basically when standing its 50-200 microseconds normally from top to bottom of code, thats essentially running the shortcut code piece.
Running the full code ie moving around and having to check seems to get upto 400-600 microseconds.
microseconds not exactly a long time but it's a recordable difference, assuming theres not some lua/c++ code interaction I'm not aware off that makes the above totally invalid :).
I'll keep tinkering maybe I can make that full code a little more efficent.
Edit: That was a little disappointing tried grabbing the nodes for swiming flying node check once and then just checking the local table...made next to no difference guess get_nodes is pretty efficent for small numbers of nodes.
Edit2: No it did help just hard to spot in the general fluctuations, tweeked a few other bits of code and I've got rid of a few of the nasty spikes. Watching the profiler with the mod on and off it definitly increases packets though, to be expected - I'll keep tinkering see if I can get it down some more.
i've used minetest.get_us_time as it counts microseconds. It's a bit variable and rough but it does appear to make a difference:
Basically when standing its 50-200 microseconds normally from top to bottom of code, thats essentially running the shortcut code piece.
Running the full code ie moving around and having to check seems to get upto 400-600 microseconds.
microseconds not exactly a long time but it's a recordable difference, assuming theres not some lua/c++ code interaction I'm not aware off that makes the above totally invalid :).
I'll keep tinkering maybe I can make that full code a little more efficent.
Edit: That was a little disappointing tried grabbing the nodes for swiming flying node check once and then just checking the local table...made next to no difference guess get_nodes is pretty efficent for small numbers of nodes.
Edit2: No it did help just hard to spot in the general fluctuations, tweeked a few other bits of code and I've got rid of a few of the nasty spikes. Watching the profiler with the mod on and off it definitly increases packets though, to be expected - I'll keep tinkering see if I can get it down some more.
- sirrobzeroone
- Member
- Posts: 593
- Joined: Mon Jul 16, 2018 07:56
- GitHub: sirrobzeroone
- Contact:
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
So a little more cleanup on git master, I'm still testing but once done I'll do a new release.
https://github.com/sirrobzeroone/3d_armor_flyswim
Few notes:
Edit: Should add if the above code has no major bugs or issues, Once I do the 5.6.0.3 release Ill be asking to move the mod from the WIP Mods to Mods as I'm happy it's no longer Wippy :)
Edit2: Sigh...Forgot to add I have noticed occasionally when the player hits the ground and dies they bounce back up. Thought I'd fully fixed that issues ages ago but looks like it's still hanging on in some strange edge case. Other than being weird it causes no impact to player...they are dead after all and respawn puts you back on the ground. I'm trying to address it but wanted to note it - I suspect it's been in all previous releases not anything new.
https://github.com/sirrobzeroone/3d_armor_flyswim
Few notes:
- Incorporated a short animation check for stationary players by storing last animation in player meta, unfortunatly I couldn't use player animation range as player_api always runs before my mod so the animation range has been reset.
- In earlier testing I noticed terminal velocity was to low, ie you could fall from any height and survive (maybe Sam is part cat?). After a bit more testing of falling and loading it looks like 150kph (93mph) works okay. When players hit the ground they now die - sorry and ouch.
- I resorted the elseif's to try and put the more common cases first this should help a little with performance
- As mentioned in above comment, I now grab the 5 nodes below the player in one go and then check these as needed for each case - varies between checking 1-5 of them. Slightly more overhead for some cases but on balance should be more efficent
- Some additional code cleanups to help with readability
Edit: Should add if the above code has no major bugs or issues, Once I do the 5.6.0.3 release Ill be asking to move the mod from the WIP Mods to Mods as I'm happy it's no longer Wippy :)
Edit2: Sigh...Forgot to add I have noticed occasionally when the player hits the ground and dies they bounce back up. Thought I'd fully fixed that issues ages ago but looks like it's still hanging on in some strange edge case. Other than being weird it causes no impact to player...they are dead after all and respawn puts you back on the ground. I'm trying to address it but wanted to note it - I suspect it's been in all previous releases not anything new.
- ErrorNull
- Member
- Posts: 274
- Joined: Thu Mar 03, 2016 00:43
- GitHub: ErrorNull0
Re: [Mod]3d Armor - Fly and Swim (Player Animations)
was looking for a crouch mod and found this awesomeness. thanks for your time and effort put into it and hope you continue development. are there still features you have on your todo list that we should look forward to seeing? is it possible to add a setting to allow the crouching animation to bend a bit lower?
Who is online
Users browsing this forum: No registered users and 32 guests