Integrating alternate model formats
Moderator: Moderators
Re: Integrating alternate model formats
Added a post in the modelling forum.
There is no animation or deformation support yet, though the importer provides that data there is a long way to go to hook it up to COB/Lua or even render it unsynced. It's really beyond my own abilities but if this code becomes part of mainline Spring perhaps somebody will take up the challenge. It's certainly a big step since neither S3O or 3DO formats support animation data at all.
The primary advantage of the Assimp importer is that it simplifies the asset creation process. You can edit you model in your choice of editor without constantly having to convert it through UpSpring. It also can let you use models you don't have an editor for since you can set hierarchy, rename pieces and make minor edits via the Lua metafile.
There is no animation or deformation support yet, though the importer provides that data there is a long way to go to hook it up to COB/Lua or even render it unsynced. It's really beyond my own abilities but if this code becomes part of mainline Spring perhaps somebody will take up the challenge. It's certainly a big step since neither S3O or 3DO formats support animation data at all.
The primary advantage of the Assimp importer is that it simplifies the asset creation process. You can edit you model in your choice of editor without constantly having to convert it through UpSpring. It also can let you use models you don't have an editor for since you can set hierarchy, rename pieces and make minor edits via the Lua metafile.
Re: Integrating alternate model formats
very cool, now that you have finished off the dragon what are you going to do now?
Re: Integrating alternate model formats
Work on the mod I started 2 years agosmoth wrote:very cool, now that you have finished off the dragon what are you going to do now?
Re: Integrating alternate model formats
You hate upspring that much?SpliFF wrote:Work on the mod I started 2 years agosmoth wrote:very cool, now that you have finished off the dragon what are you going to do now?
Re: Integrating alternate model formats
I took the assimp project on thinking it was a 2 month project and I'd save most of that time back by streamlining my asset pipeline. I was wrong, obviously but the community still benefits and I don't like not delivering on promises. It wasn't so much the difficulty of the task as the fact I had several large RL projects going on and every time I came back to this I'd have to try and pick up where I left off. If I'd had a solid month of free time it wouldn't have been such an issue.
I also side-tracked for a while trying to update UpSpring but that stalled on some Lua and file loading issues. I feel this work plus the blender plugins is a better solution anyway, particularly if I can figure out how to make blender batch convert a directory of S3Os to Collada.
I also side-tracked for a while trying to update UpSpring but that stalled on some Lua and file loading issues. I feel this work plus the blender plugins is a better solution anyway, particularly if I can figure out how to make blender batch convert a directory of S3Os to Collada.
- CarRepairer
- Cursed Zero-K Developer
- Posts: 3359
- Joined: 07 Nov 2007, 21:48
Re: Integrating alternate model formats
Spring-Assimp doesn't run. It gets to the Spring menu screen, but if I choose your built-in mod it says there's an important file missing. If I choose one of my other mods, it hangs and hang detection keeps kicking in. I gave up after 10 minutes. I'll give you more details later.
Re: Integrating alternate model formats
Thanks to CarRepairer and bobthedinosaur I've identified a potential issue unrelated to Assimp that may cause the win32 build posted above to crash.
If you've downloaded the test prior to this post AND you are getting a crash/hang (particularly if you see a reference to skirmishAiCallback_Group_isSelected in your infolog.txt) please visit http://www.warriorhut.org/spring/projects/assimp/ and download spring.exe and AI.7z (extract AI.7z to a folder called AI in the spring folder).
The reason for this is I built the test without AI support but for some unknown reason Spring will sometimes try to load the skirmish AI and crash anyway. I think it's a bug in the way Spring handles the LastSelectedScript parameter.
I suspect it's related to something in Spring Settings, or perhaps a widget. Either way this update should address that problem if you run into it.
This really needs more testers. Most of you should be on holidays right now so please make an effort to try it out. It should only require about 10 minutes of your time.
If you've downloaded the test prior to this post AND you are getting a crash/hang (particularly if you see a reference to skirmishAiCallback_Group_isSelected in your infolog.txt) please visit http://www.warriorhut.org/spring/projects/assimp/ and download spring.exe and AI.7z (extract AI.7z to a folder called AI in the spring folder).
The reason for this is I built the test without AI support but for some unknown reason Spring will sometimes try to load the skirmish AI and crash anyway. I think it's a bug in the way Spring handles the LastSelectedScript parameter.
I suspect it's related to something in Spring Settings, or perhaps a widget. Either way this update should address that problem if you run into it.
This really needs more testers. Most of you should be on holidays right now so please make an effort to try it out. It should only require about 10 minutes of your time.
Re: Integrating alternate model formats
can you please make the mod avaiable for linux users + upload it to some faster server? downloading the .7z takes an hour for me... (only ~10KB/sec)
Re: Integrating alternate model formats
http://www.springlobby.info/temp/spring-assimp.7z
or https://github.com/springlobby/spring-modeltest (temp. until spliff has forked his own off of that)
or https://github.com/springlobby/spring-modeltest (temp. until spliff has forked his own off of that)
Re: Integrating alternate model formats
Thanks abma. I wasn't actually aware of the existence of /give all until koshi pointed it out last night. The problem is one of the units is linked to a cob script with different piece names to the model and Spring crashes instead of politely declining to load the unit (this is essentially a Spring bug which I've reported via Mantis some time ago).
As koshi pointed out I'm going to host the mod on github so future updates won't require retrieving the whole assimp-spring archive.
Sorry about the download speed. It's hosted on a 100Mbit connection but located in Australia so US/European users are probably seeing speed limts due to congestion across the ocean link. On the other hand I'm only getting 20K/s myself so there may be a network issue going on. A server->server transfer within the same datacenter gives me 9.76 MB/s (6 seconds) so it isn't the server or any local issue.
As koshi pointed out I'm going to host the mod on github so future updates won't require retrieving the whole assimp-spring archive.
Sorry about the download speed. It's hosted on a 100Mbit connection but located in Australia so US/European users are probably seeing speed limts due to congestion across the ocean link. On the other hand I'm only getting 20K/s myself so there may be a network issue going on. A server->server transfer within the same datacenter gives me 9.76 MB/s (6 seconds) so it isn't the server or any local issue.
Last edited by SpliFF on 10 Jan 2011, 07:10, edited 1 time in total.
Re: Integrating alternate model formats
then next issue... units are invisible... (i have lowest settings...)
/give 3ds seems to work, i can select them:
Giving 1 3ds to team 0
but units are invisible (daetank works).
what am i doing wrong?
/give 3ds seems to work, i can select them:
Giving 1 3ds to team 0
but units are invisible (daetank works).
what am i doing wrong?
Re: Integrating alternate model formats
Could you enable the above LogSubsystems and pastebin an infolog?
I can confirm that /give 3ds works for me, you should see a small jeep.
I can confirm that /give 3ds works for me, you should see a small jeep.
Re: Integrating alternate model formats
infolog.txt: http://pastebin.com/wFw8pEtT
it crashes at exit: http://pastebin.com/jCZvFUF2
(maybe merging with latest master helps there)
it crashes at exit: http://pastebin.com/jCZvFUF2
(maybe merging with latest master helps there)
Re: Integrating alternate model formats
I'm working on a merge. Kloot did some changes to the 3D model system in master which means the merge will take a bit of time and testing. I also suspect the current git head is broken so I'm trying again with 87.1 tag.
I've started cleanup of the modeltest mod as well, hope to have that up in the next couple of days.
I've started cleanup of the modeltest mod as well, hope to have that up in the next couple of days.
Re: Integrating alternate model formats
don't try with release branch. why would you?
what is broken in master?
what is broken in master?
Re: Integrating alternate model formats
I think it was something to do with LuaUnsyncedCtrl and Collision volumes but it seems to be working again. I think kloot was in the middle of some changes and I just pulled at a bad time.
The trouble is there's some refactoring, cleanup and development going on in the model code Assimp touches so I'm thinking of waiting to see where that's going before pulling the bleeding edge.
The trouble is there's some refactoring, cleanup and development going on in the model code Assimp touches so I'm thinking of waiting to see where that's going before pulling the bleeding edge.
Re: Integrating alternate model formats
New release. This release is a merge with the latest changes to Spring. Forbodding Angel has uploaded it to FileFront and his own server for faster access from US / EU.
I've also seperated the test mod and removed a lot of unused or broken models and units. /give all will no longer crash.
I'm hoping to have this code merged to spring master in the next 2 weeks. More testing is important.
Full details
I've also seperated the test mod and removed a lot of unused or broken models and units. /give all will no longer crash.
I'm hoping to have this code merged to spring master in the next 2 weeks. More testing is important.
Full details
Re: Integrating alternate model formats
Sounding very good :). I'll give it a try over the next week - I may get back to you as to how to ensure that an .obj format model is loaded via assimp, and not via (kloots?) .obj loader (cause I'd like to try it with our game). But need to look into the info knocking about first, I reckon it'll probably be clear.