#Java 2D animation from sprite sheet
18 messages · Page 1 of 1 (latest)
Please make sure to read #1029373817119838218 as it may answer your question!
Once your question has been resolved, please mark the post as closed by using the </close:1163944441741049897> command.
does the shape/outline of the item change between frames? If so, you can't really extrude it properly. If not, make a version of the texture with a single frame, extrude that, then apply the animated texture
the outline changes yeah, if i just made the actual outline a bit bigger so that all the frames fit inside it would that look weird or would it be fine?
it would be weird because the sides would not be the same for different frames
you would have to put different cubes for different frames for each to have a complete outline
hmmm ok, can i possibly extrude only part of the sheet so i dont need to manually make all the cubes?'
im kinda new to blockbench sorry
yes you could extrude a single framed texture then do the rest by hand
ok ill try this, thank you
Depending on where you wanna have the model there are different ways to turn a texture into a (default-item like) model:
1. Letting the game generate it from a texture (vanilla Java)
2. Directly adding a new item (Bedrock Edition)
3. Letting Blockbench generate it (ONLY use this if the other options are not applicable!!!)
**
1. Letting the game generate it from a texture:**
Create a .json file somewhere inside your models folder and put this code inside of it:
{
"parent": "item/generated",
"textures": {
"layer0": "custom/example"
}
}``` This will tell the game to generate a model based on the texture `YourPack/assets/minecraft/textures/custom/example.png`.
(Use `item/handheld` as parent instead if you want it to be held like a weapon).
It can be used just like any other model, so you can either replace an existing item with it or "add" it with custom_model_data. You can also load it into Blockbench to edit the display settings.
**  2. Directly adding a new item in Bedrock Edition:**
Please follow the steps described in here:
Default like items: <https://wiki.bedrock.dev/items/items-intro.html>
Custom 3D model items: <https://wiki.bedrock.dev/items/3d-items.html>
**  3. Generating it in Blockbench:**
ONLY use this approach if you plan on editing it more than what the other option allows you to do!!!
You need to make sure to use per-face uv (_not_ box-uv!) and then do `File > Import > Extruded Image` and select your texture. Then, pick the way it should generate the texture. You can chose between pixel by pixel, line by line (horizontal/vertical) or in as little chunks as possible (area).
I suggest to always use area for performance. If you wanna edit each pixel/line choose one of the other options.
The first option is the easiest and usually also best for performance.
@vagrant breach 👆
its 64x64 and i want to increase its scale to be bigger than regular items, so i am using blockbench to handle generating the json so the hand position, fps view, etc all look good