Setting 'Scenegraph' to 'Pass 1' makes the file unreadable by other software
GerasSB opened this issue · 3 comments
Pass 1, which is for translucent objects, sets the Flag
in mats.json to 5 instead of 4, as per BMD documentation. This behavior prevents the saved BMD from being readable by other software.
Flags typically function as bitwise sets, such as 5=4+1
representing both 4
and 1
. However, based on the observation that official files consistently unset the 1
flag, I'll adhere to this practice. It is important to clarify that this issue appears to be related to the software you are referencing, rather than an inherent problem with the flag system. For instance, 7=4+2+1
specifies a valid XLU-pass flag in RiiStudio, and the runtime library will accept it without issue.
When I say "unreadable other software", I'm specifically talking about noclip.website and, more importantly, Dolphin (and presumably consoles too).
Tested specifically with Double Dash.
I tested this on Mario Kart Double Dash (US) and found it to be read both Dolphin and Console (Wii):
Luigi.zip
Noclip rejecting the file is from an assert triggered by seeing an unexpected combination (here) https://github.com/magcius/noclip.website/blob/50f80ca96b38f172f0be9a26c98021374833eb3d/src/Common/JSYSTEM/J3D/J3DLoader.ts#L683-L688
I am not sure what changes rendered your file unreadable in Dolphin. It's possible there's another bug in RiiStudio--I can debug whatever crash if necessary.
Notwithstanding, I will update RS's behavior to match N's in a bit.