Skip to content
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

Can't import fmt with 4D Position from WARRIORS OROCHI 4 #3

Closed
fatboyzz opened this issue Sep 30, 2019 · 3 comments
Closed

Can't import fmt with 4D Position from WARRIORS OROCHI 4 #3

fatboyzz opened this issue Sep 30, 2019 · 3 comments

Comments

@fatboyzz
Copy link

fatboyzz commented Sep 30, 2019

Try to import some model from WARRIORS OROCHI 4 here.
I have some .fmt .ib .vb exported. (Athena's helmet, files attached below)
Both '0.ib' and '2.ib' imported correctly.
But importing '1.ib' got error 'Positions are 4D'.
Inside 1.fmt I found the format for position is 'R32G32B32A32_FLOAT'.
I guess these are cloth and hair and have special usage for the extra dimension.
Some settings are needed to omit the extra dimension.
00000.zip

@cg87742467
Copy link

I have the same problem~I find the image texture to these files all have alpha channel.

@DarkStarSword
Copy link
Owner

DarkStarSword commented Sep 23, 2023

Sorry that it has taken me so long to get around to this.

I've adjusted the script so that the data in the 4th dimension of a POSITION and NORMAL semantic will be stored in a vertex layer (like it does for other unhandled semantics) and written back to the mesh on export, and will now warn about the 4D coordinates rather than treating them as fatal - I can now import and export the 1.vb in your zip file, though it looks a bit weird (I remember something similar on the skirts in DOA6 that also had 4D coordinates) and I would appreciate if you can confirm that the exported one works ok once re-injected into the game.

Note that if the data in the 4th dimension is important that certain types of edits may be problematic, e.g. anything that adds a new vertex won't have any data in this dimension, so whatever it is used for may not work. Things like deleting part of the mesh might work ok, while moving a vertex is anybody's guess.

@DarkStarSword
Copy link
Owner

I have the same problem~I find the image texture to these files all have alpha channel.

This issue doesn't have anything to do with alpha channels - I think you might be getting confused by the "R32G32B32A32_FLOAT" format since that would seem to imply an RGBA colour, but in DirectX that same format is also used for 4 dimensional coordinates, so it actually signifies XYZW in this case, not RGBA.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants