Jump to content

Talk:Mod Tool/OniTools addon: Difference between revisions

begin of collecting notes to set up that vertex shading experiment
(getting vertex shading on OBJC meshes - the theory)
(begin of collecting notes to set up that vertex shading experiment)
Line 58: Line 58:
## now we have to hope that onisplit imported the mesh's polygons in the same order as Mod Tool read the polygons
## now we have to hope that onisplit imported the mesh's polygons in the same order as Mod Tool read the polygons
## getting the vertex color from Mod Tool: there's already a code piece on MT's page ("[42] get vertex color")
## getting the vertex color from Mod Tool: there's already a code piece on MT's page ("[42] get vertex color")
I'm not fluent with binary stuff so I dump some notes here:
'''Data table'''
[[Mod_Tool/Scripting#as_binary|Reading the AKEV's name table]] was more or less easy. This time we need to look up the data table.
Three things to take care about: '''reading hex numbers backwards''' (as usual in Oni), '''adding relative offsets''' to data table's offset (took a pretty while to find that one out*), '''subtracting 8 bytes''' for no other reason to get the correct offset.
: * Regarding binary information I found [[OBD:Instance_file_format|THAT]] page very useful.
'''Color data in AGQG'''
The byte array is like this: BF BF BF FF (191 191 191 255 = grey).
The format is BGRA whereas I couldn't see Alpha to have an effect on the color strength. Maybe it will be different with a texture (not tested yet).




8,046

edits