Jump to content

Showing Edges when Taking Screenshot


Onit
 Share

Recommended Posts

Hello! This is my first post! :D

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??:)

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

@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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...