Hersir Posted April 13, 2017 Share Posted April 13, 2017 Hi, after upgrading to 3.0-alpha I see differences in directional light in my scene that I exported from unity. I attached images and babylon file to show the difference. Code for scene is: const canvas = document.querySelector("#renderCanvas") as HTMLCanvasElement; const engine = new BABYLON.Engine(canvas, true); let camera; BABYLON.SceneLoader.ShowLoadingScreen = false; BABYLON.SceneLoader.Load("src/","light-demo.babylon", engine, function(scene) { camera = new BABYLON.ArcRotateCamera("Camera", BABYLON.Tools.ToRadians(180), 0, 3, BABYLON.Vector3.Zero(), scene); scene.addCamera(camera); scene.setActiveCameraByName("Camera"); camera.attachControl(canvas, true); scene.clearColor = new BABYLON.Color4(0, 0, 0, 0); engine.runRenderLoop(function() { scene.render(); }); }); Maybe thats some material issue from untiy? light-demo.babylon Quote Link to comment Share on other sites More sharing options...
Wingnut Posted April 13, 2017 Share Posted April 13, 2017 Hi Hersir, thanks for the issue report and pictures. I don't have solution, but I would like you to TRY something for me, if you have a moment. I want to see if YOUR issue is related to another issue that I am having... with another project. // a series of actions to correct the darkness and dullness of scaled spheres. var yayManeuver = function(mesh) { mesh.bakeCurrentTransformIntoVertices(); mesh.updateFacetData(); var myVertexData = BABYLON.VertexData.ExtractFromMesh(mesh, true); myVertexData.transform(mesh.getWorldMatrix()); myVertexData.applyToMesh(mesh); } Could you please add this function to your scene code? Then, using scene.meshes array or scene.getMeshByName(something), get a reference to your sphere mesh (get it into a variable). Then, run it through this function... such as... yayManeuver(sphere); (if you please) I am interested if you see a "correction" in the lighting... after sending the sphere through that code/func. Thanks either way. More comments sure to come, thanks again for the report. Quote Link to comment Share on other sites More sharing options...
Hersir Posted April 13, 2017 Author Share Posted April 13, 2017 @Wingnut I tried your function and there was no difference Wingnut 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted April 13, 2017 Share Posted April 13, 2017 Ping @MackeyK24 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.