scurest / apicula

Convert Nintendo DS .nsbmd models
BSD Zero Clause License
156 stars 17 forks source link

weird uv / unsupported feature in spirit tracks models in viewer and exported models #42

Open steventylerseanherr opened 2 years ago

steventylerseanherr commented 2 years ago

hello at least 1 model in spirit tracks seems to use some kind of offset that apicula doesnt seem to support image the line in the grass here should be lined up with the rest of the grass to give it a smooth transition to sand image and here in the desert it does not do this ingame dumped model do the same

using what i know in blender i can easily fix this on exported models image image but without a material editor of some kind i dont know what is correct and what isnt without having the game right beside me

scurest commented 2 years ago

Please attach the .nsbmd file and any necessary .nsbtx. Also, are you importing through .dae or .glb?

steventylerseanherr commented 2 years ago

base.zip .dae

scurest commented 2 years ago

Thanks. Looks like #25, there is clearly trailing data at the end of the material block for a texture matrix. I've never figured out how those work though, so don't expect a fix to be forthcoming.

Note to self, here's the hexdump:

material mt_sunakusa

0x714   00 00         dummy
0x716   34 00         size
0x718   ff ff 00 00   dif amb
0x71c   00 00 00 00   spe emi
0x720   80 80 1f 00   polygon attr
0x724   ff f8 1f 3f   polygon attr mask
0x728   00 00 0f 40   teximage param
0x72c   ff ff ff ff   ?
0x730   00 00         palette base
0x732   cd 1f         ?
0x734   40 00         texture width
0x736   40 00         texture height
0x738   00 10 00 00   ?
0x73c   00 10 00 00   ?
0x740   00 20 00 00   ?
0x744   00 20 00 00   ?