Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invalid MD2 and MD3 models can be exported [>2GB filesize] #83

Open
zturtleman opened this issue Sep 14, 2019 · 3 comments
Open

Invalid MD2 and MD3 models can be exported [>2GB filesize] #83

zturtleman opened this issue Sep 14, 2019 · 3 comments
Labels

Comments

@zturtleman
Copy link
Owner

zturtleman commented Sep 14, 2019

Offsets in .MM3D are unsigned 32-bit integers (max 4 GB) and offsets in MD2 and MD3 are signed 32-bit integers (max 2 GB). Currently there is no check to prevent saving/exporting a model that exceeds the offset limit.

MD3 export previously only allowed (including Misfit Model 3D 1.3.8) a limited number of triangles, meshes, tags, and frames so the offset limit could not be reached.

@m-7761
Copy link

m-7761 commented Sep 15, 2019

I don't understand this, but I'm sure MM3D would crap out before it could a load a 2GB model. Can't export what you can't load.

@zturtleman
Copy link
Owner Author

A sphere with smoothness 5 (20,450 vertexes) with 15,000 skeletal animation frames (no keyframes) is a 2.2 MB .mm3d file. Converting to frame animations (Menu -> Animation Sets -> Convert To Frame) and exporting to MD3 should exceed the 2 GB limit. Unfortunately I can't convert to frame animation because I don't have enough memory (4GB RAM + 4GB swap) and Maverick is ended by the operating system. It's a low priority so I dropped fixing it as a blocker for #58.

sphere-15000-frames.mm3d.zip

@m-7761
Copy link

m-7761 commented Sep 15, 2019

Well that's because the frame data must be stored in the most stupid way possible then.

@zturtleman zturtleman removed their assignment Sep 16, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants