Horde3D

Next-Generation Graphics Engine
It is currently 29.11.2024, 00:48

All times are UTC + 1 hour




Post new topic Reply to topic  [ 6 posts ] 
Author Message
PostPosted: 15.10.2009, 18:25 
Offline

Joined: 15.10.2009, 18:10
Posts: 5
Greetings,

I am experiencing a problem with asset import and hoping someone might be able to provide helpful advice, if not outright solution. Namely, I am attempting to import a face model (originating from FaceGen) with a set of about 30 morph targets into Horde3D. I am able to export the model into COLLADA and convert it to Horde3D formats using ColladaConv, but when I try to load it into Horde3D, the engine inexplicably crashes, throwing an unhandled exception. More specifically, all the model assets load successfully (h3dutLoadResourcesFromDisk returns true, log contains no errors), but when I try to add the model into my existing scene (using h3dAddNodes), the errors occurs.

However - and here is where the matters become interesting - when I reduce the number of morph targets in the model to 13, I am able to import the model into Horde3D without issues, and all morph targets appear to be correctly loaded. I have tried exporting the model with various combinations of morph targets and my experimentation has led me to conclude that the error is only related to the number of morph targets - simply put, if it exceeds 13, the crash occurs, otherwise everything is fine. This has also led me to conclude that the error may be due to a bug in Horde3D rather than a problem with the model, but obviously I am not certain.

As for technical details, I am using Horde3D 1.0 beta 4 and its accompanying ColladaConv. Here is a detailed description of my art pipeline:

1. I create a face model using FaceGen and export it into 3ds, along with all morph targets.

2. I import the model into 3ds Max 2010. There I merge all meshes (the model is originally composed of several meshes - skin, tongue, teeth, eyes and hair) into one. I do the same for all morph targets - i.e. I import each one into Max and merge its separate parts into a single mesh. I give each morph target an appropriate name (e.g. viseme_aa), upon which I connect all morph targets to the base mesh using the Morpher modifier.

3. I export the model using the latest version of ColladaMax (downloaded from http://opencollada.org/download.html). It is worth noting that if I hide the original morph target meshes, the exporter crashes, and if I delete them, all morph targets are named incorrectly (I have no idea why, but for some reason ColladaMax does not name morph targets after their Morpher channels, but after the original meshes, and if they are no longer in the scene, all hell breaks loose).

4. I convert the COLLADA model using ColladaConv with -noopt switch (I recall there were problems with morphing when using geometry optimization in beta 3, not sure if that has been fixed in beta 4). The converter always throws some warnings regarding geometry having zero-length basis vectors, but they appear to be inconsequential.

5. Upon conversion I manually remove Mesh nodes corresponding to original morph target meshes from the .scene.xml (because obviously I do not want those displayed in my scene). At first I thought that was the reason why Horde3D crashed, but that does not seem to be case, as leaving these Mesh nodes does nothing to fix the problem.

Well, that is all the relevant information I can think of. I have uploaded the model to RapidShare, in case someone wants to try it out (and hopefully reproduce the issue) - http://rapidshare.com/files/293412513/j ... l.zip.html. The package contains two versions of the Horde3D model (one with 13 morph targets and another one with 14), as well as the original Max model (with the full set of morph targets). If anyone has suggestions or insights on how to fix/bypass the problem, I would be most happy to hear them, because I have thoroughly exhausted all ideas.

Sincerely,

Ratty


Top
 Profile  
Reply with quote  
PostPosted: 17.10.2009, 11:03 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
Thanks for the detailed description, we will try to reproduce the problem.

RatTyrant wrote:
4. I convert the COLLADA model using ColladaConv with -noopt switch (I recall there were problems with morphing when using geometry optimization in beta 3, not sure if that has been fixed in beta 4).

This should be fixed in Beta4.


Top
 Profile  
Reply with quote  
PostPosted: 18.10.2009, 15:06 
Offline

Joined: 15.10.2009, 18:10
Posts: 5
Here is a bit of good news - I found a workaround for the problem, one that required only minor modifications to my code. I skipped merging face model parts in step 2, instead exporting the model as a set of multiple meshes, each with its own set of morph targets. Surprisingly, the model can now be imported into Horde3D without issues, and facial animation works perfectly.

It is perhaps worth noting that each of the meshes has its own material, so when I merge all the meshes into a single one and export the model, Mesh node in .scene.xml will naturally end up containing definitions of several "child" meshes, each with its corresponding material. This difference in model composition compared to the case of just having separate meshes may be at the root of the issue.


Top
 Profile  
Reply with quote  
PostPosted: 18.10.2009, 18:14 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
I gave it a quick try but could not reproduce the crash.

What I noticed though is that I had to fix all paths manually. In the .scene.xml file for example you have geometry="jeanette.geo" while it would usually be geometry="models/jeanette/jeanette.geo" in Beta4. The same for all the materials. Is there a special reason that you have non-standard paths?


Top
 Profile  
Reply with quote  
PostPosted: 19.10.2009, 17:23 
Offline

Joined: 15.10.2009, 18:10
Posts: 5
Oh, well, thank you for trying. Since I managed to find an easy workaround and the crash does not even occur on your side, this problem of mine appears to be nothing more than an isolated nuisance. But, if I should ever discover why it happened in the first place, I will post about it here.

marciano wrote:
What I noticed though is that I had to fix all paths manually. In the .scene.xml file for example you have geometry="jeanette.geo" while it would usually be geometry="models/jeanette/jeanette.geo" in Beta4. The same for all the materials. Is there a special reason that you have non-standard paths?

Yes, since my application is a simple tech demo that loads nothing but a single character model, I prefer to keep all the model files in one directory for simplicity's sake. It has not been a problem so far, at any rate.


Top
 Profile  
Reply with quote  
PostPosted: 14.11.2009, 12:28 
Offline
Engine Developer

Joined: 10.09.2006, 15:52
Posts: 1217
We have recently fixed a critical memory issue that affected all geometry with morph targets. Chances are high that this caused the crash described here as well.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 13 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group