esseninn Posted January 22, 2015 Share Posted January 22, 2015 Standart scene, standart example but blender smooth export, why? i need flat model.or smooth model if modifier smooth<!DOCTYPE html><html><head> <meta charset="UTF-8"> <title>Scene</title> <script src="/js/babylon.1.14.js"></script> <style> html, body, canvas { width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden; } </style></head><body><canvas id="renderCanvas"></canvas><script> var canvas = document.getElementById('renderCanvas'); var engine = new BABYLON.Engine(canvas, true); BABYLON.SceneLoader.Load('/scenes/', 'scene.babylon', engine, function(newScene){ var scene = newScene; scene.clearColor = new BABYLON.Color3(1, 1, 1); scene.executeWhenReady(function(){ scene.activeCamera.attachControl(canvas); engine.runRenderLoop(function(){ scene.render(); }); }) }); window.addEventListener('resize', function(){ });</script></body></html>tnx.scene.zip Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted January 23, 2015 Share Posted January 23, 2015 Just add mesh.convertToFlatShadedMesh() after loading it Quote Link to comment Share on other sites More sharing options...
gryff Posted January 23, 2015 Share Posted January 23, 2015 Hi esseninn - welcome to the forum. In Blender, go to the Properties Panel and chose the tab with the little triangle. In that panel you will see a little arrow with "Babylon.js" next to it. Click on the little arrow and you will see the parameters you can set easily. One is "Flat Shading". Click on the little box to put a check mark in it. You will get that mesh with flat shading. Easy to do. No need to add program lines - and you can select all meshes for each state right in Blender cheers, gryff Koroldev 1 Quote Link to comment Share on other sites More sharing options...
esseninn Posted January 23, 2015 Author Share Posted January 23, 2015 Hi thank you very much, looks greathttp://test.sewing58.ru/ 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.