-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preprocess data #38
Comments
Hi, to get the information you will need some parser for your input format. This part is not so elegant and requires some manual check on the parser results (partially due to the inconsistency of different formats of rigged models). That is why I didn't release code for this. There are some off-the-shelf parsers that I know: In my project, I initially use .dae models (collada). I found no parser can be used for all downloaded models. In the end I use pycollada and Maya to get the information, and check the results manually. I released a Maya script to parse FBX format, as a reference that you can start from: |
Thank you very much. I tried with .blv or other mocap formats in ascii but got confused. I'll tell you if I make up any other method for this task. |
@zhan-xu Hi! I have tried your fbx parser with fbx models downloaded elsewhere. It seems that the texture or vertex color information is lost during the parsing process. Is there any way to restore this information or parse from fbx using mayapy? Also, how can I save obj, riginfo along with texture back into fbx? Can you offer some tutorials / blogs / links about this? Thanks !!!!! |
Hi. My fbx parser if a very preliminary one and has many limitations. For your question, I think you need cmds.polyEditUV to get vertex UV, and cmds.polyColorPerVertex to get vertex color. In function record_obj, write the UV and color according to OBJ format. Another possibility is instead of using record_obj, try something like:
There are several options you can choose for parameter "op". You need to figure out which flag to use to save vertex color and uv. To reassemble rig_info and obj back to fbx, you can use RigNet/maya_save_fbx.py with mayapy. Still, i didn't consider color and texture here, but if your obj file already has that information, I assume they will be loaded when you open the OBJ. |
Thanks for your quick and detailed reply!!! |
I was able to use
to save the material into .mtl file and load the obj.
in |
Hi, I just tried by myself and had the same problem. Take a look at the this https://gamedev.stackexchange.com/a/66270 |
@zhan-xu Got it! Thanks!!! |
Hi, Could you please elaborate more on how to process meshes with multiple components? Thanks! |
sorry but i don't have a ready-to-use parser for any fbx format. Maybe you can search if there is any latest python library that support it. My maya [script](new link) can only preprocess single component. I am not sure how hard it is to modify it for multiple components. Check Line 160 where I take [0] only and you might start from there. Or you can try if some software or library can convert multiple-component mesh to single-component one. |
Thanks for the reply, I ended up using Maya to combine all components into a single component. |
Hi @sunshineatnoon, Can you please share your script for converting parsing .fbx files (that handles all the present components)? |
Dear Zhan-xu, thank you for your huge work.
Could you provide some insight on how to generate rigging joints and skinning data the way you have in .txt format?
`joints ankle_r -0.11857700 0.06815820 -0.27102600
joints tail_4 -0.00000002 0.31470800 -0.34982900
joints collar -0.00000000 0.28504700 0.02488300
joints face -0.00000000 0.31088600 0.05898700
joints arm_l1 0.11882800 0.20566000 -0.00539320
skin 10 mouth_r 1.0000
skin 11 mouth 0.4000 mouth_r 0.6000
skin 12 mouth 0.7000 mouth_r 0.3000
skin 13 mouth 0.7000 mouth_r 0.3000
skin 14 mouth 0.7000 mouth_r 0.3000 `
The text was updated successfully, but these errors were encountered: