RenolY2 / j3dview

View BMD/BDL files
MIT License
11 stars 1 forks source link

j3dview reproduces BTP animations differently than in game #2

Open Humming-Owl opened 5 months ago

Humming-Owl commented 5 months ago

Doing some tests on Super Mario Galaxy I noticed that BTP files are reproduced incorrectly on j3dview (unless they are reproduced differently depending on the game).

Here are two images of 2 BTP animations for Rosalina's model from SMG1 (rosetta.bdl). Both were made with this tool --> https://notabug.org/Humming-Owl/bean

One ends in frame 3 and the other in frame 4. The left one is the one that ends in frame 3, the right one ends in frame 4. On game (first image) the animation of the left BTP ends on a different texture than the BTP on the right. In j3dview (second image) both BTPs end on the same texture (I am using j3dview v0.6.1.1).

smg j3dview

Here are the BTP files used along with Rosalina's model test.zip

The animation data for both BTPs looks like the following (j3d-animation-editor CSV BTP file format)

0,3 or 4,0,.btp
Material Name,Duration,Frame 1,Frame 2,Frame 3,Frame 4,Frame 5
eyeLid_v,5,4,4,4,2
RosettaClotheMat_v,5,4,4,4,2
RosettaCrownMat_v,5,4,4,4,2

I wrote this page on the BTP file format for Super Mario Galaxy BTPs so it might have useful information (there is also information about the CSV BTP format) --> https://humming-owl.neocities.org/smg-stuff/pages/tutorials/file-formats/btp

It took me a while to notice this lol. Regardless, many thanks for your program and work, it has really help a lot with the stuff I've been doing and it has also helped tremendously the SMG community in general. I hope we can get more updates at some point >:]

RenolY2 commented 5 months ago

Ah, so if I understand it correctly j3dview is shooting past frame 2 (eye texture) onto frame 3 (clothing texture) even though the duration on the left one should limit it to frame 2? Yeah that does not sound right, I'll see if I can do something about that.

Amount of updates will most likely be very limited, I usually just fix bugs (if I know how to fix them) or add minor features and in recent times I haven't used j3dview myself all that much although I still do a lot of MKDD modding.

RenolY2 commented 5 months ago

I think I have found a solution. I hope this has not introduced side effects on other types of animations or loop modes https://github.com/RenolY2/j3dview/commit/bde36bd0c24be382742164c76d6bc01442b0994a grafik

RenolY2 commented 5 months ago

https://github.com/RenolY2/j3dview/releases/tag/v0.6.1.2 I hope this fixes this issue.