How to make a 60fps MMD Camera in blender with MMD_TOOLS?
Opened this issue · 4 comments
Almost all of MMD producers make 60FPS MMD video. [So I wonder if MMD_TOOLS can set up 60fps camera, I don't see the relevant button.] If I manually set up 60fps, the two keyframes used to switch shots will automatically interpolate, which is likely to give the wrong shot result.
【Example Why】
1.In 30fps mode: keyframe 172 to 173. ( camera starts at 101)
2.In 60fps mode: keyframe 172x2-1 to 173x2-1, 344 is a interpolated frame. (camera starts at 201)
Unfortunately, this interpolated frame will get the wrong result. Maybe it goes into the character's body.It's on the wrong coordinates.
it works well :)
I hope I have expressed the problem clearly.
So I hope this process can be automated.
My friends and I were frustrated by the complexity of the manual process. :(
I have reported the same problem before. If you have some programming experience, the following comments will be helpful.
#133 (comment)
This problem is basically a problem on camera motion side. The same problem also occurs on MMD.
To fix it manually, set the Interpolation Mode
to Constant
for the keyframe before the camera switches.
The function detectCameraChange is only working for single component/channel detection, so it has some limitations and flaws. For example, the Interpolation Mode
of every frame may be set to CONSTANT
when importing a baked camera motion, etc.
It's better to calculate delta rotation and delta location between 2 frames to determine the Interpolation Mode
in vmd/importer.py#L325-L328. But I'm not sure what formula and threshold values are better, it might be better to take all (x, y, z, rx, ry, rz, dis, fov) in to account. 😢
if prev_kps is not None:
if delta_rotation > 30 degrees or delta_location > 2 units * self.__scale: # something like this...
for prev_kp, kp in zip(prev_kps, curr_kps):
self.__setInterpolation('CONSTANT', prev_kp, kp)
else:
interp = k.interp
for idx, prev_kp, kp in zip(indices, prev_kps, curr_kps):
self.__setInterpolation(interp[idx:idx+4:2]+interp[idx+1:idx+4:2], prev_kp, kp)
@powroupi :) I see that. Baked cameras really can't use this function. And this function does need to consider many factors. But I still suggest that it be integrated into the tool as an experimental function and use a toggle to control it. It will show its limitations and flaws to the user to determine whether to use this function. How about MikuMikuDance? When I used it, I found that it had no problem outputting 60fps. It also makes interpolation correction, right?