Jump to content

[1.7.10][1.11.2]First Person 3D items with animations


Asean12

Recommended Posts

2 hours ago, Kokkie said:

Haven't watched it but this should be what you're looking for

But how would one do an animation by a certain event or trigger. For example when I left click It does one animation, while when I right click it does another animation. This would be in First Person of course.

Edited by Asean12
Link to comment
Share on other sites

5 hours ago, Faffreux said:

I think you should lock the frame into #1 so the block doesn't move then you use the event on right click (look at EntityPlayer.java) and put the frame changer code in this event 

But the animations are for an item. For example, I left click and the weapon fires. The slide goes back and then resets to it's normal position. How would I go about doing that?

Link to comment
Share on other sites

Forge has a model animation system, but unfortunately there's not much documentation on it.

 

It was introduced in this commit, which briefly explains the purpose of some of the classes. The grammar of the Animation State Machine files is documented here. Forge has an example here (assets), there are also some examples linked here.

 

This can animate JSON and B3D models, but unfortunately it can't animate OBJ models.

Edited by Choonster

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

  • 2 weeks later...

SLR! But thanks for providing the resources. I am currently using Blender to make models so this should go somewhat smoothly. I'd just need to at least one of the Forge devs if they can expand the information about this part of forge. Since this would allow amazing Mods.

Link to comment
Share on other sites

On 9/2/2017 at 9:05 PM, Choonster said:

Forge has a model animation system, but unfortunately there's not much documentation on it.

 

It was introduced in this commit, which briefly explains the purpose of some of the classes. The grammar of the Animation State Machine files is documented here. Forge has an example here (assets), there are also some examples linked here.

 

This can animate JSON and B3D models, but unfortunately it can't animate OBJ models.

Also, will this work with Items in FirstPerson?

Link to comment
Share on other sites

1 minute ago, Asean12 said:

Also, will this work with Items in FirstPerson?

 

It will work anywhere the model is rendered.

 

The animation system doesn't let you change the position of the player's arms, though.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

15 hours ago, Choonster said:

 

It will work anywhere the model is rendered.

 

The animation system doesn't let you change the position of the player's arms, though.

Final few questions, Will it work with animations in Blender it self? Or do I have to animate it in the code it self? And If so can I add an animation to an item when an event happens, (Right or Left Click etc.)

Link to comment
Share on other sites

4 minutes ago, Asean12 said:

Final few questions, Will it work with animations in Blender it self? Or do I have to animate it in the code it self? And If so can I add an animation to an item when an event happens, (Right or Left Click etc.)

 

If Blender can export its models and animations to the B3D format, you should be able to use them in Forge. Otherwise you'll need to export to JSON models and animation files.

 

You tell the Animation State Machine for the model when to transition to each state, the animation files tell it how to animate each transition.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

56 minutes ago, Choonster said:

 

If Blender can export its models and animations to the B3D format, you should be able to use them in Forge. Otherwise you'll need to export to JSON models and animation files.

 

You tell the Animation State Machine for the model when to transition to each state, the animation files tell it how to animate each transition.

So Forge can read the files? and still play the animation. How would I go about doing that? Also have you yourself tried doing this? If so I'd love to see some code.

Link to comment
Share on other sites

1 hour ago, jabelar said:

This forum isn't for people to do the work for you. What have you tried so far? Did you look at all the examples Choonster already gave you? Did you look at the github source code for other mods that do similar things?

I have looked. Just sort of confused on how I'd start on making the mod.  I was just asking if he himself tried it. I'm sorry if I offended anyone.

Link to comment
Share on other sites

2 hours ago, Asean12 said:

So Forge can read the files? and still play the animation. How would I go about doing that? Also have you yourself tried doing this? If so I'd love to see some code.

 

Forge can load animations from B3D models, yes. You still need an Animation State Machine file that tells Forge about the clips, states, etc.

 

I haven't used the system myself, you'll need to look at the examples I linked to see how things are done.

Please don't PM me to ask for help. Asking your question in a public thread preserves it for people who are having the same problem in the future.

Link to comment
Share on other sites

19 hours ago, Choonster said:

 

Forge can load animations from B3D models, yes. You still need an Animation State Machine file that tells Forge about the clips, states, etc.

 

I haven't used the system myself, you'll need to look at the examples I linked to see how things are done.

Thanks for all the info!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Announcements



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.