diff --git a/tools/md5_to_dsma/md5_to_dsma.py b/tools/md5_to_dsma/md5_to_dsma.py index 629b47c..6e8a220 100755 --- a/tools/md5_to_dsma/md5_to_dsma.py +++ b/tools/md5_to_dsma/md5_to_dsma.py @@ -666,7 +666,8 @@ def convert_md5mesh(model_file, name, output_folder, texture_size, # ------- st = vert.st - + # In the MD5 format (0, 0) is the top-left corner, same as what + # the GPU of the DS expects. u = st[0] * texture_size[0] v = st[1] * texture_size[1] dl.texcoord(u, v) diff --git a/tools/obj2dl/obj2dl.py b/tools/obj2dl/obj2dl.py index d89e945..6ac40e9 100755 --- a/tools/obj2dl/obj2dl.py +++ b/tools/obj2dl/obj2dl.py @@ -130,8 +130,8 @@ def convert_obj(input_file, output_file, texture_size, if texcoord_index is not None: u, v = texcoords[texcoord_index] - # On OBJ, (0, 0) is the bottom-left corner. On the DS, (0, 0) is - # the top left corner. This flips the top and the bottom. + # In the OBJ format (0, 0) is the bottom-left corner. In the DS, + # (0, 0) is the top left corner. We need tp flip top and bottom. v = 1.0 - v u *= texture_size[0] v *= texture_size[1]