kru64 Posted December 17, 2013 Share Posted December 17, 2013 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.FBXExporterGeneration of c:\myoutput\sample.babylon startedGeneration....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. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted December 18, 2013 Share Posted December 18, 2013 Hello we use XNA to import FBX and we are not able to control deeply the importation Quote Link to comment Share on other sites More sharing options...
ProfessorF Posted December 18, 2013 Share Posted December 18, 2013 Kru64, I think I can modify the exporter to stretch the textures to the closest multiple of 4 (1000x197 => 1000x196), but do you mind the stretching? Quote Link to comment Share on other sites More sharing options...
kru64 Posted December 18, 2013 Author Share Posted December 18, 2013 Yes, of course stretching. Nobody can't see the small difference. Quote Link to comment Share on other sites More sharing options...
ProfessorF Posted December 19, 2013 Share Posted December 19, 2013 Can you attach an .fbx for me to test? Quote Link to comment Share on other sites More sharing options...
kru64 Posted December 19, 2013 Author Share Posted December 19, 2013 Hi. Please probe http://www.wirecase.com/files/public/2909_phpkauszc.zipI god the same message:Invalid testure. Face 0 is sized 1078x402, bit textures using DXF compressed formats must be multiples of four. Quote Link to comment Share on other sites More sharing options...
ProfessorF Posted December 20, 2013 Share Posted December 20, 2013 Not sure why it didn't work for you. I was able to convert the .fbx without it complaining. Quote Link to comment Share on other sites More sharing options...
kru64 Posted December 21, 2013 Author Share Posted December 21, 2013 I found solution. I use Autodesk FBX 2013.3 Converterhttp://usa.autodesk.com/adsk/servlet/pc/item?siteID=123112&id=22694909I convert fbx to fbx 2013 and probably this conversion fix all mistakes, and then export from fbx to babylon is occur without problem.Nevertheless thank you for helping gwenael and GameMonetize 2 Quote Link to comment Share on other sites More sharing options...
neoRiley Posted January 24, 2014 Share Posted January 24, 2014 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? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 24, 2014 Share Posted January 24, 2014 Do you use the online converter or the command line on your computer? Quote Link to comment Share on other sites More sharing options...
neoRiley Posted January 24, 2014 Share Posted January 24, 2014 I used the online one. I'm on a Mac but run win7 in VMware. Are there any docs on setup and usage on PC?Thanks for your help,John Quote Link to comment Share on other sites More sharing options...
neoRiley Posted January 24, 2014 Share Posted January 24, 2014 I found a sample command line on the git site:https://github.com/BabylonJS/Babylon.js/tree/master/Exporters/XNA%20-%20OBJ Where in the repo is BabylonExporter.exe? I've searched and can not locate it in the repo Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 24, 2014 Share Posted January 24, 2014 You must generate. I explain on this post: http://www.html5gamedevs.com/topic/2601-where-is-babylonexporterexe/?hl=exporttobabylon#entry17034 Quote Link to comment Share on other sites More sharing options...
neoRiley Posted January 24, 2014 Share Posted January 24, 2014 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 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 25, 2014 Share Posted January 25, 2014 That's why we decided to create the online converter But for your convenience I added the compiled version here:https://github.com/BabylonJS/Babylon.js/tree/master/Exporters Quote Link to comment Share on other sites More sharing options...
neoRiley Posted January 25, 2014 Share Posted January 25, 2014 @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 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 25, 2014 Share Posted January 25, 2014 We are also working on the online converter to make it more reliable Quote Link to comment Share on other sites More sharing options...
neoRiley Posted January 25, 2014 Share Posted January 25, 2014 Excellent! That will be great for Babylon if that's a reliable way to convert Thanks again Quote Link to comment Share on other sites More sharing options...
levere Posted February 4, 2014 Share Posted February 4, 2014 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. Quote Link to comment Share on other sites More sharing options...
neoRiley Posted February 5, 2014 Share Posted February 5, 2014 Hey Levere - they included an already compiled exe in the repo (at my request - thanks guys!) - that one worked for the latest FBX we'd converted. Have you tried that one? Quote Link to comment Share on other sites More sharing options...
levere Posted February 5, 2014 Share Posted February 5, 2014 The one in here? https://github.com/BabylonJS/Babylon.js/archive/master.zip I tried it this morning, but it has the same problem. It just won't handle anything textured for me. For whatever reason, it seems to have trouble resolving the texture paths...? Do you have a simple textured FBX model that you were able to convert and can share? Quote Link to comment Share on other sites More sharing options...
neoRiley Posted February 5, 2014 Share Posted February 5, 2014 I think this one converted fine. You should use the /rl switch with the conversion as well for right handed coordinate space. Otherwise the scene is reversed. Then you'll need to rotate the entire scene -90 on X. I did this by parenting the scene to an empty mesh and rotating the mesh container. hthFishTank_John.FBX.zip Quote Link to comment Share on other sites More sharing options...
levere Posted February 5, 2014 Share Posted February 5, 2014 Thanks. That one does convert fine, but it doesn't reference any textures. Have you been able to successfully convert any with textures? Quote Link to comment Share on other sites More sharing options...
neoRiley Posted February 5, 2014 Share Posted February 5, 2014 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 fullytextures.zip Quote Link to comment Share on other sites More sharing options...
levere Posted February 6, 2014 Share Posted February 6, 2014 Thanks for the help. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.