HeroEngine Forums
Welcome, Guest. Please login or Register for HeroCloud Account.
Pages: [1] 2

Author Topic: [Resolved] Bone limit and attachments - possible workaround?  (Read 2274 times)

AlmightyGir

  • Developers
  • *
  • Posts: 24
    • View Profile

Hey guys,

I'm aware that there is a bone limit for GPU driven rigs, the question i have is regarding characters that may or may not have certain attachments that take them over that limit, and if there's a workaround for it at all?

for example,

you have a character rig that is 75 bones. this is low enough that it can all be calculated on the GPU. if i wanted to add a set of wings that may not always be in use and uses an additional 12 bones, this could take the total to 87 which would now require the rig to be calculated on the CPU.

would it not be possible to do the following?
Rig the character
Rig the wings

have the wings spawn as their own entity which "follows" the character around, thereby not going over the bone limit and having both rigs calculated on the GPU?
« Last Edit: Jul 03, 13, 04:38:19 PM by HE-Cooper »
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Bone limit and attachments - possible workaround?
« Reply #1 on: Jun 12, 13, 11:56:09 AM »

you can attach objects in game to a bone of a character. So I would assume you could have wings, and attach them to a single wing bone on the character model.

Your character controller will need to account for this, cause the wings will just be there, they won't by default be part of the animation scripts etc. But could play animations based on various conditions. Such as when the player is flying, also play the animation for the wings to flap and loop.



Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

AlmightyGir

  • Developers
  • *
  • Posts: 24
    • View Profile
Re: Bone limit and attachments - possible workaround?
« Reply #2 on: Jun 12, 13, 12:38:01 PM »

yeah the way i pictured this in my mind was like...

in max/maya create all the bones for the base/human rig. then build the bones for the wings as a separate rig, but all in the correct locations in relation to the human rig.

then create all the animations needed, and export the wing animations with just the wing bones visible.

that way the human would be a dynamic character, and the wings would just be an animated asset which could be spawned on the human and follow it around everywhere, it would appear to be part of the same character externally, but internally would get around bone limits and such.
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Bone limit and attachments - possible workaround?
« Reply #3 on: Jun 12, 13, 01:07:50 PM »

Should work, like I said lots of added work to get the feel just right, as you will need to have the controller tell the wings what to do when, so it appears to be part of the model.
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

AlmightyGir

  • Developers
  • *
  • Posts: 24
    • View Profile
Re: Bone limit and attachments - possible workaround?
« Reply #4 on: Jun 12, 13, 02:11:22 PM »

wouldn't a solution to that, be to create the wings as a static character? so it still follows all the same animation patterns as a character, and you can just toggle them on/off?
Logged

PN-Dwight

  • General Accounts
  • *
  • Posts: 465
    • View Profile
    • Pirates' Nest
Re: Bone limit and attachments - possible workaround?
« Reply #5 on: Jun 12, 13, 02:50:25 PM »

As I explained Amanda as well a while back, just use different rigs with different bone-setups.

Check the monkeytok example: it uses 2 rigs. One for the flying monkeytok with wings, one without it. I applaud the technical artist who made that, as it is an amazing setup.

I wouldn't even dare crossing the 70's line, as I also explained to Amanda. Having people running around with ~90 bones per character... Mamma mia, but not impossible of course. It's your choice, and depends on your management, and if you want to include the CPU.

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Bone limit and attachments - possible workaround?
« Reply #6 on: Jun 12, 13, 03:19:57 PM »

wouldn't a solution to that, be to create the wings as a static character? so it still follows all the same animation patterns as a character, and you can just toggle them on/off?

would mean your controller is controlling two characters at the same time. which is what I was hinting on with needing to modify the controller to make it control both seperate characters at the same time.

What Dwight is saying is the better / best option.

Have you guys tried to look around for coH rig examples to see how they did it?
Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
Re: Bone limit and attachments - possible workaround?
« Reply #7 on: Jun 12, 13, 04:46:14 PM »

This the original thread about the bone count for the HE - https://community.heroengine.com/forums/index.php/topic,4269.0.html.
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
Re: Bone limit and attachments - possible workaround?
« Reply #8 on: Jun 12, 13, 06:19:20 PM »

One more thing - keeping in mind that we're working on a project that won't be launching for a while yet, meaning that the average power of potential users' computers will be a bit highe rby then - just  how big a performance hit are we talking about if the 75 limit is broken by 3-4 bones?
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

