Model fixer utility
BeigeAlert
Texas Join Date: 2013-08-08 Member: 186657Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, NS2 Map Tester, Reinforced - Diamond, Reinforced - Shadow, Subnautica Playtester, Pistachionauts
Hey everybody!
I'm working on a utility that fixes Collada (.DAE) model files so they can be used in Spark, particularly ones exported from Blender.
Straight from Blender, there are a couple of problems:
1) very small values that *should* be zero are sometimes written with negative exponents (ie 0.0000002 would be 2e-7) The problem is, builder doesn't seem to like it when numbers have that 'e' in there, so your model basically explodes in a cyclone of random triangles pointing out every which way.
2) Blender has no way of exporting the physics objects required for proper collision mesh generation in Spark. In fact, the ONLY way to get this to work right now is to use a copy of 3DSmax 2009 with the UWE export tools. In the DAE file itself, if I'm not mistaken, this is just some extra data added into a couple of additional nodes in the file, and I believe with some investigation, I can figure out how to replicate this with a simple utility.
I have only tried this with non-animated objects. I have no idea how this will work with animated collada files.
Anyways, I'm still working on #2, but in the mean time, I've created a little Java utility that takes your DAE file, and changes all the really small negative exponents into 0.0 so it will work with builder.
Just run the JAR, and it'll ask you to open your DAE, then it'll ask you where you want to save it. I wouldn't recommend overwriting the original file, just in case.
I'm working on a utility that fixes Collada (.DAE) model files so they can be used in Spark, particularly ones exported from Blender.
Straight from Blender, there are a couple of problems:
1) very small values that *should* be zero are sometimes written with negative exponents (ie 0.0000002 would be 2e-7) The problem is, builder doesn't seem to like it when numbers have that 'e' in there, so your model basically explodes in a cyclone of random triangles pointing out every which way.
2) Blender has no way of exporting the physics objects required for proper collision mesh generation in Spark. In fact, the ONLY way to get this to work right now is to use a copy of 3DSmax 2009 with the UWE export tools. In the DAE file itself, if I'm not mistaken, this is just some extra data added into a couple of additional nodes in the file, and I believe with some investigation, I can figure out how to replicate this with a simple utility.
I have only tried this with non-animated objects. I have no idea how this will work with animated collada files.
Anyways, I'm still working on #2, but in the mean time, I've created a little Java utility that takes your DAE file, and changes all the really small negative exponents into 0.0 so it will work with builder.
Just run the JAR, and it'll ask you to open your DAE, then it'll ask you where you want to save it. I wouldn't recommend overwriting the original file, just in case.
Comments
I'd love some insight from the devs on this.
Try shooting brian@unknownworlds.com (Chops) and email. He's the guy that typically handles getting art assets in-game.
I think I'll do that! Thanks.
While I cant offer any help with developing this, I can certainly say I'll be happy to test it.
Good luck with this project.
Sorry to disappoint you guys. I've gotten NO love from the devs about this (no replies, nada, bar one that wasn't helpful...), and I can't do anything else without knowing why in the hell Builder seems to think we like convex geo automatically made for us. Looks like it's time to er... *find* a copy of the software needed to do this *properly*.
(I was going to leave it here... but I'm pretty steamed up now, and that EDIT button was too tempting)
I'd still be willing to make this tool, but we need more voices bugging the devs. Personally, I'm real curious as to how they keep making new content for NS2 (ie new Eclipse models). Does EVERYBODY just happen to have a cracked copy of 3dsmax 09 or does nobody upgrade anymore???????
I'm so sick of this BS from every game company out there. I had this way back in the Warcraft III days, where the only way to get custom content into the game was to find a grossly outdated copy of 3dsmax and some cobbled together exporters and cross your fingers that it's a good day and it'll decide to work.
Or hell... you could I don't know... throw a bone to someone who is trying to spend their FREE TIME creating tools for YOUR GAME.
I know they're busy, but dammit this wouldn't take more than an half hour or an hour.
/rant. Again, sorry guys. At least we've got something that'll work for visual models.
It's going to be some time, but I'll see what I can do with this. Not sure exactly how, but I'm willing to contribute.
@BeigeAlert Do you have what you've done on GitHub or similar repo site?
@McGlaspie I don't, but I could definitely send you the workspace if you want. It's Java, btw.
It's a pretty simple program. Since DAE is really just an XML document, all I had to do was figure out the structure and how to work with that in Java.
@SamusDroid Well they're somehow making new art assets for eclipse remake... so I figure they've either got a new plugin they're not sharing, or they've got an ancient copy of 09 on one of their computers.
All I'm asking for is some Q&A with the devs so I can make this silly tool. I haven't been able to get a hold of any of them and it's really frustrating.
@Evil_Ice I don't understand, what's not supported?
wat?
Well I actually got modelcompile.exe to crash on me... so at least I know it's TRYING to work... don't know why it's crashing, and I'm giving up on this for now.
Consistency...duh...
The model client side
@BeigeAlert were you able to make any additional progress on this?
As far as getting collision geometry to work properly... no never did. I'm still scratching my head and wondering why it wouldn't work.