How to combine many meshes to create one mesh?

Software: Prefab3D

Ankur, Jr. Member
Posted: 31 January 2013 11:42 AM   Total Posts: 43

I have this model in Prefab3d, click on this image to see what I have.

As you can see I have more than 100 meshes. I want to combine them all into one mesh.

The reason for that is because I want to access the whole model as one mesh in away3d. I want this code to work -

mesh Mesh(AssetLibrary.getAsset("wholeModel")); 

Atm, when I am tracing this

trace(event.asset.name); 

I am outputting the name of all the meshes one by one - like Line1, Line2, Rectangle3, Cube1, Cube2 and so on.

Note: I also want the textures to remain the way they are. So combining the whole model in one mesh should not cause the whole mesh to have one texture.

Thanks

   

Avatar
Fabrice Closier, Administrator
Posted: 31 January 2013 12:34 PM   Total Posts: 1265   [ # 1 ]

Simply select the meshes that you want to group together or select all. Then either from menu or right mouse click, select Merge. Note that in texturematerial case use, Prefab has an automatish atlas generator.
But is very rough atm (some ui to clarify what it is actually performing will be added). So if Prefab ask if you want to optimise for mobile, select no.

   

Ankur, Jr. Member
Posted: 31 January 2013 04:37 PM   Total Posts: 43   [ # 2 ]
Fabrice Closier - 31 January 2013 12:34 PM

Simply select the meshes that you want to group together or select all. Then either from menu or right mouse click, select Merge. Note that in texturematerial case use, Prefab has an automatish atlas generator.
But is very rough atm (some ui to clarify what it is actually performing will be added). So if Prefab ask if you want to optimise for mobile, select no.

Hi Fabrice
Thanks for the reply. I managed to merge all the meshes into one but the texture of the stadium became black when I exported it to AWD2. Look at this image

Can you help me here. how can I preserve the textures?

Here is the original awd file if you need it - Click here

Thanks

   

Avatar
Fabrice Closier, Administrator
Posted: 31 January 2013 04:42 PM   Total Posts: 1265   [ # 3 ]

deleted previous reply… now seeing the image…
Looks like an unexpected behavior. Can you send me your pfb project (not merged) so I can test it propperly.

   

Ankur, Jr. Member
Posted: 31 January 2013 05:14 PM   Total Posts: 43   [ # 4 ]
Fabrice Closier - 31 January 2013 04:42 PM

deleted previous reply… now seeing the image…
Looks like an unexpected behavior. Can you send me your pfb project (not merged) so I can test it propperly.

Here it is - .zip file

Thanks for helping.

   

Ankur, Jr. Member
Posted: 02 February 2013 09:15 AM   Total Posts: 43   [ # 5 ]

Hi Fabrice,

Did you find the solution?
Is it something wrong with my model or is it a bug with Prefab3D?

Thanks for the help

   

Avatar
Fabrice Closier, Administrator
Posted: 04 February 2013 11:23 PM   Total Posts: 1265   [ # 6 ]

Yes I do. and sended you an url to test a tmp prefab.

In my tests your model now merges fine. Is saved and restored as project and exports are ok as as3 4 and 4.1. There was indeed an issue for multiple meshes materials.

I would be nice if you could comfirm.

   
   

X

Away3D Forum

Member Login

Username

Password

Remember_me



X