Animations are off

#1

Hey Guys and Girls,

I´m still alive and working at my baker_mod (i know it`s been a while since last update, but life and studying kept me busy ^^").
With the arising of ACE I was able to learn the necessary things to solve one of the main problems in my mod: How to implement an extra animation for different workshops/recipes.

So I started to animate my the process of baking something. But everytime I try the animation in-game it´s somehow off.
At first I used the .obj files for male and female models, provide here in the forum. But I ran into the problem that the eyes stand out of the head , the bakershovel wasn´t in the hands as supposed to be and yeah… it was something messy. I concluded the cause for at least the eye-problem was the .obj file, because there was no layer for left and right eye.

So next try was to export a .dae file with voxelshop, after I imported the single .qb files from the stonehearth human-model folder and merged them. With some tinkering and trying I was able to import it into blender and animated the process again.
But when trying it ingame even mor strange things happend to my poor baker. Her torso showed in the wrong direction, the shovel was somewhere else but not in her hands and she was standing right in the oven (at least the last point I was able to fix).

But now I´m totally lost and dont know what else I could do to correct the animations.
So I hoped that somebody here could maybe help me.

I baker_mod.zip (2.7 MB)

I attach my mod.zip to this thread so it is possible to follow my steps. It also contains folder “models & animations”. There are the models-, meta- and skeleton-files I used and the animation .json-files ("named “bake_male/female.json”) I created with them.

Thanks for your time and any help you may can provide. :slight_smile:

1 Like

#2

i hope someone does, i always did hope someone would do a more settlers-ish-cute-style animation for baked stuff like bread :stuck_out_tongue:

0 Likes

#3

Ahh the Settlers, good old days of my childhood… :smiling_face_with_three_hearts:
This was indeed one inspriation of mine ^^

1 Like

#4

I like how the glory hole furnace was repurposed as an oven :smiley:

0 Likes

#5

Oh until now I wasn´t even aware that they look so similar… I played with your mod “Glassworks” and thought “Woooh. This Workshops look so great and full of details.:open_mouth:”. So I took this as inspiration for the overall design and built my oven from scratch from what I thought a baker oven could look like. It wasnt an itended repurposing :sweat_smile:

I love your work and it taught me alot about modding the game. So a big “Thank You” to you :blush:

May I ask you if you could give me hint how I can fix my animations?

2 Likes

#6

Ohh, I’m sorry – I didn’t meant it as an accusation or anything like that :flushed:
I know it’s not the same, the overall shape/size are different, also the brick sizes, etc… :smiley: no worries!
I just commented it in a funny way because the style is recognizable - so I’m honored you appreciate my work :heart:

As for the animations, I’m not much into animation myself so I’m not really sure what could be wrong, I’m sorry :frowning:

0 Likes

#7

Yeah we sort of don’t have a lot of people who know how the animation stuff worked, Bruno knows something about it, dani a bit, and I know @No_Name knew something about it but I’m not sure if he’s still around or not :confused:

0 Likes

#8

Seems like your only problem is that the tool is not placed correctly in their hands? That should be fixed in the tool model itself, check other tools how they are positioned and do the same for your.

0 Likes

#9

No problem Dani, i didn´t meant it rude or something. I understood that it was meant as a joke, sry if my response sounded harsh in some way. Sometimes it´s hard to anticipate how a sentence will sound if you aren´t a native speaker. So please excuse me :sweat_smile:

Thank you for the tip Bruno :grin: I corrected the position of the shovel in voxelshop and now it is were it was supposed to be. But there is still the problem that the upper body faces in the wrong direction (shoulders, hands and even feets included). Could it be a problem with the import of the .dae file into blender?
I remember that you posted in another thread a comment, where you wrote you had to rotate the whole model before/after (?) importing it into blender. Is this maybe the root of the problem?

0 Likes

#10

Yes. I can’t remember if you need to rotate 180 or mirror it. I guess just mirror as from your description it is just flipped. Better get an obj or dae ready for that instead.
I have these two, if you want
male.obj (288.0 KB)
female.obj (266.9 KB)

0 Likes

#11

So it will need a try ^^
Thank you for the files :slight_smile:
I used them for my first animation (which was overall better than that animated with the .dae file), but recognized that the eyes stand out of the head. I figured it is because, the eyes aren´t a layer and as such don´t have a origin that I could set “into” the head (you can see it in the last picture, where the frame enclose the model --> the eyes are outside of the head/face). Also the toes where somehow relatively far away from the feet, even with the origin set correctly.
So did I miss a step? :sweat_smile:

0 Likes

#12

Ok I read a bit in older posts, after I saw a fact in the “Stonehearth Modding Guide” and found there your first attempt to animate with Blender Bruno.
I thin I made a similar mistake as you did back then. I didn´t know that the skeleton.json file would generate the helper bones correctly IF I deleted all unnecessary scene objects (light, camera, etc.). And
there are also helper bones for the eyes.

Will make a new animation this days and report how it´s going :slight_smile:

1 Like

#13

So I´m back and have good and bad news ^^

At first: The Animation works now :tada:
So what was the problem? To be honest, I absolutly don´t have any clue…
I can just tell what I changed to make it work now.

  1. I downloaded the human.obj-files from this post, where bruno asked for them
    Can someone send me here the hearthling models to animate?
  2. Next I searched the skeleton-files in the stonehearth main-mod.
  3. Imported both files in blender and clicking the “prepare skeleton”-button, the helper bones
    appeared at the right positions (!) in the model and the green light turned on
  4. I prepared the relations for all parts and exported a meta-file for later animations
  5. Smashing the “prepare animation”-button the second green light turned on and the model is
    positioned in the middle of the grid.
  6. Preparing the animation and exporting it as (animation) json-file.

And now it works :grin:

But then there is another problem right behind the next corner…
When the crafting process ends, the worker gets stuck in an loop between “Idle” and “Crafting item XY”.


As you can see, she puts her shovel away and in the next second she has it in her hands again.
The only way to end this is to cancel the crafting process, but then you won´t get the product and get the ressources back.
Did anyone encounter a similar problem?
I tried already to change the “effort”- and “work_unit”-values in the recipe, tried to change the length of the animation from 110 frames to 120 or 30 frames (so that it´s a multiple of 30). This steps didn´t work.

And a second question I have in relation with this topic is how to change the “drop_effect” in the workshop.json so that she doesn´t drop the ressources in front of the oven?

As always I may ask you for help or ideas and hints that could sign me in the right direction for a solution. :slight_smile:

0 Likes

#14

The animation is set to loop, you need it to set loop false in your data/rigs/effects files

{
	"type" : "effect",
	"tracks": {
		"animation": {
			...
			"loop": false
		}
	}
}
0 Likes

#15

Good hint Bruno:)
I compared it before with the effect-files in the stonehearth main mod and there stands everywhere “loop: true”. So I considered this to be the standard for all crafting animations.

I tested it today:
The animation is only played once with “loop: false” as configuration. Afterwards my little hearthling stands still there and waits for the end of the process.
At this point I want to ask of the “work_unit” config in the recipes even has an influence, because it was set to 5. But instead of playing 5 times it ended after been played once.

And the second point is that it still gets stuck at the end of the process between doing it and idling… :frowning:

0 Likes

#16

work_unit is just a fallback. It means that the animation will be called that amount of times (that is why it needs to be “loop false”). The effort value replaces that, and it is used to measure how long the animation will be played, in in-game minutes. If the animation is shorter than that, it will be played more times to fill that time.

0 Likes

#17

Ok so far I can follow you.
But I´m unsure how to apply this…
When I set “loop” to false it plays the animation onece and then my baker stands there and waits
for the rest of the work time:

The same happens when I set additional “work_units” to a higher number or delete “effort” in the recipe-file.

But I´m very grateful for your help :slight_smile:

0 Likes

#18

Uhm, wait.
If you set just the work units, then you need it not looping, because the game will run it once, and call it again once it ends, for that amount of work units. if you set it to loop, the first run will never end, as the game does not detect it looping and consider it a single infinite animation.
If you set effort, which is recommended (because it shows the crafting time in the recipe menu, plus can be affect by mood and stats), then you need it to loop true. The game will ask the animation to run only once (but loop forever), and then it will manually ask it to stop after the given time.

0 Likes

#19

This is a very clear explanation :+1:
But I can´t get it working so far. When I set the loop to “true” I have to set an “effort”-value. Ok I did this,
but then, after playing the animation multiple times until the crafting process ends, it gets stuck between “Idle” and “Working” until you cancel it.
On the other hand, when I set loop to “false” and set a value of for example 6 for “work_units”, it plays the animation once, completly ignoring the value. Then the hearthling stands still until the end and afterwards gets stuck in the “idle-loop”.

Now I tried to animate it again in blender to avoid mistakes from this side, but nothing changed.
When I compare my effect and recipe files with them in the stonehearth main mod folder or the files from ACE I can´t see a difference…

I´m somehow blind to detect my problem:sweat:

0 Likes

#20

Try testing without mods. There was multiple reports of crafting errors lately from ace and others like smart craft

0 Likes