guzuomuse Posted May 13, 2018 Share Posted May 13, 2018 hi,i want to the import mesh has the same default settings with the built-in mesh( like:Babylon.Mesh.createSphere.createCylinder....); how to do that? for now the imported mesh from blender is gray whereas the build-in mesh is white here is the screen picture: the gray mesh is imported from blender,and the withe one is created with the built-in Babylon.Mesh.createCylinder. i want to make the gray has the same default setting with the white one. how to do that? thanks. Quote Link to comment Share on other sites More sharing options...
guzuomuse Posted May 13, 2018 Author Share Posted May 13, 2018 i have console that white one .it's material is undefined,but why it has white color? Quote Link to comment Share on other sites More sharing options...
guzuomuse Posted May 13, 2018 Author Share Posted May 13, 2018 i know how to set diffuse,specular emissive colors...but what i want to know is that how can i make the mesh has the default setting (white color) without apply any material like the built-in created mesh? Quote Link to comment Share on other sites More sharing options...
aWeirdo Posted May 13, 2018 Share Posted May 13, 2018 "Mesh.material.dispose()" or "Mesh.material = null" should do the trick. Quote Link to comment Share on other sites More sharing options...
guzuomuse Posted May 14, 2018 Author Share Posted May 14, 2018 @aWeirdo,thanks for your reply but it it doesn't work. Quote Link to comment Share on other sites More sharing options...
babbleon Posted May 14, 2018 Share Posted May 14, 2018 @guzuomuse: have a look at this PG: https://www.babylonjs-playground.com/#1V53AS Here, we: create a cylinder append the scene exported from blender apply the material on the cylinder to the imported mesh dispose (remove) the cylinder Be aware that when you import or append a scene exported from Blender, it will also include the lighting and (I think) the environment too. It really helps people to understand your problem if you create a playground. 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.