Open Sage-of-Mirrors opened 7 years ago
The first warning shouldn't be an issue, it only impacts performance. The second error is caused by a failed input validation when loading the model. The validation is on a field in the INF1 section, that should have the value of the total number of SHP1 packets (the sum over the number of packets of each shape in the SHP1 section). So my guess would be that you haven't set this field correctly.
Anyway, what you guys are doing seems really cool. Feel free to ask if you have any questions, that you think I might be able to help with.
I see. I realize now that this wasn't an issue when each shape/batch only had one packet. When we went on to support rigging, we ran into the interesting problem of the GameCube's default matrix memory set-up.
There is space in memory for 10 model matrices. Then there is space for the tex matrices, and then 1 identity matrix. There is no boundary between any one of these, so if you tell GX to set more than 10 model matrices, that section overflows into the tex matrices.
This is why shapes/batches have packets! It's to make sure that at any given time a primitive is using at most 10 matrices for skinning.
Luckily, this is a quick fix. Thank you for responding.
Yes, at first it seems kind of odd to split the shapes into packets, but when you understand the GC/Wii graphics hardware, it makes perfect sense.
By the way, I tried looking at the custom models you linked in j3dview, and they all crash an entirely different place. It looks like the material is configured to use 4 channels, even though 2 is the max.
I have developed a program for generating BMD files from Collada DAE meshes, the repo for which can be found here. However, j3dview crashes when loading these custom meshes, with an OpenGL-related error as seen here and here.
LordNed and I have worked on a viewer for J3D models, and this renders them correctly.
Three custom BMD files and screenshots of them being rendered as BMDs can be found in Custom_BMDs.zip.