Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Professional Discussion / Enhanced Animations crash on EnAn_oacCreate

Author
Message
New World Order
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location:
Posted: 8th Sep 2012 11:53 Edited at: 8th Sep 2012 13:58
I recently purchased Enhanced Animations and am currently trying to implement it into my game. Unfortunately I get a freeze/crash (no useful error message, "Program stopped working") when I import a .x model and use the "EnAn_oacCreate" command on it.
At first I thought my humanoid model was maybe too complex so I made a very simple animated model and loaded it into Demo No. 1 of Enhanced Animations. Same problem.

The model was made in Blender 2.63, exported with the included "DirectX .x" exporter with the settings:



Some additional info:
+ The program works perfectly with the "AI.x" model that came with Enhanced Animations (therefore the code is working and the plugin installed correctly)
+ The problematic model ("jellytest2.x") animates fine using the internal DBPro animation system (loop object).

Here's the small test program along with the problematic model.
https://dl.dropbox.com/u/15704324/EnAnTest.zip

Would be awesome if someone could help me out of this, since Enhanced Animations looks sooo darn cool! THX!
Mage
17
Years of Service
User Offline
Joined: 3rd Feb 2007
Location: Canada
Posted: 8th Sep 2012 19:21 Edited at: 8th Sep 2012 19:23
Hi, I downloaded and tested your example.

The good news is that your code seems okay, almost. There's a small mistake. You need to make use of these two commands:
EnAn_ObjSaveNoAnims objId, "filename.dbo"
load object "filename.dbo", objId

This will strip the animations from the object so Enhanced Animations can correctly attach animations during regular operation. This is part of the media preparation step and should be done around when you are saving the animations to file.


The bad news is that your object really is the source of the problems. Either a setting in your exporter or the exporter itself is causing the crash.

I also noticed that the object you are using has no U/V data. This is strange and could be causing problems.


I loaded your object in LithUnwrap and saved it in Milkshape3D format. This caused the object to be scaled really small and all the animations were lost. In MS3D I added new animations (160 frames) and added U/V Data. Then I Exported using the JTExporter, with DirectX Skin and Bones, S/B Template, 1:1 frame timing. The resulting file played properly without crashing. I did have to use EnAn_ObjSaveNoAnims to correctly have the animation play.

New World Order
19
Years of Service
User Offline
Joined: 31st Oct 2004
Location:
Posted: 8th Sep 2012 19:31
Hey Mage! Thanks for all the effort you put into this!

Thanks for the correction about the code.
I haven't touched Milkshape or LithUnwrap for ... 7 years? But they are good old friends, thanks for the pointer in that direction! Though somehow I figured that Blender would suffice for all needs.. has anyone here exported animations from Blender that worked with Enhanced Animations?



p.s. About the missing UV data: the model I had originally used had uv data and textures, and didn't work, so I figured that wouldn't matter when I created the simple test model... But good point that these things should probably not be ignored like that..

Login to post a reply

Server time is: 2024-04-18 20:30:45
Your offset time is: 2024-04-18 20:30:45