Issues with PS2 LTB files
StenApp opened this issue · comments
See original post here
haekb#30 (comment)
I'm open to suggestions, but I don't think there's anything reasonable to be changed except the documentation.
If it just assumed unassigned vertices should be assigned to the root node (or some other "default") on export that could cause very serious visual bugs in-engine, I'd rather just have it fail to export instead. Maybe it's the error checking that needs updating to give a better message about what's wrong.
I'm a bit clueless with this error since i'm a beginner in model formats and 3D stuff.
I just wanted to port over the nolf ps2 models to pc.
Ah, I see what's happening now.
The PS2 LTB format has a flag for models that don't use the skeleton, meaning they don't have any weight data. The PC format doesn't have a flag like that.
I think your only solution is to paint the weights yourself on the models that fail with that specific error. That's as easy as going to edit mode (tab), selecting all vertices (A), and clicking Assign in the Object Data Properties tab with whichever bone's vertex group selected (in theory they'll only have 2 bones, select the one not named null).
Thank you for that information! It worked on the britishpolicehat.Ltb which is an attachment.
Can you update the bt file with the flag info and/or the documentation please?
The ps2_ltb template needs a lot of additional work that I don't want to do at the moment but I threw in a quick change to make the mesh type an enum and activated the pieces loop for the time being.
Thanks, i‘d like to help but don‘t know how.
I compared a model that is the same on ps2 and pc: attachments/models/trainconductorhat
I converted the model directly to lta. It's the vertex weights missing, while the 010 editor ps2_ltb.bt template shows the correct vertex weight count.
I added the models with additional txt extension.
Maybe this file helps us to understand the ps2 LTB file better:
https://github.com/jsj2008/lithtech/blob/master/tools/Model_Packer/lta2ltb_ps2.cpp