paulsouthport Posted August 21, 2015 Share Posted August 21, 2015 Hi all When I load a Blender .babylon file, the textures all have a weird excess phong/softness - the edges disappear and everything appears rounded. In the attached image, the pink cube has a babylon standard material, the green cube is from Blender and has a material specified in Blender. How do I get nice crisp edges - ie. what is the correct Blender material settings? thanks chaps!Paul Quote Link to comment Share on other sites More sharing options...
gryff Posted August 21, 2015 Share Posted August 21, 2015 Hi paul. A question. Are you using the same lights from Blender for both cubes? Or is the red cube just a scene done strictly in code? From the paleish green patch near the top of the green cube it seems to have a specular component to the material. In the Materials Tab in the properties panel you will notice that the default specular colour is white and has an intensity of 0.5. Change that intensity value to 0. Does that improve it ? cheers, gryff Quote Link to comment Share on other sites More sharing options...
paulsouthport Posted August 21, 2015 Author Share Posted August 21, 2015 Hey Gryff! Thanks for the reply, it's a single scene, no lights in the .babylon, but a hemi and a directional in the JS.I changed the spec to 0 but found that, on the "Object Data" tab, checking flat shading helps It's a bit weird, and makes the scene look odd, but, getting there! thanksPaul Quote Link to comment Share on other sites More sharing options...
iiceman Posted August 24, 2015 Share Posted August 24, 2015 Heyho, you could try mesh.convertToFlatShadedMesh(); and see if it helps. Alternatively you can try setting the flat shading in Blender. That animated GIF in this thread shows the button I mean: http://blender.stackexchange.com/questions/17929/where-is-the-smooth-flat-shading-property-of-an-object Usually cubes created in Blender should have the flat shading, though. No clue why it's not like that for you. Maybe you created your cube in a different way. By the way: keeping smooth curved surfaces but hard edges: http://blender.stackexchange.com/questions/734/how-to-smooth-shade-an-object-while-retaining-hard-edges Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 24, 2015 Share Posted August 24, 2015 you could try mesh.convertToFlatShadedMesh(); and see if it helps. Alternatively you can try setting the flat shading in Blender. iiceman, FYI the blender setting results in a convertToFlatShadedMesh() call by FileLoader.ts. I am assuming these are just standard cube created by Blender, so it is not a normals problem. Perhaps posting your .log file will help. And also a screen shot of your texture properties. Quote Link to comment Share on other sites More sharing options...
paulsouthport Posted August 24, 2015 Author Share Posted August 24, 2015 Hi guys I have started setting the Use Flat Shading tag on most of my materials and the edges are good. would using the EdgeSplit drastically increase poly count? I have a fairly complex scene, in terms of number of objects and materials, and need to keep it useable on lower end devices and weak PC's. Quote Link to comment Share on other sites More sharing options...
JCPalmer Posted August 24, 2015 Share Posted August 24, 2015 FYI, it looks like it was the normals. DK just committed 3.0.4 exporter, which changed the default type of normal produced. Before you always got vertex normals. Now the default for NoVertex optimization is True. When True, you get face normals. Please rerun without resorting to Flat shading. That recomputes normals in BJS, post load & is not a valid test. Your files are probably going to get bigger than before. Quote Link to comment Share on other sites More sharing options...
paulsouthport Posted August 25, 2015 Author Share Posted August 25, 2015 Fantastic, thanks for the update. Materials are now nice and sharp without going through the Flat Shading route. Thanks! 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.