PN-Dwight

  • General Accounts
  • *
  • Posts: 465
    • View Profile
    • Pirates' Nest
Re: Bone limit and attachments - possible workaround?
« Reply #9 on: Jun 13, 13, 03:39:19 AM »

This the original thread about the bone count for the HE - https://community.heroengine.com/forums/index.php/topic,4269.0.html.

Note how the lead technical artist says there that it's about the bones in use. Which directly links to the monkeytok solution I proposed to you.

Thus, make sure that the total number of active bones don't surpass this; bones only get used on dynamic characters if there is a rigged mesh attached to it. It's like the tail with the human character we see :)

HE-BENNETT

  • HeroEngine
  • *****
  • Posts: 559
    • View Profile
Re: Bone limit and attachments - possible workaround?
« Reply #10 on: Jun 13, 13, 01:19:24 PM »

The performance hit, I believe, comes from pushing the calculations for <75 bone skeletons onto the CPU instead of the GPU.  So even going over by 3-4 will incur a noticeable performance hit.

Logged

Amanda_Brooks

  • General Accounts
  • *
  • Posts: 514
    • View Profile
    • Heroes and Villains
Re: Bone limit and attachments - possible workaround?
« Reply #11 on: Jun 14, 13, 06:58:05 PM »

We managed to squash down our bone count to be 75 with every combination of costume parts, except for a rare combination that would take it to 76 - but we feel that it's rare enough to allow it to pass.
Logged
"Heroes and Villains" - www.heroes-and-villains.com
Facebook: https://www.facebook.com/HeroesAndVillainsMMORPG
Twitter: @Plan_Z_Studios

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Bone limit and attachments - possible workaround?
« Reply #12 on: Jun 14, 13, 11:09:29 PM »

to be honest I would figure some one in that super rare to be 1 bone less.

I know you are going for super high ultra realistic cloths, robes, wings, etc but don't always keep this in mind.

If the players can't play it doesn't matter how realistic it looks.

Also the problem is when you break the threashold it doesn't run the 1 bone it runs all the bones for the character via cpu which isn't built to handle it, like gpu's are. This will be fine for the other players, cause as you state should be a really rare case. but the guy that has that rare combination will have a support ticket in with you every day. He will make a huge fuss over your engine being broken, on your forums,  and will show his poor results on youtube and get 2 million hits, making for a public relations nightmare. Since it will be easily reproduced by others, it will become the norm.

Then best of all is the smart guilds that exploit this effect, where a guild runs this character setup, just to zone grief other players. So basically you could have 200 people walking around zones bringing down client after client.

Not trying to be doom and gloom but gamers are a-holes and will do this stuff all the time. Just look to any game out there. Even back to Ultima online days, where we use to lay down 1,000 daggers at the dungeon entrances, so when the player crossed over they would lag out hard, while everyone else already in the dungeon had loaded all 1,000 daggers so they didn't have the lag. Made killing people so much easier when they couldn't fight back.


Now it's possible that by the time your game launches, everyone will be running nvidia cpu's that function more like gpus. Or they might change the gpu structures and such to handle more, but are you willing to risk your whole game and 5 years of work, for that one extra bone to make that cape flow just a tad better?


Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]

AlmightyGir

  • Developers
  • *
  • Posts: 24
    • View Profile
Re: Bone limit and attachments - possible workaround?
« Reply #13 on: Jun 15, 13, 04:16:52 PM »

yeah we're fairly confident that we can get it down to 75 in all cases, just through smart use of particular parts.

one question i do have though -




does this root bone count towards our total bone count? nothing will ever be skinned to it, but i feel it's an important enough question to ask, just in case.
Logged

keeperofstars

  • General Accounts
  • *
  • Posts: 998
    • View Profile
    • StarKeeper Online
Re: Bone limit and attachments - possible workaround?
« Reply #14 on: Jun 15, 13, 09:49:10 PM »

just a side question. I'm going to assume that 3rd bone in his arm is for attachment of something?

also i could be wrong but since the position of the root bone determines your characters forward, backwards, and sideways motion, i'm pretty sure it's counted.

Remember it's used to track the rig's position in the game world as you have to "animate" it's location when doing movement based animations. Otherwise your rig can't move in game. Meaning in max or maya when you want to do your walk animation you have to move the Bip01 forward along with the animation of the walk.


Logged
[img]http://screencast.com/t/x7btcSSyp3h0[\img]
Pages: [1] 2