ShadowyBandit / .geometry-converter

This is a Blender addon designed to be able to import and export World of Warships' .geometry+.visual files, designed for mod authors.
MIT License
11 stars 0 forks source link

Import failed: Struct.error (Byte loop causes required buffer to increase) #4

Open Endlosschleifenet opened 2 years ago

Endlosschleifenet commented 2 years ago

Hey, I tried importing some models, some models work, some don't and this happened image

Horizon1173 commented 2 years ago

i have the exact same problem. i tired to import the Montana and it gives me that exact error

Endlosschleifenet commented 2 years ago

I fiddled around with the code, I changed the values of <3 to stuff like <12 and <256 so on, and the buffer seems to scale with this, so if the value was 3, it is 12. 12 gives 48 and 256 needs 1024. As you can see the buffer required is scaled with this by 4 for some reason.


From: Horizon1173 @.> Sent: Wednesday, September 21, 2022 6:46:32 PM To: ShadowyBandit/.geometry-converter @.> Cc: PresidentFurry @.>; Author @.> Subject: Re: [ShadowyBandit/.geometry-converter] Import failed: Struct.error (Issue #4)

i have the exact same problem. i tired to import the Montana and it gives me that exact error

— Reply to this email directly, view it on GitHubhttps://github.com/ShadowyBandit/.geometry-converter/issues/4#issuecomment-1254030919, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATVQSGWAA2LIXN2YXTFY5MDV7NCXRANCNFSM6AAAAAAQQHCJPM. You are receiving this because you authored the thread.Message ID: @.***>

Horizon1173 commented 2 years ago

so is it in the fix in the repo or do i have to do it myself? 👍 )

Horizon1173 commented 2 years ago

I've been looking through some forums the problem is that the byte are looping hence why if you bring up the number it just requires more bytes. although that's all i could find

Endlosschleifenet commented 2 years ago

Ohh that is really interesting. Well maybe there could be something that would fix this, I will try and find something

Endlosschleifenet commented 2 years ago

image I changed the code, and it seems to have in fact lowered the required bytes from 12 to 4! I am still looking around and I'll update when I find some more stuff

Horizon1173 commented 2 years ago

did you find a fix to the problem ?

Endlosschleifenet commented 2 years ago

Not yet but I am busy for a while, however i will get there.


From: Horizon1173 @.> Sent: Friday, 23 September 2022, 10:07 pm To: ShadowyBandit/.geometry-converter @.> Cc: PresidentFurry @.>; Author @.> Subject: Re: [ShadowyBandit/.geometry-converter] Import failed: Struct.error (Byte loop causes required buffer to increase) (Issue #4)

did you find a fix to the problem ?

— Reply to this email directly, view it on GitHubhttps://github.com/ShadowyBandit/.geometry-converter/issues/4#issuecomment-1256679463, or unsubscribehttps://github.com/notifications/unsubscribe-auth/ATVQSGQOPI6P5RT3ZDP3H6LV7YLYNANCNFSM6AAAAAAQQHCJPM. You are receiving this because you authored the thread.Message ID: @.***>

MeisterReporter commented 2 years ago

Since I also got the same problem, I started testing the code. What I found out is that the script is looping outside the file size. So I added a check, in every for loop which has a .read() function in it, that looks if the reading "cursor" is outside of the filesize and then breaks. For now my modified script imports the file, but the result is a complete mess. Screenshot_20221008_191201 I don't think this is what the importer is supposed to do.

Horizon1173 commented 2 years ago

I think they might of modified the .GEOMETRY files making it cause theses errors. its not out of the realm for developers making new modified forms of the same format. Paladins uses a Modified version of a TFC file so converters end up creating a huge mess of a DDS format.

MeisterReporter commented 2 years ago

Yesterday I found some Scripts in Matlab that claims to be able to extract .geometry files to .obj files (Geometry-model-extraction-demo). In the description they say: "The first functional version is done. It only works on old .geometry files extracted from 0.10.2 to approximatively 0.11.3 becasue WG has started to encode the models with mesh optimizer. Although the file extention remains the same, the data are now coded in another way.", so you are correct.

Horizon1173 commented 2 years ago

so is there anything that we can do now?

HGGZHYIVIQZ commented 4 months ago

92e8e12a4aad381a6026b77664c68e1b i meet the same question now.My blender version is 3.6.0,i have tried the 3.0.0 and 2.8.0 but all do not work too.How to solve it?Or is there other way to import and export the .geometry files in the Blender?