shaharyar.ahmed Posted January 20, 2014 Share Posted January 20, 2014 I have a scene created on 3dsmax containing about 60 objects. but when I convert it to .babylon, I find just 11 meshes in the array scene1.meshes.lengthand when I select their names:scene1.meshes[2].nameI get many names in just one string: # Right_Pillar_2Box15Box17Right_Pillar_1Right_Pillar_3Box03Box40Box41Box42Box43Box44Box45Box05 these are many objects but when I click on one of them, I get the above string containing many objects names. So I think it is merging the meshes. You can try it live as well. I need to get every object as a separate mesh. I have to apply textures to them, and then select them on click event. Kindly help me to solve this problem. Quote Link to comment Share on other sites More sharing options...
gwenael Posted January 20, 2014 Share Posted January 20, 2014 Which exporter do you use? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 20, 2014 Share Posted January 20, 2014 I assume this is the FBX one But the exporter does not merge objects, it only set name according to hierarchy Quote Link to comment Share on other sites More sharing options...
shaharyar.ahmed Posted January 21, 2014 Author Share Posted January 21, 2014 I use .obj exporter. Because .fbx gives me errors of geometry objects, and I am using 3dsmax 2010. FBX settings: The error: Error 1: Error 2: You can see the errors are on the planes also, And when I set simple diffuse texture to the objects, the online babylon converter gives the error in the output file: Device is not ready. Thats why I was trying to set textures at runtime. I also downloaded the latest version of .fbx for 3dsmax 2010, but still the same results. Here is the .babylon file converted from .obj file: original object names are:Floor_1_Flat_1_MainBox26Floor_1_Flat_1_Main01Box75Floor_1_Flat_1_Main02Floor_1_Flat_1_Main03 But it has converted them to just one object. They has been merged at the time of conversion to .babylon. Every thing was fine in the .obj file. Please look into this matter. Quote Link to comment Share on other sites More sharing options...
shaharyar.ahmed Posted January 21, 2014 Author Share Posted January 21, 2014 I have found the problem. It is merging same colour objects, and its happening at the time of conversion to the .babylon file. .obj exporter doesn't do it. How can I prevent it to merge the meshes? Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 21, 2014 Share Posted January 21, 2014 Try with the export FBX 2012 or 1013. It has often solved problems for me. Quote Link to comment Share on other sites More sharing options...
shaharyar.ahmed Posted January 22, 2014 Author Share Posted January 22, 2014 Try with the export FBX 2012 or 1013. It has often solved problems for me. But it is the babylon converter problem. It is merging all the same colour objects. I have tested it on many other scenes as well. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 22, 2014 Share Posted January 22, 2014 Yes, but you export your scene in '.fbx' with 3ds max, if you export with the export fbx 2013 3ds max and then with the converter of Babylon for having the ' .Babylon', this perhaps should be solve your problem.Sorry for my bad english. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 23, 2014 Share Posted January 23, 2014 I wrote the .obj importer long time ago but as far as I can remember I think I tried to reduce the number of objects by merging objects sharing the same material:Here is the code:https://github.com/BabylonJS/Babylon.js/blob/master/Exporters/XNA%20-%20OBJ/BabylonExport.Core/Exporters/OBJ/ObjExporter.cs Perhaps you should use the fbx importer to get rid of this problem 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.