Onit Posted September 9, 2016 Share Posted September 9, 2016 Hello! This is my first post! I need to take a screenshot of a scene where i have several cubes with edges displayed using the method "enableEdgesRendering" from "BABYLON.AbstractMesh". To take the screenshot i'm using the function BABYLON.Tools.CreateScreenshot but it seems to ignore the shader who creates the edges! Here there's the simplest playgroud i could make: http://www.babylonjs-playground.com/#TYAHX#61 Someone could Help?? Quote Link to comment Share on other sites More sharing options...
Wingnut Posted September 12, 2016 Share Posted September 12, 2016 Welcome to the forum, Onit! Yep, I see the issue. No solution yet... still thinking. http://www.babylonjs-playground.com/#1WROZH#12 On the bottom of the screen are 4 'renderTargetTextures', and you can see that none of them... have the edgesRendering. (uh oh!) Now a look at the source code for createScreenShot... we see... https://github.com/BabylonJS/Babylon.js/blob/master/src/Tools/babylon.tools.js#L590 Yep, renderTargetTexture. So the ACTUAL issue is... no edgesRendering seen in renderTargetTextures. Or maybe a problem with the layerMasks in that demo. Or... hmm. *scratch scratch* I don't have a solution, but progress is being made (I think). Sorry for the slow replies. douglas 1 Quote Link to comment Share on other sites More sharing options...
adam Posted September 12, 2016 Share Posted September 12, 2016 I wonder if it related to this issue. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted September 12, 2016 Share Posted September 12, 2016 @adam, you're friggin' smokin! Yeah, there's renderTargetTextures involved in water material (line 342 area of source)... and layerMasks involved in that issue, too. Good memory, A-man. @Deltakosh was the one who added the layerMask settings to my 4-RTT demo. Before that, it looked like http://www.babylonjs-playground.com/#1WROZH#13 Problems in RTT #1... it couldn't view it's own view of itself. (huh?) All in all... interesting correlations here. hmm. Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 13, 2016 Share Posted September 13, 2016 Hello, this is not a bug per se The screenshot is capturing the scene only and not all others layers (like EdgesRender). Wingnut 1 Quote Link to comment Share on other sites More sharing options...
Onit Posted September 13, 2016 Author Share Posted September 13, 2016 Is there a way to change the screenshot method so that it captures the others layers? Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted September 13, 2016 Share Posted September 13, 2016 There is always a way but this is gonna require a bit of code. 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.