Dad72 Posted November 11, 2013 Share Posted November 11, 2013 It would be possible to have the sources of the converter for use in local?I would like to be able to generate the files .Babylon and stored in a specific folder automatically.It is for an editor, I would like that the user imports a file .fbx and it is automatically converted to the destination folder. Thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 11, 2013 Share Posted November 11, 2013 The code is available on github:https://github.com/BabylonJS/Babylon.js/tree/master/Exporters/FBX%20-%20OBJ Feel free to use it Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 11, 2013 Author Share Posted November 11, 2013 I am not on to understand everything.The code for this link is available or? http://api.babylonjs.com/converter I am talking about the sources of the online converter. I am not on to be able to do from scratch. Thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 11, 2013 Share Posted November 11, 2013 This is the link I provided. It can run as command line and as a service. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 11, 2013 Author Share Posted November 11, 2013 I am a little lost. You have a tutorial, or explanations of how it all works please. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 11, 2013 Share Posted November 11, 2013 This is a C# project. You have to load the .csproj into Visual Studio 2013. Quote Link to comment Share on other sites More sharing options...
Temechon Posted November 11, 2013 Share Posted November 11, 2013 Hi dad72, Do you want to: 1) create a local web app similar to the online creator, or 2 ) are you just looking for a way to automatically convert your .fbx files to .babylon without the need to create a web app ? For 1) : Deltakosh suggests to open the visual studio project you can retrieve from github.For 2) : You can download the zip file BabylonExport.zip here : https://github.com/BabylonJS/Babylon.js/tree/master/Exporters/FBX%20-%20OBJExtract the zip file somewhere on your computer, you will find a file named BabylonExport.exe. This executable takes two arguments : the .fbx you want to convert and the folder where the .babylon will be produced.For example, open a Windows console (start -> run -> cmd), and try the following command : cd <babylon_path>BabylonExporter.exe /i:"<path_to_fbx>\myScene.fbx" /o:"<output_path>Your fbx will be converted to babylon format (if everything is correct on your scene )You can do this automatically by creating a .bat (on windows) and call this previous command line with the right parameters. If you want me to be more precise, I can create a full tutorial on this part. Just ask me ! Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 11, 2013 Author Share Posted November 11, 2013 Hi Temechon. Thanks for help.I am seeking a way to create an HTML page or i want to import a file .fbx and when I submit the form, it converted the file in .Babylon. As the online converter.Your command line is for Windows, me I would like to do this via a web interface.I want to well a tutorial if you please.Thanks ------------------------Salut Temechon Merci pour l'aide.Je cherche un moyen de créer une page html ou je veux importé un fichier .fbx et quand je soumets le formulaire, cela convertie le fichier en .babylon. Comme le convertisseur en ligne.Votre ligne de commande est pour Windows, moi je souhaite le faire par une interface web.Je veux bien un tutoriel s'il vous plaît.Merci Quote Link to comment Share on other sites More sharing options...
Temechon Posted November 11, 2013 Share Posted November 11, 2013 Well, for that you have to use the visual studio project in github. I hope your web application is in C#, otherwise you will have to do all from scratch, and it's a big project Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 11, 2013 Author Share Posted November 11, 2013 No my application is in JS/PHP/SQL/AJAX/JQUERY But the online converter is done in HTML how do i do the same.http://www.babylonjs.com/converter.html Quote Link to comment Share on other sites More sharing options...
Temechon Posted November 11, 2013 Share Posted November 11, 2013 I think the front end is html, but the back end is C#... Deltakosh can confirm that. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 11, 2013 Author Share Posted November 11, 2013 It is what is on the back that interests me. How it works when we validated the form. That is what i request from the beginning. Quote Link to comment Share on other sites More sharing options...
Temechon Posted November 12, 2013 Share Posted November 12, 2013 Indeed, the web application sources are not in the Github project... But basically, you will just have only one class that unzip the uploaded file in a temporary folder, call the BabylonExporter.exe located on your server, and zip the output babylon file. Maybe Deltakosh can provide you with the source. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 12, 2013 Author Share Posted November 12, 2013 Thank You Temechon.Yes, it would be well indeed. That is what I was wondering at the opening of the subject.@Deltakosh: it is possible to offer me the sources of Web application ( online converter) please? As confirmed by Temechon, this source of Web applications is not available. It is that which I asked you at the beginning of this topic. I may be poorly explained. Thank you in advance Quote Link to comment Share on other sites More sharing options...
pierlag Posted November 12, 2013 Share Posted November 12, 2013 hi, The website is only a static html page connected to API<form name="form1" method="post" action="converter" enctype="multipart/form-data"><input name="myFile" type="file" /> <input type="submit" value="Upload" /></form>The MVC API Controler in C# used a pipe to connect to console running App on server session openpublic class ServiceProxy : ClientBase<IService> { public ServiceProxy() : base(new ServiceEndpoint(ContractDescription.GetContract(typeof(IService)), new NetNamedPipeBinding(), new EndpointAddress("net.pipe: / / localhost/exportservice"))) { } public bool InvokeConvert(string file, string outputName) { return Channel.Convert(file, outputName); } } Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 13, 2013 Author Share Posted November 13, 2013 Hi and thank You pierlag.I think I will do otherwise. I will use a .bat file like this:set curdir = %CD%BabylonExport.exe /i:"Assets\A_convertir\epee.fbx" /o:"Assets\Convertis"By against another question. When we converted a fbx file in .Babylon, the images are rename in 1.png, 2.png, 3.png ...Why the names of the images does not remain appointed as they are? Thanks Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 13, 2013 Share Posted November 13, 2013 The names are those provided by the fbx Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 13, 2013 Author Share Posted November 13, 2013 No, when I converted my file .fbx, all the textures have been copied to the destination folder and renamed. sw_dusk&down.dds -> après la conversion 1.jpgwp_blade01.dds -> after conversion 2.jpgwp_hilt04.dds -> after conversion 3.jpg May be that the character _ and & renames the images (just an idea) Quote Link to comment Share on other sites More sharing options...
reddozen Posted November 13, 2013 Share Posted November 13, 2013 You can use PHP to execute whatever program you want on your server. Just upload the files to whatever directory you want, then call a shell / comand line function from PHP to convert the files. French: http://us3.php.net/manual/fr/book.exec.php If your server is running something other than windows, you would need to tweak the conversion program to run on your web server's distro. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 13, 2013 Author Share Posted November 13, 2013 My serveur is Linux. But I have abandoned this idea. My problem now : when I converted my file .fbx, all the textures have been copied to the destination folder and renamed. sw_dusk&down.dds -> après la conversion 1.jpgwp_blade01.dds -> after conversion 2.jpgwp_hilt04.dds -> after conversion 3.jpg May be that the character _ and & renames the images (just an idea) Quote Link to comment Share on other sites More sharing options...
reddozen Posted November 13, 2013 Share Posted November 13, 2013 we can use DDS textures with babylon? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 13, 2013 Share Posted November 13, 2013 Oh yes! You're right! The exporter renames the textures I can remember now Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 13, 2013 Share Posted November 13, 2013 This is related to the fact that XNA FBX exporter didn't transmit the texture names Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 13, 2013 Author Share Posted November 13, 2013 This is a bug?You can resolve it?Thank You Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 13, 2013 Share Posted November 13, 2013 Right now DDS are not supported because they depend on a WebGL extension @dad72: this is not a bug. We cannot do differently because we are based on XNA FBX exporter which does not preserve texture name 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.