Skip to content

Custom models for custom bones#103

Draft
dima-dencep wants to merge 12 commits into26.1from
cmm
Draft

Custom models for custom bones#103
dima-dencep wants to merge 12 commits into26.1from
cmm

Conversation

@dima-dencep
Copy link
Collaborator

@dima-dencep dima-dencep commented Feb 26, 2026

To fix:

  • The code is shit
  • Bones are not reset after animations stop
  • Nothing is sent over the network
  • Only built-in textures are available
  • The model appears only if parents exist
  • PlatformModel#invalidate should be called at the end of the animation to remove the model from RAM

Copy link
Owner

@ZigyTheBird ZigyTheBird left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall pretty small comments

import com.zigythebird.playeranimcore.math.Vec3f;
import org.jetbrains.annotations.Nullable;

public class CustomBone extends PlayerAnimBone {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not a big fan of the name, but not sure what to replace it with
Looking at the code all the field and variable names still call instances of this pivot bones
We could still call it PivotBone... IDK
If you remember I am still open to adding a pivot field to the AdvancedPlayerAnimBone, so the bone having pivots could also become a less special attribute of it down the road

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We could still call it PivotBone... IDK

No, we can't

If you remember I am still open to adding a pivot field to the AdvancedPlayerAnimBone, so the bone having pivots could also become a less special attribute of it down the road

do it yourself then

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I said I am open to it, not that I want to do it!
Though I might do it... for now that isn't the main topic of discussion

}
},
"animations": {
"cmm_test1": {
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"cmm" is a very vague name
In-general our test anims aren't well organized, but I am too lazy to change that currently

package com.zigythebird.playeranimcore.bindings;

public interface PlatformModel {
void invalidate();
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this method ever called in the core module? I can't find any instance of it

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be called when the animation ends to remove textures from RAM

@ZigyTheBird
Copy link
Owner

I see you're using some sort of string for the texture
In this whole system we also have to consider how easy it would be for users to use this, and currently it'd be pretty challenging, unless we make a custom Blockbench script
As for Blender that's a whole other can of worms you'd have to discuss with Mister Infected

@dima-dencep
Copy link
Collaborator Author

elements is the complete Minecraft format without any changes; we do not need the other model parameters. texture is my implementation, created to optimize network performance. In Minecraft, you can specify multiple textures, but you can use an atlas to combine them all into one large texture, which is what is needed here.

@ZigyTheBird
Copy link
Owner

Well alright, my point is that people need some sort of tool to actually be able to turn their textures into that string
Otherwise people won't be able to use this feature even if they really want to
The best solution to this would ofc be a Blockbench plugin, but any sort of tool will do

@dima-dencep
Copy link
Collaborator Author

I asked Claude to write a Python script

@ZigyTheBird
Copy link
Owner

How kind of Claude...
At this point ask it to write a website or smth it'd be more convenient

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants