How to edit animations with the merge models option activated?

SCS Software ATS and ETS2 editing using ZModeler3 filter. Models, Materials, Animation.

Moderator: Oleg

Post Reply
LeynerN31
Posts: 71
Joined: Thu Jan 27, 2022 6:05 pm

How to edit animations with the merge models option activated?

Post by LeynerN31 »

Image

Image
Hello oleg, I come with another question about animations, I hope it is not a bother, the truth is that there is almost no good information on this extensive topic.
You will see well we know that there are animations that they make using blender, in general these animations if you import them in zmodeler and export them in a normal way without modifying anything in the game it will give an error
On the contrary, if we import them with the *merge models* option and export with this option, it will not give us a problem, but on the contrary, the shape of the animation changes, creating a kind of light purple or purple skeleton, I don't know, which I don't know how to manipulate
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: How to edit animations with the merge models option activated?

Post by Oleg »

When you import with "Merge models" option, you get a geometry as a single piece, plus a skeleton with bones. Geometry is assigned onto skeleton bones via bones weight on per-vertex basis. You can switch an object to vertices level, pick Rigging->Influence->Paint tool and "read" assigned bones by hovering vertices. In general, this is how the game actually works - a single piece of geometry is transformed via bones movement/rotation: the game changes bones axes and affected (rigged) geometry vertices do the same. Thus, for example, the game does not need to draw 40 objects one after another, it draws a single geometry object in a single pass, whilst transform of different elements of this geometry piece is done automatically on GPU. "Merge models" being toggled off allows importer to slice single geometry object into pieces and reconstruct a hierarchy of objects that is easier for modder to edit or deal with. This is actually an alternation of what the game file actually is. On the other hand, "Merge models" loads game file's content as is: geometry + skeleton, but it is harder to edit the scene this way.

Back to your question, it is OK to load scene with Merge Models. You can edit animations in this mode too. However, you need to assign skeleton (or its bones) onto animation track(s), so animation playback will affect skeleton bones (and these bones in a turn will affect the geometry object).

The only step you are likely missing is skeleton mode. Skeleton has a default (setup / pose) mode, when you are allowed to reposition or refine bones placement and this will NOT give any effect on a geometry (for example, you need to refine default "pose"), and an "action" mode, when each bone modification (movement/rotation) will actually affect the geometry the skeleton is bind to. You can switch between "setup" and "action" modes of skeleton by right-clicking on it and toggling on/off the Skeleton -> "Setup mode" option. When setup mode is off, alternation of bones will cause affected vertices on geometry object to repeat bones movement. That's the mode you should use to edit or play animation. Toggling setup mode off will revert skeleton and bones to setup/default/pose mode. and when skeleton is in setup mode, animation playback will do nothing to skeleton (to avoid skeleton's default "pose" mode alternation).
LeynerN31
Posts: 71
Joined: Thu Jan 27, 2022 6:05 pm

Re: How to edit animations with the merge models option activated?

Post by LeynerN31 »

Ok I understood that part a little until now, to add a new animation how would the process be?
and for example if I want to move the position of a bone, moving the bone would move the geometry or should I move both? sorry for so many questions is that I want to learn well about this and the only tutorials are from blender and I refuse to use that so complicated to simply import a pmd file hahaha.
LeynerN31
Posts: 71
Joined: Thu Jan 27, 2022 6:05 pm

Re: How to edit animations with the merge models option activated?

Post by LeynerN31 »

For example add a new bone, and therefore a new geometry in this case
User avatar
Oleg
Site Admin
Posts: 14045
Joined: Fri Feb 06, 2004 3:54 am
Contact:

Re: How to edit animations with the merge models option activated?

Post by Oleg »

if you want to add some new "part" animate it, it would look like this:
1. attach geometry of new part to the geometry object.
2. create a new bone in a skeleton using Skeleton->Bone tool. you will need to hover a skeleton or a parent bone in viewport, then click and drag to create new bone. refine bone position and/or axes rotation (still in "Setup mode"). toggle off bone creation tool, you don;t need it anymore.
Skeleton will automatically assign new ID onto this bone. you can read this ID with right-click on a new bone and using Skeleton->"Bone ID" option there. This is the ID you will assign later on animation's track. Set this bone as "Current bone" (e.g. using right-click on Skeleton's base object).
3. switch geometry object to vertices mode, select all vertices of your newly-created part (using Select\Element for example).
4. use Rigging->Influence->Paint tool, expand its option, switch it to "Preset" mode. By default, preset window should show current bone (newly-created one). You can drag&drop bone from hierarchy window to preset options window. In general, you need your newly-created bone listed there with "100" affection rate next to it.
5. Use "Fill selected" button in "Paint" options window. This will assign weight preset onto selected vertices. In case of one bone with "100%" affection rate you can consider this step as "This will assign selected vertices onto given bone".
6. Objects mode. Toggle off "Setup mode" on skeleton. Move newly-created bone and ensure it affects geometry - the "assigned" geometry fragment of the object should move too. Use Right-click and "Skeleton->Reset transform" to revert back to default position.

7. create new animation, create new track in it. assign the same ID as in step #2 onto the track. Toggle "Free mode" button on animations panel. assign (by drag&dropping from hierarchy view into tracks editor view) the bone onto the track.
8. toggle off "Setup mode" on skeleton. Create/edit animation.
9. Export scene as pmd, Save animation pma.

you may record a video of your workflow if the above does not go well to you. I can check the video an tell whether you do something wrong on some step(s). I can't make any video guides or record videos currently, I'm on my small laptop device currently.
LeynerN31
Posts: 71
Joined: Thu Jan 27, 2022 6:05 pm

Re: How to edit animations with the merge models option activated?

Post by LeynerN31 »

Ok brother I will try to do it, because the translator also complicates things, I will try and upload the video, in any case I will be attentive in any case that you can record a video, it would be of great help to all
LeynerN31
Posts: 71
Joined: Thu Jan 27, 2022 6:05 pm

Re: How to edit animations with the merge models option activated?

Post by LeynerN31 »

Oh really it was easier for me to edit animations this way, thanks oleg I had a lot of time trying to learn this
Post Reply