Mord Posted June 12, 2015 Share Posted June 12, 2015 So, could this tool actually fix the texture stretching issues some of the models have? Without screwing up the game? Mord. 0 Quote Link to comment Share on other sites More sharing options...
Offshoot Posted June 13, 2015 Share Posted June 13, 2015 (edited) So, could this tool actually fix the texture stretching issues some of the models have? Without screwing up the game? Theoretically yes, although the script itself wouldn't do this. To fix the stretching you would need to use this script to unpack the model files and then edit the UVs in another 3D modelling package. I say theoretically because until someone tries it we can't be sure, though my guess would be that changing just the UVs shouldn't have any effect on the model that could cause problems running the game. What might cause problems is changing a model by, for example, adding or deleting vertices, depending on whether these are associated with things such as animation or simulation that rely on pre-assigned vertex identities. Edited June 13, 2015 by Offshoot 0 Quote Link to comment Share on other sites More sharing options...
Mord Posted June 13, 2015 Share Posted June 13, 2015 And I thought it would be hard...LOL. THAT was way above my pay grade. Mord. 0 Quote Link to comment Share on other sites More sharing options...
Offshoot Posted June 13, 2015 Share Posted June 13, 2015 Try to click on "Raw" and save the file as a text file named unmdr.py. Oh boy, oh boy, oh boy! Thanks sbobovyc, for the script and your help. Time to tinker. Out of interest, have you looked at the mds files as well (in CM:RT they are included in a folder labelled "Skeletons")? It looks like they include the model files for infantry heads, hands and 'bodies' and I guess, from the name, also rigging info. 0 Quote Link to comment Share on other sites More sharing options...
Offshoot Posted June 13, 2015 Share Posted June 13, 2015 And I thought it would be hard...LOL. THAT was way above my pay grade. Damn, and I thought that was the straightforward version. A simple answer to your original question is yes, this tool could enable people to fix the stretching problems likely without causing problems in game. 1 Quote Link to comment Share on other sites More sharing options...
sbobovyc Posted June 20, 2015 Author Share Posted June 20, 2015 Oh boy, oh boy, oh boy! Thanks sbobovyc, for the script and your help. Time to tinker. Out of interest, have you looked at the mds files as well (in CM:RT they are included in a folder labelled "Skeletons")? It looks like they include the model files for infantry heads, hands and 'bodies' and I guess, from the name, also rigging info. Offshoot, glad you were able to put my tools to good use. 0 Quote Link to comment Share on other sites More sharing options...
Cpl Steiner Posted June 20, 2015 Share Posted June 20, 2015 (edited) If it is possible to take an existing CM human figure model and mod it to look like some other type of unit, that might be very cool for some scenarios. I am thinking of things like Security Contractors, downed Air Crew, maybe even News Teams etc. [EDIT] Oh and don't forget parked car doodads! The potential for unique scenarios is endless. Edited June 20, 2015 by Cpl Steiner 0 Quote Link to comment Share on other sites More sharing options...
Jargotn Posted June 21, 2015 Share Posted June 21, 2015 This made me think about a discussion we had before release about fighting after nuclear/chemical/biological impact. Now we could just add gasmasks and suites, pull down all the stats in the editor and have a realistic WW3 experience. Imagine the possibilities! 0 Quote Link to comment Share on other sites More sharing options...
Kieme(ITA) Posted June 22, 2015 Share Posted June 22, 2015 (edited) Maybe you can add gas masks and suites, but you have to consider all the limitations, the main one concerns animations. Even if you manage to change a 3d model, then it must be tweaked in its animations. Imagine making a gas mask on the face of a soldier, and then see it changing position whenever the soldier performs a given animation. Or imagine changing the volume of the soldier by giving him a NBC suit, and then see that his gun passes halh through said suit. In conclusion, 3d modelling can be used for modding, but there are many other elements to consider and the border with game developing is so close that to make a mod work well you might need to take a few months to make it, not to mention the final inability to change/correct animations, objects positioning etc. Even the flavor objects I added, thinking it was an easy peasy job, showed me how complex the real thing can be. Not only it would be needed to program the game to recognize these new flavor objects as LOS/movement blockers for their dymensions, you would also need to correct shadows and shaders bugs within them... Edited June 22, 2015 by Kieme(ITA) 0 Quote Link to comment Share on other sites More sharing options...
Offshoot Posted June 22, 2015 Share Posted June 22, 2015 Offshoot, glad you were able to put my tools to good use. I've been experimenting to see what is possible regarding the models. All of the extracted obj's I have looked at have a lot of disconnected edges but if I reconnect these by merging vertices and repack them the models are messed up in-game. I'm guessing at this point that mdr_mutator expects that the vertex/face index is identical to that in the original mdr file, i.e., it can't overwrite the original index with a new, different one. Is that the case? 0 Quote Link to comment Share on other sites More sharing options...
sbobovyc Posted July 3, 2015 Author Share Posted July 3, 2015 Offshoot, you are correct. mdr_mutator is a temporary hack for testing. The proper thing to do is to write an exporter for Blender or 3ds max. 0 Quote Link to comment Share on other sites More sharing options...
Offshoot Posted July 3, 2015 Share Posted July 3, 2015 Thanks for your reply sbobovyc. I'm still glad to have it as it will enable UVs to be fixed and having the models means you can sculpt high-res details for normal map generation. I was just trying to find what I could and couldn't do. Would be great to have it for vehicles but I understand how these things go, especially as I'm not sure how many people in the Combat Mission modding scene would be set up to take advantage of it. 0 Quote Link to comment Share on other sites More sharing options...
sbobovyc Posted September 29, 2016 Author Share Posted September 29, 2016 (edited) Today I got bored and decided to wrench on some of my old code and this was the result: https://drive.google.com/open?id=0B982H8gQa3LZVzhaMWhtbTE5RGs Edited September 29, 2016 by sbobovyc 0 Quote Link to comment Share on other sites More sharing options...
The Steppenwulf Posted September 29, 2016 Share Posted September 29, 2016 On 20/06/2015 at 10:30 AM, Cpl Steiner said: Oh and don't forget parked car doodads! The potential for unique scenarios is endless. +1 for this. if we could get more car variations - essential for more realistic urban areas. Shipping containers is another - low polygon count as models and add immersion to industrial areas. is this possible please? 0 Quote Link to comment Share on other sites More sharing options...
sbobovyc Posted September 30, 2016 Author Share Posted September 30, 2016 At the moment I am focusing on dumping the vertex information. The model format includes a lot of metadata in addition to geometry. We shall see. 0 Quote Link to comment Share on other sites More sharing options...
sbobovyc Posted September 30, 2016 Author Share Posted September 30, 2016 http://ironcurtain.no-ip.org:8080/btr70_cm.png 0 Quote Link to comment Share on other sites More sharing options...
The Steppenwulf Posted September 30, 2016 Share Posted September 30, 2016 (edited) I think you'll find that out of all the games 3d objects, flavours will contain the least metadata, which is almost certainly limited to placement and rotation within the game environment. There are no animations or destruction capabilities nor do they interfere with other objects. They are therefore a good place to start for getting a modded object back into the environment. I do have blender so once we have export capability, I will throw myself into creating models that I'd like to see. Edited September 30, 2016 by The Steppenwulf 0 Quote Link to comment Share on other sites More sharing options...
sbobovyc Posted October 1, 2016 Author Share Posted October 1, 2016 crate1.mdr and crate2.mdr are good candidates to play around with. 0 Quote Link to comment Share on other sites More sharing options...
Scipio Posted October 5, 2016 Share Posted October 5, 2016 What do I read? You managed to get into MDR files! Jabadabadoooo! I have to take a look on this when I'm back from holiday. 0 Quote Link to comment Share on other sites More sharing options...
Scipio Posted October 18, 2016 Share Posted October 18, 2016 I startet the unmdr tool, it seems to unpack/decompile or whatever the files, but there is an error message at the end : TypeError: 'float' object cannot be interpreted as an integer Not sure at the moment if this is critical 0 Quote Link to comment Share on other sites More sharing options...
sbobovyc Posted October 21, 2016 Author Share Posted October 21, 2016 What file were you working with? Can you paste the exact command you where executing. 0 Quote Link to comment Share on other sites More sharing options...
Scipio Posted October 23, 2016 Share Posted October 23, 2016 (edited) Quote G:\CM-Studio\Mod Tools\MDR>unmdr.py 2inchmortar.mdr # 2inchmortar.mdr # number of models 2 # Start model 0x5 ############################################################## # submodel name length 6 # submodel name b'mortar' # Read unknown byte (always 2?): 2 # Start unknown section 0xe Traceback (most recent call last): File "G:\CM-Studio\Mod Tools\MDR\unmdr.py", line 430, in <module> manifest = dump_model(base_name, num_models, f, i, args.outdir, not args.parse_only, args.verbose) File "G:\CM-Studio\Mod Tools\MDR\unmdr.py", line 169, in dump_model for i in range(0, 0xB0/4): TypeError: 'float' object cannot be interpreted as an integer The mdr ist the 2inchmortar from CMBN. All unpacked files have 0 byte. I'm using Python 3.5.2, I guess that's the problem? Edited October 23, 2016 by Scipio 0 Quote Link to comment Share on other sites More sharing options...
sbobovyc Posted October 24, 2016 Author Share Posted October 24, 2016 (edited) I have not ported unmdr to python 3 yet. Try 2.7 Good on you for using python 3. Edited October 24, 2016 by sbobovyc 0 Quote Link to comment Share on other sites More sharing options...
sbobovyc Posted October 25, 2016 Author Share Posted October 25, 2016 Download the latest version of unmdr to be able to dump that mortar model. 0 Quote Link to comment Share on other sites More sharing options...
sbobovyc Posted October 29, 2016 Author Share Posted October 29, 2016 I just pushed an update to unmdr which makes it compatible with Python 3 and from now on I will be developing it as a Python 3 codebase. This will ensure a smooth transition into a Blender plugin. 0 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.