Author Topic: Porting to the latest SDK; big trouble.  (Read 6390 times)

Offline Karpov

  • Moderator
  • Come Together
Porting to the latest SDK; big trouble.
« on: February 22, 2013, 02:37:57 am »
 Hi. I'm afraid this is kind of bad news.
 The new SDK seems to be uncompatible with the files I had been working with, even when they worked perfectly in the older version. I tried everything I could think of. I tried to convert the animations with different options, but nothing happened. Then I "solved" this by using a different exporter plugin.
 But now I find that this exporter plugin is not supporting mesh animations as the other one did, only bones. That means that all of the effects, like the muzzleflashes, and specially death animations wont work at all, and I would have to rework the whole system for them, using lots of bones instead.
 I wondered ,why did the engine change that much? why the same files are not loading at all in this version?
I got my answer after reading a lot of pages of the SDK revision history. The problem seems to be a library called Assimp, which is used by the engine to load many different file formats. It's always been there, but in the SDK that I was working with, this library wasn't being used to load the x. format. Instead it was using a built-in support for those files, probably from DirectX SDK, which worked perfectly.

Here's an old entry:
Quote
[116,cvet] 2010-12-30 T23:48:07.050641Z
Подключена библиотека для импорта различных трехмерных моделей - Assimp http://assimp.sourceforge.net/ Поддерживаемые форматы http://assimp.sourceforge.net/main_features_formats.html Для X формата еще используется встроенный, для остальных данная библиотека.
I'm sure someone can translate this better than me, but I'm pretty sure it says that "the Assimp library was implemented, but the X. files are still being loaded with the native plattform".
 I confirmed this by deleting the Assimp32.dll from both SDK. The old one still worked, while the new one showed the flame boy sprite instead of the 3d model.

After many revisions I found another entry:
Quote
[287,cvet] 2011-10-23 11:50:49
Загрузка трехмерных моделей и анимаций полностью перенесена на Assimp, т.е. X формат в частности.

This one says that "now all of the 3d files are loaded within the Assimp library, x format included". So that's basically what screwed everything up.
 I confirmed this by downloading the Assimp viewer (all versions) and loading my models. They load with the exact same error they have in the game.

In conclusion, the native support for the DirectX format is definitely better than Assimp.
 I believe this was done when they added OpenGL, because the DirectX native support, for obvious reasons, was not available in Linux.

This is very disappointing and I really don't know what to do. I need a hero.

Possible solutions:
-The best one is to find a new plugin that can export everything perfectly to work with Assimp. Or a different 3d Software.
-Find a way to make the engine load the models with the built-in support on DirectX, and with a different one (not Assimp) on OpenGL
-Ask the guys from Assimp to support the files I export, or at least tell me why they are not working.
-Use the old SDK and live happily ever after...(?)

I'll keep on trying the first one, but my head isn't working very good right now... I hope I see the light and find a way to fix this.

Thanks for reading.

Offline Luther Blissett

  • Moderator
Re: Porting to the latest SDK; big trouble.
« Reply #1 on: February 22, 2013, 03:21:29 am »
This would explain the issue we were having back here :
Need help getting Karpov era 3D models to work with newer SDK revisions
.

We ended up with "import it and re-export it and it works, but we have no idea why".

I never tested any of the muzzle flash effects, and I don't think the death animations were in then, but I definitely had the walk/run/hit etc working in the new SDK. I think it was mostly a case of importing and re-exporting from Fragmotion (and whatever arbitrary settings I'd messed with until they worked). Can test this with death anims/muzzle flashes etc, though I have a feeling it's not going to be any different than the altered export settings you're testing at the moment. No harm in trying though.

Offline Karpov

  • Moderator
  • Come Together
Re: Porting to the latest SDK; big trouble.
« Reply #2 on: February 22, 2013, 03:36:02 am »
I used Fragmotion but the bone for attaching weapons were not working. But I never tried it for the mesh animations. I'll let you know what happens.

Edit: Yes! I guess Fragmotion saved my ass this time. They work, not the same way but they work, so I'll guess I'll just have to use a different set of tools for each purpose. Thanks Luther
« Last Edit: February 22, 2013, 03:47:57 am by Karpov »

Offline Luther Blissett

  • Moderator
Re: Porting to the latest SDK; big trouble.
« Reply #3 on: February 22, 2013, 10:21:00 am »
The weapon attachment had a different oddity - I had to rename the L_handle or something (the capitalisation) in the fo3d. Think I noted it down in the other thread.

Anyway, in theory those export settings must be possible from what you're using (Max I think?) - though which specific plugin/exporter/settings that would be I do not know :(

Offline Karpov

  • Moderator
  • Come Together
Re: Porting to the latest SDK; big trouble.
« Reply #4 on: February 22, 2013, 07:50:57 pm »
The format of the file seems to be different with the exporter I've been using. I compared them saving both as text instead of binary. So changing the options from the export window won't change a thing. I wonder if it is an older .x format.
 For the plugins I have two options on Max; Panda DirectX exporter or kwxport. I remember I chose the first one because it stored the animation info in with the .MAX scene (not sure how though), and kwxport stored them globally, so when try to export a different file, I have to remove all animations from the export options, and set the new ones again. Also it has a few more options so I figured it was better somehow. I can use kwxport to export the skeleton, but it can't handle animated mesh, or at least it seems that way.
  The problem I had with weapon attachment was that they were misplaced, and also the Handle was not attached to the hand. I'll try in Fragmotion. Otherwise I'll re-export the files, I just have to take note of the animation sets stored in Panda exporter, and retype them in kwxport.

Offline cvet

  • FOnline Main Developer
    • FOnline
Re: Porting to the latest SDK; big trouble.
« Reply #5 on: March 26, 2013, 06:47:43 pm »
Try to use this modified by me kwxport plugin:
http://speedy.sh/8erVJ/kwxport.dle

Offline Karpov

  • Moderator
  • Come Together
Re: Porting to the latest SDK; big trouble.
« Reply #6 on: April 29, 2013, 01:10:23 am »
Try to use this modified by me kwxport plugin:
http://speedy.sh/8erVJ/kwxport.dle

I'll try it. Thanks a lot.

Also I had some trouble using the effects from the FO3d files. Somehow the "Effdef" was not working for me, and I couldn't make it work in any way, the character was not visible. I was trying to read the changelog on yesterday's revision of the SDK and I think it mentions something about it, I'll try with that one.

PS: I've been quite busy lately. Hopefully I'll find some time to catch up with this. Bye

Offline vedaras

  • King of the wasteland
Re: Porting to the latest SDK; big trouble.
« Reply #7 on: April 29, 2013, 11:03:52 pm »
we will never lose faith in your work Karpov :) Take all the time you need, you are doing great effort m8.

Offline Luther Blissett

  • Moderator
Re: Porting to the latest SDK; big trouble.
« Reply #8 on: April 30, 2013, 11:04:40 pm »
Agreed. Let me know if there's anything you want help with.

Offline Karpov

  • Moderator
  • Come Together
Re: Porting to the latest SDK; big trouble.
« Reply #9 on: May 02, 2013, 07:04:53 pm »
Thanks a lot guys. I'm just trying to adapt to the changes on the SDK, some files are not compatible. It's not easy, but it is a good way for me to organize the whole thing and clean everything up. I've been working with 3 different versions of the SDK at the same time, so it would be nice to have them merged into a single workspace. It's like starting from scratch but this time I just have to "connect the dots" :)

  Thanks again for the support, I'll let you know about the progress.