I've been working on a new project for use with Source models. This is a model editor that will allow you to change a models attributes such as scale, name, version, physics, etc. Some of this can already be done with 'hexing' but this should make the process easier for those with no hexing knowledge. It's web based and all you need to do is upload and then change what you want and download. No decompiling of the model is required so no need to recompile and fix the QC.
I've only just started this and will use this thread to post updates for those interested. I don't know how far I will go with this and what it will utlimately be capable of. Some things just can't be changed and some models may only have limited changeable options due to there complexity (NPCs for example with flexes) but I'll discover this as I go along. It currently only works on static props although I hope to expand it to models with more complex bone structures. Below is a example of a prop that has been scaled 400% (red outline is orginal size).
[img]http://i52.tinypic.com/dzf5ee.jpg[/img]
Things I hope to do will be:
Mesh manipulation (scale, move and rotate)
Change animation options (not sure if I'm going to bother with animations yet as they're a whole new ball game)
Change physics properties
...and some other things I haven't though of yet.
I may also add the option to decompile to SMD and reconstruct the QC although this will also be limited to certain models and it may be best to just use the existing one by Cannonfodder.
This looks useful if theres any problems on the models like the size.
Nice job :D
I'd really like to be able to scale the model and the physics mesh.
Got offset, rotation and scaling working for both mesh and collision mesh. Was a nightmare for the collision mesh as it's scaled strangely and at a odd orientation. Only limited to static models at the moment but will work on models with more than one bone. Not sure it will be practical for models with animations or flexes as it would break them unless they are also changed which could prove difficult.
[img]http://i54.tinypic.com/11h9dah.jpg[/img]
How are you editing them without recompiling, have you got a spec for the MDL format?
this idea of MDL decompiler sounds great
this would be a great tool to have for simple changes.
[QUOTE=Silver Spirit;30042726]How are you editing them without recompiling, have you got a spec for the MDL format?[/QUOTE]
The file binary is being directly changed using PHP. It basically does the same thing a Hex editor does but on a larger scale.
I don't have a spec for the format but instead have figured it out through trial and error. I have thought of just giving up at times as there's no information on the format making it more difficult and because of this I don't know how far I will go. The source files for studiomdl have helped with somethings though.
I've also written a simple decompiler that I'll include with this although it's no where complete. So far it can create a QC and SMD file for the reference model. It can't do LoD, animations or flexes yet and I don't know if it will as they open a whole new can of worms.
[QUOTE=Rozzy85;30070306]The file binary is being directly changed using PHP. It basically does the same thing a Hex editor does but on a larger scale.
I don't have a spec for the format but instead have figured it out through trial and error. I have thought of just giving up at times as there's no information on the format making it more difficult and because of this I don't know how far I will go. The source files for studiomdl have helped with somethings though.
I've also written a simple decompiler that I'll include with this although it's no where complete. So far it can create a QC and SMD file for the reference model. It can't do LoD, animations or flexes yet and I don't know if it will as they open a whole new can of worms.[/QUOTE] When will you be done with this?
[QUOTE=Rozzy85;30070306]The file binary is being directly changed using PHP. It basically does the same thing a Hex editor does but on a larger scale.
I don't have a spec for the format but instead have figured it out through trial and error. I have thought of just giving up at times as there's no information on the format making it more difficult and because of this I don't know how far I will go.[/QUOTE]
Ah ok :)
[QUOTE=Rozzy85;30070306]The source files for studiomdl have helped with somethings though.[/QUOTE]
They sound useful, where are the studiomdl source files?
I have an question: does this tool allow hexing models just by typing different model name?
[QUOTE]When will you be done with this?[/QUOTE]
At this stage I don't know but hopefully not too long. I'm planning to open a beta version for people to use and to report bugs once I get it to a state where it can safely be used. However, if it gets too many hits I may have to instead release the documents so people can host it themselves. The editing/decompile scripts can be heavy on CPU time.
[QUOTE]They sound useful, where are the studiomdl source files?[/QUOTE]
They're in the sourcesdk.gcf archive. I open it and search for 'studiomdl'. There are some source files reference on the wiki which would be useful but I haven't been able to find. They're probably in there somewhere.
[QUOTE]I have an question: does this tool allow hexing models just by typing different model name?[/QUOTE]
If that's what hexing is known as then yes. It'll change the internal model name and rename all associate files.
[QUOTE=Rozzy85;30070306]
I don't have a spec for the format but instead have figured it out through trial and error.[/QUOTE]
It's all documented in sourcesdk.gcf/src_mod/orangebox/public/studio.h
[QUOTE=tschumann;30087335]It's all documented in sourcesdk.gcf/src_mod/orangebox/public/studio.h[/QUOTE]
Very interesting, thankyou ^^
[QUOTE=Silver Spirit;30087609]Very interesting, thankyou[/QUOTE]
No problem. Not all of the other .mdl related file formats are in there though (.phy, .vvd, .vtx etc).
A little preview of the web page interface.
[img]http://i56.tinypic.com/18f282.png[/img]
Not really sure when I will be done with this as it seems models with dynamic bones are processed differently and as such need to be done in a different way. I hoping to be able to allow per bone transform so each bone can be individually adjusted and would in turn change the vertices weighted to it. Would hopefully allow things like enlarged and stenched limbs/head, pretty much what Garry's mod allows you to do. Whether I can make it work or not is another thing. :) Only really got the weekends to work on it so progress may be slow.
I've been waiting ages for something like this, great job having a go at it!
I'd use the scale most of all, but if I had to suggest something, it would be the animation speed- there's nothing more irritating than spending hours on one animation only to find that it's slower than you expected. of course, that's probably not possible within the constraints of the mdl but it would be a great feature.
If your making the animation you can just change the speed in the qc. file.
If you mean the FPS variable then that can be changed also. I'll probably add it later on though when I get on to animations.
[QUOTE=highvoltage;30137113]If your making the animation you can just change the speed in the qc. file.[/QUOTE]
well, a realtime adjustment with immediate results showing the animation at the right speed would be nice anyway :3:
It lives...
[img]http://i52.tinypic.com/2zeh2si.jpg[/img]
[QUOTE=Rozzy85;30247368]It lives...
[img]http://i52.tinypic.com/2zeh2si.jpg[/img][/QUOTE]
It can actually edit the offset of a bone?
Yeah, pretty much.
It gets worse.
[img]http://i53.tinypic.com/14cfcip.jpg[/img]
Excellent, this tool seems like it's going to prove useful when it's done.
Major bump.
I've decided to release the model decompile side of the project. I've put the editor on hold as I've run into a wall with it and haven't had or felt like spending hours fingering it all out. So instead I've concentrated on the decompiler. I've had the code written for almost a year so it just needed a bit of tidying up to make it safe to use. It's no way as competent as the other decompiler around but is good enough for those who want to decompile simple models like props and TF2 weapon/hat models. Its still a WIP and I'm mainly doing to this so people can test it out.
It will currently decompile a models reference mesh and a partial QC. Things like bodygroups, LoD and animations are left out as I haven't got to them yet. Don't use this if you want everything. The only problem with the mesh that's decompiled is that it's weighting can be off on some models. Since most only have one bone this isn't much of an issue and people usually don't need it but it's something I'll address next time.
Uploaded filesize is tight (400 KB) as I have a few other things eating away at the bandwidth and I only have 5000 MB a month usage allowance. It's enough for most things when they're compressed. I may up it depending on usage over time.
[url]http://www.hamaloo.co.uk/mdlunpack/[/url]
Time is my main limitation and I don't know how much I'll spend on improving it but I wanted to get something out so it could be used.
I'd appreciate if people could report any major errors they find as I can only test so much myself.
Sorry, you need to Log In to post a reply to this thread.