Anim8or Community

Please login or register.

Login with username, password and session length
Advanced search  

News:

Ian Ross has just released a book on Anim8or. It's perect for a beginner and a good reference for experienced users. It contains detailed chapters on every aspect, with many examples. Get your own copy here: "Anim8or Tutorial Book"

Author Topic: Attaching object or a target to a bone  (Read 7814 times)

bayinghound

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Attaching object or a target to a bone
« on: April 04, 2020, 10:28:13 am »

Is there a way to attach and object to a bone in a scene. I was playing around with targets but that came up empty.

What I'm trying to do is animate a figure with a gun. I wanted to attach the "laser fire" to the muzzle of the gun.

Does that make sense?
Logged

Steve

  • Administrator
  • Hero Member
  • *****
  • Posts: 2126
    • View Profile
Re: Attaching object or a target to a bone
« Reply #1 on: April 04, 2020, 01:00:44 pm »

There isn't any way to do this currently. It's a very good idea and I've thought about it quite a bit. I should just dive in and see what I can do!
Logged

bayinghound

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: Attaching object or a target to a bone
« Reply #2 on: April 04, 2020, 06:11:30 pm »

That would be awesome!
Logged

ENSONIQ5

  • Hero Member
  • *****
  • Posts: 1012
    • View Profile
    • Mission Backup Earth
Re: Attaching object or a target to a bone
« Reply #3 on: April 05, 2020, 02:33:33 am »

There are a couple of sneaky workarounds that may give the effect you're after, if I understand correctly what you are trying to do.  One way would be to use morphs to effectively hide and reveal objects in scene mode.  So, the laser beam would be assigned to a bone in the figure, such as a hand bone, with a morph target set on the beam that changes the length of the beam.  So the beam is hidden in the barrel of the gun, then extended in a single frame when needed.  This is a rough example using an old model:

Logged

bayinghound

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: Attaching object or a target to a bone
« Reply #4 on: April 05, 2020, 05:59:32 am »

There are a couple of sneaky workarounds that may give the effect you're after, if I understand correctly what you are trying to do.  One way would be to use morphs to effectively hide and reveal objects in scene mode.  So, the laser beam would be assigned to a bone in the figure, such as a hand bone, with a morph target set on the beam that changes the length of the beam.  So the beam is hidden in the barrel of the gun, then extended in a single frame when needed.  This is a rough example using an old model:



I tried a slightly different approach with not nearly the results you got. I hadn't thought of using morph targets or a solid beam. Thanks for the tip! I'll try that out.
Logged

bayinghound

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: Attaching object or a target to a bone
« Reply #5 on: April 06, 2020, 04:54:50 pm »

I'm trying to wrap my head around how to use the morph targets for the laser beam. For some reason I can't get it to work
Logged

ENSONIQ5

  • Hero Member
  • *****
  • Posts: 1012
    • View Profile
    • Mission Backup Earth
Re: Attaching object or a target to a bone
« Reply #6 on: April 07, 2020, 02:59:07 am »

Do you mean setting the morph target in Object mode, or accessing the morph channel in Scene mode?
Logged

bayinghound

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: Attaching object or a target to a bone
« Reply #7 on: April 07, 2020, 07:51:06 am »

Yes. Use a morph in scene mode.
Logged

bayinghound

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: Attaching object or a target to a bone
« Reply #8 on: April 07, 2020, 07:53:02 am »

My other option, I guess is to put the laser fire on a different layer with a green background and render it seperately then add it in my video editing software.
Logged

AlecJames

  • Full Member
  • ***
  • Posts: 240
    • View Profile
Re: Attaching object or a target to a bone
« Reply #9 on: April 07, 2020, 09:36:08 am »

I just tried what ESONIQ5 suggested and it seemed to work OK

Is this what you are trying to achieve? 

« Last Edit: April 07, 2020, 09:40:41 am by AlecJames »
Logged

ENSONIQ5

  • Hero Member
  • *****
  • Posts: 1012
    • View Profile
    • Mission Backup Earth
Re: Attaching object or a target to a bone
« Reply #10 on: April 07, 2020, 09:50:37 am »

The morph target should be visible in Scene mode as a channel, though if the motion is being driven by a sequence it might be necessary to convert the sequence to frames first (but I could be wrong, I wasn't paying attention when I did the test!).  From memory this can be done by adding a keyframe to any channel in the sequence, a dialog will ask if you want to convert the sequence to frames.  Then just change the morph channel's value from 0 (no morph) to 1 (morphed) to extend and retract the beam.
Logged

bayinghound

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: Attaching object or a target to a bone
« Reply #11 on: April 07, 2020, 11:48:19 am »

I just tried what ESONIQ5 suggested and it seemed to work OK
 
Is this what you are trying to achieve? 



More or less. I'll play around with it. Thanks
Logged

bayinghound

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: Attaching object or a target to a bone
« Reply #12 on: April 08, 2020, 07:46:00 am »

I was trying to do some recoil.
Logged

AlecJames

  • Full Member
  • ***
  • Posts: 240
    • View Profile
Re: Attaching object or a target to a bone
« Reply #13 on: April 09, 2020, 10:43:42 am »

the laser isn't recoiling with the gun.  What is the parent of the laser?  Or did you intend the gun to recoil and the laser to be stable?

Might look cool if the laser is facing other - a target, has the gun as its parent, so as the gun recoils the laser stays dead on target.

(I know the physics of a laser will not cause recoil, but it looks good  :)
Logged

bayinghound

  • Full Member
  • ***
  • Posts: 210
    • View Profile
Re: Attaching object or a target to a bone
« Reply #14 on: April 09, 2020, 11:47:14 am »

The gun is part of a figure. I made the laser a child of the figure. I couldn't make a bone a parent, which would have been awesome.
Logged