Jump to content

FBX to Babylon export problem


kru64
 Share

Recommended Posts

Deltakosh,

Export from fbx to babylon it's lottery. Sometime all works well. But often I can see the message such

 

Using BabylonExport.Core.Exporters.FBX.FBXExporter
Generation of c:\myoutput\sample.babylon started

Generation....0 %
Invalid texture. Face 0 is sized 1000x197, but textures using DXT compressed formats must be multiples of four.

I understand that I can edit original fbx, but it need time to find this Face0, to change texture etc.

May be the more easy way to fix BabylonExporter.exe to solve this problem like You solve problem BabylonExporter Right->Left Coordinate System.

Link to comment
Share on other sites

  • 1 month later...

I'm getting a debug.txt file back that says "The driver has encountered an unexpected error".

 

I'm exporting using 3DS 2013, and FBX 2013 export.  I've compressed the resulting FBX and uploaded it, and I get that error.  I also get it with an exported collada of the same scene.

 

Are there any settings/particulars I need to know to get this to work?

Link to comment
Share on other sites

thank you for the link dad72 - much appreciated!

 

@Babylon team: I appreciate all the work that you've done here on the engine, but is there a reason why I have to create the exe on my machine?  The reason i ask is that I'm mac based, and although I *can* run windows and do all of these things, this makes the entry point to using Babylon very difficult for any other mac users (and I know plenty of them who do this type of work).  Would it be possible to create the exe and have it in the repo for people to run?  I would consider this a very helpful item since I'm guessing the project code for the exe doesn't change much.  So, my assumption is that this would be a build process that's seldom done and could be managed by the owners.

 

Thanks again,

 

John

Link to comment
Share on other sites

@Deltakosh - I tried the online version SEVERAL times with DAE and FBX and when I wasn't getting an error about windows not being able to save to a certain directory, I was getting back a text file that said there was an error on the server.  So, I was forced to try and download VS, then the other library Dad72 sent me the link for in an attempt to compile the project to create my own local exe - which never worked.

 

I'm glad you added the compiled exe in the repo, thank you for doing that.  I think it's asking a lot of Babylon users to compile their own tool, especially since a fair amount are not windows users.  The entry point for a mac user is fairly steep right now.

 

Thanks again, I appreciate your time and patience,

 

John

Link to comment
Share on other sites

  • 2 weeks later...

Any idea what's going on here? I built BabylonExport in VS 2010 and every FBX and DAE file I've tried to convert is throwing the following exception:

 

 

Building content threw InvalidCastException: Unable to cast object of type 'Microsoft.Xna.Framework.Content.Pipeline.Interop.RefDevice' to type 'System.IDisposable'.

   at Microsoft.Xna.Framework.Content.Pipeline.CommonHelperFunctions.InitD3D()
   at Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.InitD3D()
   at Microsoft.Xna.Framework.Content.Pipeline.TextureImporter.Import(String filename, ContentImporterContext context)
   at Microsoft.Xna.Framework.Content.Pipeline.ContentImporter`1.Microsoft.Xna.Framework.Content.Pipeline.IContentImporter.Import(String filename, ContentImporterContext context)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAssetDirectly(BuildItem item, String importerName)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.ImportAsset(BuildItem item)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAssetWorker(BuildItem item)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.BuildAsset(BuildItem item)
   at Microsoft.Xna.Framework.Content.Pipeline.BuildCoordinator.RunTheBuild()
   at Microsoft.Xna.Framework.Content.Pipeline.Tasks.BuildContent.RemoteProxy.RunTheBuild(BuildCoordinatorSettings settings, TimestampCache timestampCache, ITaskItem[] sourceAssets, String[]& outputContent, String[]& rebuiltContent, String[]& intermediates, Dictionary`2& dependencyTimestamps, KeyValuePair`2[]& warnings)

 

OBJs seem fine to convert, though the output, when loaded and displayed using the Babylon engine, usually has problems being displayed properly. It's hard to tell exactly what is wrong with them, but they usually appear incomplete.

 

Any possible insights into what I may be doing wrong would be appreciated.

Link to comment
Share on other sites

What I had to do was to go through the meshes array returned when the load is complete.  like so:

HandleSceneComplete : function(meshes, particleSystems)	{		//console.log("Scene load complete: " + meshes);		var parentName, mat, i;				for(i = 0; i < meshes.length; i++ )		{			parentName = meshes[i].parent != null ? meshes[i].parent.name : "no Parent";			//console.log("Mesh: " + meshes[i].name + ", mesh parent: " + parentName);						switch(meshes[i].name)			{                                case "TankFrame":				case "#TankFrame#0":					mat = new BABYLON.StandardMaterial(meshes[i].name, this.scene);					mat.diffuseTexture = new BABYLON.Texture("meshes/fishTankDemo/textures/TankFrame.png", this.scene);					mat.specularColor = new BABYLON.Color3(0, 0, 0);					meshes[i].material = mat;				break;								case "treasure_chest":				case "#treasure_chest#0":					mat = new BABYLON.StandardMaterial(meshes[i].name, this.scene);					meshes[i].material = mat;					mat.specularColor = new BABYLON.Color3(0, 0, 0);					mat.diffuseTexture = new BABYLON.Texture("meshes/fishTankDemo/textures/TreasureChest.JPG", this.scene);				break;								case "Plane001":				case "#Plane001#0":					mat = new BABYLON.StandardMaterial(meshes[i].name, this.scene);					meshes[i].material = mat;					mat.specularColor = new BABYLON.Color3(0, 0, 0);					mat.diffuseTexture = new BABYLON.Texture("meshes/fishTankDemo/textures/SandMap.png", this.scene);				break;                        }                }

Im posting the textures for that fbx if you want to test it fully

textures.zip

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...