FXdal Posted September 23, 2016 Share Posted September 23, 2016 Is there anyway to use vertex normal data for smoothing in the blender exporter for babylon. I just got a job from a company to create assets for a game that will be made in babylon and even thou i have experience from other gaming engines i could not figure out the pipeline for Babylon. I delivered the first model in .obj format and it worked well, but when the game designer converted the model to .babylon format all the edges was smoothed witch is unusable in this case. It seems that babylon completely ignores the vertex normal data. I have tried setting up with hard and soft edges including setting the smoothing angle for each edge, but it seems that it just smooths all of it no matter what i do. I read somewhere that you could change some settings to force flat shading and that would be better for this model than all smooth if there is no option for mixed normals, but i cant even find that option in the exporter. Quote Link to comment Share on other sites More sharing options...
adam Posted September 23, 2016 Share Posted September 23, 2016 http://doc.babylonjs.com/classes/2.4/Mesh#converttoflatshadedmesh-rarr-void Quote Link to comment Share on other sites More sharing options...
FXdal Posted September 23, 2016 Author Share Posted September 23, 2016 Thanks for the prompt reply Adam, but if i understand you correctly this means that it has nothing to do with the export from blender, but is a function that needs to be added to the script part. Im not involved with programming so that part i have no comprehensions of. Quote Link to comment Share on other sites More sharing options...
adam Posted September 23, 2016 Share Posted September 23, 2016 You can use that in the code or you can check the option for the mesh in Tower of Babel exporter for Blender. https://github.com/BabylonJS/Babylon.js/tree/master/Exporters/Blender Looks like I linked to the wrong exporter: https://github.com/BabylonJS/Extensions/tree/master/QueuedInterpolation/Blender Edit: I guess they both have that option. Quote Link to comment Share on other sites More sharing options...
gryff Posted September 23, 2016 Share Posted September 23, 2016 @FXdal : Welcome to the forum:) Yes you can set flat shading in the exporter - see image below. In the triangle Tab of Properties window cheers, gryff Quote Link to comment Share on other sites More sharing options...
FXdal Posted September 23, 2016 Author Share Posted September 23, 2016 Thanks so much guys, made my day! Im not even a blender user, just piping my models through, but now i got what i need But just to clarify, i cant mix normals at this time, like setting the smoothing angle on rounded edges and and sharp edges? Quote Link to comment Share on other sites More sharing options...
adam Posted September 23, 2016 Share Posted September 23, 2016 Quote Link to comment Share on other sites More sharing options...
FXdal Posted September 23, 2016 Author Share Posted September 23, 2016 !Cool! Thanks Again! Quote Link to comment Share on other sites More sharing options...
gryff Posted September 23, 2016 Share Posted September 23, 2016 As @adam says you can use the edge-split modifier. See image below And here, hopefully, is the .blend file in a zip format that was used to create that with the modifier. So you can play around with it. cheers,gryff 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.