coderbot16 / cemconv

Tool for converting to and from Empire Earth's model format.
MIT License
7 stars 1 forks source link

Cannon convert non-CEMv2 files to OBJ yet #3

Open ferds814 opened 5 years ago

ferds814 commented 5 years ago

I ran into a SNAG with 11 models not being cemv2, and cemconv is telling me to run rust_backtrace. but no information on how to actually run the command. So i am at a loss on how to run this and get the last 11 models.

thank you sooo much!

EMAIL ferds814@gmail.com -

ERROR: thread 'main' panicked at 'not yet implemented: Cannon convert non-CEMv2 files to OBJ yet.', src\main.rs:167:5 note: Run with RUST_BACKTRACE=1 for a backtrace.

zocker-160 commented 5 years ago

du you have an example file, where this error occurs?

so it's easier to reproduce

ferds814 commented 5 years ago

example: air_balloon_09.cem Would be a great file to test it with. Ill provide the decompiled cem.zip in this attachment this is the observation balloon.

air_balloon_09.zip

total of 11 models this error happens with.

ferds814 commented 5 years ago

OKAY, i think i figured it out. basically its just saying i cannot convert these 11 files yet. and the backtrace has nothing to do with the conversion process. SO i am 11 models short.

here is the 11 models that cannot be converted as of this moment. already decompiled

3 extracted.zip

zocker-160 commented 5 years ago

thank you for the example, and I was about to tell you that the RUST_BACKTRACE is only a debugging option in order to show more details, but it won't make the conversion happen.

this type of conversion just isn't implemented yet, because there are multiple versions of the .cem file used at the same time that need to be converted in a different way

ferds814 commented 5 years ago

719 models converted perfectly. I cant complain to much. Ill either have to wait and see if these 11 models will ever be possible to convert, or just make them from scratch. but for now, i shall start my programming to get my basics setup

coderbot16 commented 5 years ago

This project has fallen off my maintenance radar, mostly because of unsolvable or hard to solve problems, such as COLLADA normal indices differing across frames as well as confusion about how the V1 and V5 formats actually work. V1 files do odd stuff and I'm not sure how to get the geometry out.

And yes, the backtrace thing is only a debugging feature. The root issue is that those 11 V1 files cannot be decoded currently.

ppoffice commented 4 years ago

@coderbot16 @zocker-160 @ferds814 I have managed to convert the v1 CEM models to v2 models, thought the conversion process is extremely hackingly. Please see the attached archive for results. cem_v1_to_v2.zip

zocker-160 commented 4 years ago

@ppoffice your results are looking very good, all the expected data (tag points, materials) is there, which is awesome!

could you provide some further information like a format documentation slimilar to our CEM v2 one, so I can implement it for my CEM converter? that would be super helpful

thank you and great job :+1:

ppoffice commented 4 years ago

@zocker-160 It wasn't that I figured out how v1 format works. The truth is I reverse engineered the "Low-Level Engine.dll" and invoked the functions in that library to let the engine load and convert the model for me. I can post the program if you need it, but the code is messy and I don't think it will be useful beyond converting those 11 files.

coderbot16 commented 4 years ago

I think these files could be quite useful to reverse engineer CEM v1 by comparing their content to what we already know about CEM v2. I'm curious if these converted models have any issues in game or if the people at SSSI just forgot to migrate them over.

zocker-160 commented 4 years ago

@ppoffice well if you are willing to share the code, I take it, imagine, that your own code is always the best one ;)

it might be useful for me figuring out how CEM v1 works, since I could use it for converting my own CEM v1 testfiles

zocker-160 commented 4 years ago

@coderbot16 actually the CEM v2 files posted by @ppoffice should work fine ingame, since I can import them into blender and I can see everything like I would expect it Screenshot_20200425_135127

EDIT: only the LOD levels are missing, seems like CEM v1 has only one or it didn't convert it

coderbot16 commented 4 years ago

I'd just like to figure out if there's some genuine reason why SSSI didn't ship CEMv2 files other than them just forgetting. Anyways, I think it would definitely be valuable to have CEMv1 documentation in a similar form to the current CEMv2 documentation.

ppoffice commented 4 years ago

@zocker-160 Here you are. It is compiled with Visual Studio 2019 Community.

https://gist.github.com/ppoffice/5c5f3dd3d88d971b9d0239d7b09fae16