Home Technical Talk

[Blender] Is it possible to hide a bone parented to an object while animation is running ?

rafastrip
polycounter lvl 4
Offline / Send Message
Pinned
rafastrip polycounter lvl 4
Hi everyone , I would like to figure out what's going on with my animation.

let me introduce to this topic and my goal for this model (this topic can be very useful to advance blender's user  to work with blender and Unity or Unreal , so you should read if you want to help me or to solve this problem too) . 

My model :  1 single Armature  , 2 objects ( Arms and gun)  . they share the Armature (Not rigify addon).
My goal : FPS animation ( workflow blender- unity or Blender Unreal  )

for this current test I am using just a object with arms and not a body , because I need to test my animation ( as a good practice and of course to learn to deal with this following issue).

my issue in this animation.  (check the first gyazo link below).

https://gyazo.com/8c44f7d24f233106e36a92c714ce2195

 ( this is a  gyazo's gifl so see it carefully, do not see the fingers, those are not problem I will fix later, the problem , there is not mag! ) 

so, why ?? why is not mag? or clipping ?  ( I am using "mask modifier) this little beautiful Icon.

https://imgur.com/a/qFuoh  ( mask modifier limgur link).

this addon is very useful for hide objects or bones ( the problem with this modifier is when you export the model or models as fbx or whatever, in fbx option, modifiers will be apply , so.... has sense? I export my fbx to unity , the mask modifier is applied...and voula...there is not mag....he's gone.

1 - How can I hide bones in blender without using masking modifier ? (is beatiful but is not great idea for exporting process, it is a modifier after all and blender's modifier can resolve their effects in apply button after the exporting process).

I am really want to create a good animation at least for reloading.... why? well...

I WANT  this effect :smile:

https://gyazo.com/53a8f94a8385015a9ceaa3734a99ec50   (as you can see here, it is not perfect but the magazine dissapear!! that's the point I would like to show in Unity...however I can do that effects with mask modifier  :/:/  and maskings can not be exported). 

I DO NOT  want  :'(:'(:'(  (yea do not want) this effect!! (the reason I am going to explain next).

https://gyazo.com/d09b1f82a7d0252d1d5a5f32ecbf3e2b  ( in this gyazo's gift , sorry all my giazo are delayed...but imagine a little....in this gyazo, I do not use the masking modifier, and the magazine do not disapear...there is not bad idea...)

but....but.... I realised the magazine is not a car in a fuel station  :D:D  ... I mean , in the old school's game , a character shoot to the last ammo , then in the reloading process, the character pick up the empty magazine , retired from the gun , hold it  down to the hips , and magic!!! he takes another one.... he has a fuel station in his pocket!! in his blue pocket! come on guys....should be a good way in blender to deal with parenting objects for this things...this is not about to pick up an object and move it....this is about to pick up an object , trow it  (disappear) and start to hold another from his chest heavy jacket or his blue jeans once more...  

finally, I had seen many tutorials to rigging a gun in blender, but died in blender...not testing in another engine. could be a good post for every person who likes to focus on differents workflows,  blender to xx  , to yy software .


all my workflow for this problem explain it here....

https://blender.stackexchange.com/questions/98413/problem-with-picking-up-and-part-of-my-object-but-hide-too

thanks.



Replies

  • RN
    Options
    Offline / Send Message
    RN sublime tool
    TL, DR dude...

    When you apply a Mask modifier (during export) it deletes all vertices that were being hidden by it (whether it is the whole object or just a few vertices from it, defined by a vertex group).
    Don't use the mask modifier to hide the magazine. Rather, keyframe the scale of the bone that parents the magazine between two consecutive frames, such that in one frame the scale XYZ = [0,0,0] and right in the next frame scale XYZ = [1,1,1].
    It has the same effect of hiding and showing and is more game engine friendly, provided you exclude the magazine from physics collisions.
  • rafastrip
    Options
    Offline / Send Message
    rafastrip polycounter lvl 4
    hey bro,  yes I think to avoid this modifier... scale the mag bone in pose mode right? just the scale with value 0,0,0 for the whole axes in for exampel "keyframe number 49" ...and in the next keyframe (keyframe number 50 ) returno back to the original scale  wgich is 1,1,1 ? do you have a youtube's tutorial to see it  this trick or gyazo's gif ? I am not sure ...but it sounds me a little good your theory :D...
    the main problem I have is the mag is parent it to the bone weapon...so the main bone weapon is the father of the mag's bone...the IK hand is like a puppet... the ik hand is the child of the mag...

    so in hieratchy I got ,  Weapon is father of mag,  so mag is the child of weapon....and finally Ik-RIght hand is child of mag's bone....only right hand is the hand to allow put back the mag.
  • RN
    Options
    Offline / Send Message
    RN sublime tool
    That's correct. You can also do this with a translation if you don't want to use scale: snap the location of the magazine behind the camera on the next frame, so it seems like it disappears (you can't see it anymore, therefore it's "gone").

    Just be careful with animation interpolation. A sudden change like this can cause some anticipation or overshoot in the animation, if the animation curve is being interpolated.

    You can also try keyframing the visibility flag of that object. This depends on the game engine that you're using.
  • rafastrip
    Options
    Offline / Send Message
    rafastrip polycounter lvl 4
    hey, I can solve it , not as I would like to be, but not bad after all , I scaled  the bones in timelime and managed  the keyframe's range, expand them or stretching to dissapearing quick as possible.  My interpolation for the time being is "belsier" or the default one...Yes I am considert to manage some free vector in handle types of the graph editor . My target is Unreal , but I am doing the test of my workflow in Unity because it is more easy to load textures and rigging system , when all this storm calm down I would include my whole 3D character complete , but I need to discern this kind of things , special with guns , in this kind of games . Thx-
Sign In or Register to comment.