Integrating alternate model formats - Page 5

Integrating alternate model formats

Discuss the source code and development of Spring Engine in general from a technical point of view. Patches go here too.

Moderator: Moderators

Post Reply
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Integrating alternate model formats

Post by SpliFF »

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.
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Integrating alternate model formats

Post by smoth »

very cool, now that you have finished off the dragon what are you going to do now?
Image
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Integrating alternate model formats

Post by SpliFF »

smoth wrote:very cool, now that you have finished off the dragon what are you going to do now?
Work on the mod I started 2 years ago
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: Integrating alternate model formats

Post by smoth »

lol
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: Integrating alternate model formats

Post by FLOZi »

SpliFF wrote:
smoth wrote:very cool, now that you have finished off the dragon what are you going to do now?
Work on the mod I started 2 years ago
You hate upspring that much?
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Integrating alternate model formats

Post by SpliFF »

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.
User avatar
CarRepairer
Cursed Zero-K Developer
Posts: 3359
Joined: 07 Nov 2007, 21:48

Re: Integrating alternate model formats

Post by CarRepairer »

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.
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Integrating alternate model formats

Post by SpliFF »

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.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Integrating alternate model formats

Post by abma »

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)
User avatar
koshi
Lobby Developer
Posts: 1059
Joined: 14 Aug 2007, 16:15

Re: Integrating alternate model formats

Post by koshi »

abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Integrating alternate model formats

Post by abma »

Mod ModelTest:
/cheat
/give all -> instant crash :-/

http://pastebin.com/M8tDav9P
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Integrating alternate model formats

Post by SpliFF »

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.
Last edited by SpliFF on 10 Jan 2011, 07:10, edited 1 time in total.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Integrating alternate model formats

Post by abma »

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?
screen00016.png
(270.32 KiB) Downloaded 2 times
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Integrating alternate model formats

Post by SpliFF »

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.
abma
Spring Developer
Posts: 3798
Joined: 01 Jun 2009, 00:08

Re: Integrating alternate model formats

Post by abma »

infolog.txt: http://pastebin.com/wFw8pEtT

it crashes at exit: http://pastebin.com/jCZvFUF2

(maybe merging with latest master helps there)
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Integrating alternate model formats

Post by SpliFF »

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.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: Integrating alternate model formats

Post by hoijui »

don't try with release branch. why would you?
what is broken in master?
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Integrating alternate model formats

Post by SpliFF »

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.
User avatar
SpliFF
Posts: 1224
Joined: 28 Jul 2008, 06:51

Re: Integrating alternate model formats

Post by SpliFF »

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
SeanHeron
Engines Of War Developer
Posts: 614
Joined: 09 Jun 2005, 23:39

Re: Integrating alternate model formats

Post by SeanHeron »

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.
Post Reply

Return to “Engine”