Vousk-prod. Posted January 31, 2015 Share Posted January 31, 2015 Hi everybody, I've just noticed that BABYLON.Tools.CreateScreenshot does not render mesh instances in the output picture... You can test here (pink object is simple box, isolated blue object is a mesh, the two other blue objects are instances of the isolated blue) : http://www.babylonjs-playground.com/#1MYQJJ#13 Strange, isn't it ? [EDIT: correct playground link and color info] Quote Link to comment Share on other sites More sharing options...
Dad72 Posted January 31, 2015 Share Posted January 31, 2015 instances are created in the same location the pink object. PS: I have not managed to run the action to create the Screenshot Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted February 1, 2015 Author Share Posted February 1, 2015 Instances are created at the same place but they've been moved afterwards.That's why the two blue objects are not at the same place than the original pink object. To take the screenshot, just press "S" on your keyboard. Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted February 1, 2015 Author Share Posted February 1, 2015 Oh sorry, my bad, I didn't post the correct playground...http://www.babylonjs-playground.com/#1MYQJJ#13 In fact the pink object is just an simple box, with no instances, just for checking. The blue meshes are those which are instanciated : the isolated one is the original mesh, the two others are the instances. When no instances are created, the screenshot is ok (we can see the pink ref box and the blue mesh), but when we start to create instances, no more blue objects on the screenshot... Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted February 1, 2015 Author Share Posted February 1, 2015 (Beware, when you press "s" to take the screenshot, if the canvas has the focus no problem, but if the code area has the focus, you write an "s" somewhere in the code, remove this unwanted "s" before running again...) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 1, 2015 Share Posted February 1, 2015 I click on the 'S' on my keyboard, but it does not work. Maybe this is due to Chrome or it does not work.But I've look and yes, it's strange, instances are not visible it in the screenshot. there are like ghosts. A Bug? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 1, 2015 Share Posted February 1, 2015 Working on it... Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 1, 2015 Share Posted February 1, 2015 Will be fixed with next commit Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted February 1, 2015 Author Share Posted February 1, 2015 Wouahaa great !!Thank you DK !!! Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 1, 2015 Share Posted February 1, 2015 This does not seem resolved. It missing the 2 instance cubes blue : http://www.babylonjs-playground.com/#1MYQJJ#14 and this: not work:scene.actionManager = new BABYLON.ActionManager(scene);scene.actionManager.registerAction(new BABYLON.ExecuteCodeAction({ trigger: BABYLON.ActionManager.OnKeyUpTrigger, parameter: "s" }, function () { BABYLON.Tools.CreateScreenshot(engine, scene.activeCamera, { precision: 1 }); }));The key 's' does not trigger anything (I'm in Chrome) Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 1, 2015 Share Posted February 1, 2015 It was because I did not publish babylon.js to Playground Clear your cache and this should work:http://www.babylonjs-playground.com/#1MYQJJ#15 Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 1, 2015 Share Posted February 1, 2015 yes for the instance. But this does not work. when I click on 'S', nothing is happening: scene.actionManager.registerAction(new BABYLON.ExecuteCodeAction({ trigger: BABYLON.ActionManager.OnKeyUpTrigger, parameter: "s" }, function () {alert("Ok"); })); http://www.babylonjs-playground.com/#1MYQJJ#16 Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted February 1, 2015 Author Share Posted February 1, 2015 For me on Firefox it works. On your last playground link if I press "s" it alerts "OK". Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 1, 2015 Share Posted February 1, 2015 Does not work on google chrome then. Quote Link to comment Share on other sites More sharing options...
iiceman Posted February 1, 2015 Share Posted February 1, 2015 For me (using chrome) it starts to download a screenshot as soon as I open the playground, but pushing S doesn't seem to trigger anything either. Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted February 2, 2015 Author Share Posted February 2, 2015 It starts to download the screenshot on page loading because dad72 has changed the code to launch automaticaly the screenshot to test it. But the fact that chrome does not fire key press event is a real bug.Is it chrome side or BJS side, that is the question. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 2, 2015 Share Posted February 2, 2015 Does it work outside playground, in a simple html page? Quote Link to comment Share on other sites More sharing options...
jerome Posted February 2, 2015 Share Posted February 2, 2015 works for me in Chromium : pop-up "OK" Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 2, 2015 Share Posted February 2, 2015 I try on a html page apart and the same, it does not fire. (Chrome latest version and Babylon latest version) Quote Link to comment Share on other sites More sharing options...
jerome Posted February 2, 2015 Share Posted February 2, 2015 ooopps sorry, I was in FF doesn't work in chromium : the png is downloaded but the S key doesn't show the pop-up mmhh... inspecting the event listeners in chromium, it seems the keydown event listener is attached to some jquery callback function Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted February 2, 2015 Author Share Posted February 2, 2015 Will be fixed with next commit You know what ? This has also solved the problem that shadowGenerator doesn't compute shadow for instanced mesh !! As you can see here : http://www.babylonjs-playground.com/#1MYQJJ#18 Good news ! Quote Link to comment Share on other sites More sharing options...
Dad72 Posted February 2, 2015 Share Posted February 2, 2015 Have you seen the previous post DK. there seems to be a bug with Google Chrome and OnKeyUpTrigger Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted February 2, 2015 Share Posted February 2, 2015 Will be fixed by next commit 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.