STEAM 组
Blender Source Tools BleST
STEAM 组
Blender Source Tools BleST
223
游戏中
1,484
在线
成立于
2013 年 11 月 8 日
所有讨论 > Help > 主题详情
Salaryman 2015 年 1 月 4 日 下午 12:25
Questions regarding RootTransform/Flex imports
Hey dudes! I've got some general inquiries about the addon's importer capabilities. I've got a couple of character and camera animations in Source Filmmaker which I'd like to re-use in Blender. The characters I use are of my own making, so I have the DMX files with all the flexes at the ready as well as Blender files. I've exported my character's animations from SFM by right clicking my animationset and selecting Export > Animation. So far I've found that the character animations can be partially imported into Blender with some caveats. I noticed that RootTransform/Object Transform doesn't get imported (which sometimes results in jittery animations) and Facial animation is lost as well. Looking at the ascii versions of the DMX files, I do see a bone called "unnamed" that I assume to be rootTransform. Console output shows that flexes are also detected, but as bones instead of shape keys. Excerpt from the console:
- Animation refers to unrecognised bone "unnamed" ... - Animation refers to unrecognised bone "right_EyesSquint" - Animation refers to unrecognised bone "left_EyesSquint" etc.

Now I was wondering about the reason why these two don't seem to be supported. Is there a technical reason that prevents these features from being added, or is it simply a time issue? I've got some intermediate python experience, but I thought I'd ask for some background on this before I'd dive in to the code. Thanks for your time, as well as this very complete plugin. (loving the HWM/DMX stuff!)
< >
正在显示第 1 - 7 条,共 7 条留言
Artfunkel 2015 年 1 月 4 日 下午 2:02 
The problems you're seeing are where SFM's DMX animation format differs from studiomdl's. There's no reason why these features can't be added, but I haven't done it (yet) because 1) SFM import is a relatively obscure thing to do and 2) there is potential for confusion:
  • If export is supported, when a user exports a file with SFM data and naively tries to compile it with studiomdl.
  • If export isn't supported, whet a user imports a SFM animation and tries to export it again.
In both cases the SFM data is lost and the best I can do about it is provide spammy warnings that the user may not understand nor even read.

I think the best solution is to implement SFM import/export as a different operator from studiomdl import/export, and perhaps even a different addon. This new operator would invoke the Source Tools and then do its own SFM-specific work afterwards. How does that sound to you?

(I just remembered that there is a third SFM-only feature: bezeier handles on each keyframe. The importer currently ignores them, and the exporter bakes them into extra keyframes. That's another feature that could be implemented.)
Salaryman 2015 年 1 月 4 日 下午 2:46 
Thanks for the swift reply! That explains it then. In that case, a separate operator would probably make sense. Is this something you'd wish to implement yourself, or no plans? I'm willing to take a look, but I'm not yet familiar with the code and the differences between the two formats.
Artfunkel 2015 年 1 月 5 日 上午 10:34 
I'm unlikely to have the time to do this in the near future. Give it your best shot. :)

If you need help navigating DMX files try my desktop editor, DMXPad[github.com]. It's a bit wonky in places but it does have a massively useful file comparison feature.

In terms of the formats, they are very similar. Here's the spec for the basic studiomdl format; anything SFM does ought to be a layer on top of that.
Salaryman 2015 年 1 月 5 日 下午 2:05 
Alright, thank you very much!
Artfunkel 2015 年 4 月 1 日 下午 12:19 
If you're still working on this, you can now fork the Tools' code on GitHub[github.com].
Salaryman 2015 年 4 月 1 日 下午 1:45 
Thanks for that! How exactly are you testing your code? I'm familiar enough with Python to get something done, but I'm completely unfamiliar with the Blender API. I've edited some plugin files by hand, but had to reboot Blender every time to test the changes, so I figured there must be a better way but haven't really put time into figuring it out yet. I see you've got both visual studio project files in the github repo. Do you write and start Blender from VS? How does that work?
Artfunkel 2015 年 4 月 1 日 下午 1:53 
You can reload scripts by pressing F8. Press it twice as Python doesn't always reload all files in a module folder.

You can't start Blender from VS due to a limitation in the Python Tools'[pytools.codeplex.com] UI. You'll need to start it up then attach. But I absolutely do develop and debug there.

There is also a test module that demonstrates how to get automated tests working. Unfortunately the tests require a special build of Blender which exists as a Python module instead of an executable. It builds with VS2013 though, so it's not a huge hurdle.

If Blender crashes while debugging, make your own build with "Python Safety" enabled. That build will be slower but will throw exceptions instead of crasting on invalid Python access.
< >
正在显示第 1 - 7 条,共 7 条留言
每页显示数: 1530 50

所有讨论 > Help > 主题详情
发帖日期: 2015 年 1 月 4 日 下午 12:25
回复数: 7