Jump to content

Mesh array issue


shaharyar.ahmed
 Share

Recommended Posts

I have a scene created on 3dsmax containing about 60 objects.

 

post-6002-0-19059100-1390247457_thumb.pn

 

but when I convert it to .babylon, I find just 11 meshes in the array 

scene1.meshes.length

and when I select their names:

scene1.meshes[2].name

I 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.

Link to comment
Share on other sites

I use .obj exporter. Because .fbx gives me errors of geometry objects, and I am using 3dsmax 2010.

 

FBX settings:

 

post-6002-0-39091800-1390279509.png

 

The error:

 

Error 1:

post-6002-0-63516600-1390279506_thumb.pn

 

Error 2:

post-6002-0-58679300-1390279785.png

 

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:

post-6002-0-78553300-1390281684_thumb.pn

 

original object names are:

Floor_1_Flat_1_Main
Box26
Floor_1_Flat_1_Main01
Box75
Floor_1_Flat_1_Main02
Floor_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.

Link to comment
Share on other sites

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.

 

Link to comment
Share on other sites

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

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...