I have textools.Taner038 wrote:Up mates. I'm waiting for localization tools.
Xbox360, Ps3 and PC.
I have textools.Taner038 wrote:Up mates. I'm waiting for localization tools.
You can share with me pc tools, mate?gula wrote:I have textools.Taner038 wrote:Up mates. I'm waiting for localization tools.
Xbox360, Ps3 and PC.
Thanks, can you upload the mesh file which gave you this error as well?moxxy wrote:With the current version of the importer (fmt_TR2_mesh_1_4.py) Noesis throws an exception if it encounters a triangle index with the value 65535 (0xffff): "RuntimeError: Index buffer was not valid for drawing."
I modified the script so that it skips those triangles. It is slower but is able to import larger meshes.
However, Noesis crashes when I try to load very large meshes (like 46MB).
The modified script: https://www.sendspace.com/file/60ocwn
DRM Dumper v0.0.3a r7 - Download* Base with names updated. Added 6890 filenames.
* Fixed unpack files with too long path more then 260 bytes
* Updated for 1.0.610.1 game version (bigfile.update2.000.000)
Here you are: https://www.sendspace.com/file/x0vvq6Gh0stBlade wrote: Thanks, can you upload the mesh file which gave you this error as well?
Thanks, just checked both of those which seem to crash Noesis. On the bright side, when I load them into my engine I don't get a crash at all. The file should load fine, it looks like there's a bug in Noesis so there's not much we can do.moxxy wrote:Here you are: https://www.sendspace.com/file/x0vvq6Gh0stBlade wrote: Thanks, can you upload the mesh file which gave you this error as well?
Section 70.tr2mesh: Can be imported using my patched script.
Section 68.tr2mesh: Crashes Noesis
I checked the amount of the memory that Noesis uses while importing those meshes and it gets very high
(more than 3400MB in case of Section 68). So the crash seems to be caused by low memory. Python is not my primary programming language
and my patch is just a dirty hack. Maybe you can make the script more efficient.
The face indices are unsigned 16 bits. Triangle strips are usually reset/ended by 0xFFFF index. But this doesn't seem to be the case, 0xFFFF only occurs at the end of the face index buffer which suggests it's most likely triangle list like all previous games.MrAdults wrote:That's not the case, Noesis allows 0xFFFF for 16-bit indices by default. If you're feeding 32-bit indices, you will need to set 0xFFFF as an explicit strip ender using rpgSetStripEnder.
After debugging this I found the mesh has 65536 vertices:MrAdults wrote: However, the error "Index buffer was not valid for drawing" is not caused by out of range indices (this is a different error and informs you of which vertex buffer would be accessed out of range by the index), it's caused by one of the following:
1) Number of indices < 3 for triange list, strip, fan, or polygon.
2) Number of indices not divisible by 3 for triangle list.
3) Same as above 2 but 4 instead for quad lists.
Sounds to me like you're not correctly recognizing triangle strips and are trying to draw them as lists.
@Ekey Hi