jothikannan Posted October 31, 2014 Share Posted October 31, 2014 Hi all, am trying to convert my obj and fbx model with the online converter which i found here http://www.babylonjs.com/converter.html am trying few days,i can convert the model as .babylon format, but after that am trying to load my model on the babylon.js but i can't see any textures applied to my converted model, what is wrong ? what i have to do here ? am struggling here with the last 3 days, but no clue attached is my `iPhone5_FBX.zip` which is my source file and output(1).zip is my output file which i got from the converter page iPhone5_FBX.zipoutput(1).zip Quote Link to comment Share on other sites More sharing options...
Temechon Posted October 31, 2014 Share Posted October 31, 2014 Hello, You cannot see any textures because they are not referenced in your babylon file.The online converter does not work currently (a lot of bugs), the babylon team is working on it. You should use the exporter plugin of blender and 3DSmax. Cheers, Quote Link to comment Share on other sites More sharing options...
jothikannan Posted October 31, 2014 Author Share Posted October 31, 2014 Hi Temechon Thanks for the answer , i tried also on blender exporter but that is also not working to me, anyway i will try again, and let you know Quote Link to comment Share on other sites More sharing options...
jothikannan Posted October 31, 2014 Author Share Posted October 31, 2014 Hi, Yes i said i tried to convert my models with the babylon blender exporters , now the nothing is working i can't see the model on the scene attached is my model as babylon json formata.babylon.zip Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 31, 2014 Share Posted October 31, 2014 Could you share the textures as well? Quote Link to comment Share on other sites More sharing options...
jothikannan Posted November 1, 2014 Author Share Posted November 1, 2014 Hi, please find the attachment for the textures using in the my modeltexture.zip Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 3, 2014 Share Posted November 3, 2014 It is possible that your object is a huge scale and can not be seen loading.did you try to reduce the scale : mesh.scaling= new BABYLON.Vector3(0.3, 0.3, 0.3);//ormesh.scaling= new BABYLON.Vector3(0.03, 0.03, 0.03);And use maxZ of the camera : camera.maxZ = 10000;also make sure that the images are in the same directory as the file babylon Quote Link to comment Share on other sites More sharing options...
jothikannan Posted November 3, 2014 Author Share Posted November 3, 2014 HI dad72, Nope i doesn't tried, am novice to 3d programming Following is my code, i added the camera as you said and how can i add the mesh ? <script> var canvas = document.getElementById("renderCanvas"); var engine = new BABYLON.Engine(canvas, true); var createScene = function () { var scene = new BABYLON.Scene(engine); //Adding a light var light = new BABYLON.PointLight("Omni", new BABYLON.Vector3(20, 20, 100), scene); //Adding an Arc Rotate Camera var camera = new BABYLON.ArcRotateCamera("Camera", 0, 0.8, 100, new BABYLON.Vector3.Zero(), scene); camera.attachControl(canvas, false); camera.maxZ = 10000; // The first parameter can be used to specify which mesh to import. Here we import all meshes BABYLON.SceneLoader.ImportMesh("", "scenes/iphone_5/", "super.babylon", scene, function (newMeshes) { // Set the target of the camera to the first imported mesh camera.target = newMeshes[0]; }); // Move the light with the camera scene.registerBeforeRender(function () { light.position = camera.position; }); return scene; } var scene = createScene(); engine.runRenderLoop(function () { scene.render(); }); // Resize window.addEventListener("resize", function () { engine.resize(); }); </script>please help me to fix it Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 3, 2014 Share Posted November 3, 2014 for the camera, I modified alpha and beta //Adding an Arc Rotate Camera var camera = new BABYLON.ArcRotateCamera("Camera", Math.PI / 2, Math.PI / 2, 20, new BABYLON.Vector3(0, 4, 0), scene); camera.attachControl(canvas, false); camera.maxZ = 10000; For the meshBABYLON.SceneLoader.ImportMesh("", "scenes/iphone_5/", "super.babylon", scene, function (newMeshes) { var mesh = newMeshes[0]; mesh.position = BABYLON.Vector3.Zero; mesh.scaling= new BABYLON.Vector3(0.03, 0.03, 0.03); });And for : var scene = createScene(); delete "var scene =" is useless Then create a global variable for use in several functions: var canvas = document.getElementById("renderCanvas");var engine = new BABYLON.Engine(canvas, true);var scene = null; Do not forget to remove the var keyword in your function var createScene = function () {var scene = new BABYLON.Scene(engine); Quote Link to comment Share on other sites More sharing options...
jothikannan Posted November 3, 2014 Author Share Posted November 3, 2014 Hi @dad72, Now the model is showed on the scene, without texture, here http://3dmodelviewer.osiztechnologies.com/sample/ But the same model is not working with the textures here http://3dmodelviewer.osiztechnologies.com/sample/demo.html am losing my confident, how this couldn't work with the material textures ? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted November 3, 2014 Share Posted November 3, 2014 Images must be in the same directory as the file.What do you converted with your models? The "exporter online" renames the images.Try to convert your object with 3ds max plugin and available for export in .babylon You are not far to get there, you already have your models on the screen, this is a good start encouraging. Quote Link to comment Share on other sites More sharing options...
jothikannan Posted November 3, 2014 Author Share Posted November 3, 2014 Hi dad, i tried with the blender exporter previously , and now i tried with the 3ds MAX babylon exporter, however am not getting the exact result i want, check here http://3dmodelviewer.osiztechnologies.com/sample/ now the model is distorted with the geometry and textures Quote Link to comment Share on other sites More sharing options...
davrous Posted November 4, 2014 Share Posted November 4, 2014 Your model is too complex for WebGL and babylon.js. You probably have too many vertices. Try to simplify the geometry of your model. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted November 5, 2014 Share Posted November 5, 2014 There is a limit of 65536 vertices per mesh 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.