Quadear Posted October 4, 2016 Share Posted October 4, 2016 Hello, I'm making randomly generated mini maps. I'm generating height with a noise generator and need to add "water" when the height is < 0. https://freckle-ripper.hyperdev.space/ (env are randomly generated, refresh for an image with water). The problem is the following : I draw the boxes' edges with the enable edges rendering function. When the edges are belonoging to boxes in the sea, I'm expecting to see them at least "blurry", cause there is some water above it. Right now, the edges doesn't seem to be afected by the fact that there is a transparent mesh above it. The edges are way too clean for something under a mesh. Is there a way to make it look as if it's underwater ? Thank you Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted October 4, 2016 Share Posted October 4, 2016 Hello, unfortunately this could not work because EdgeRendering is done AFTER transparency (on top of it). For quality and performance reason, I would suggest using a texture with borders drawn directly on it. Wingnut and adam 2 Quote Link to comment Share on other sites More sharing options...
Wingnut Posted October 4, 2016 Share Posted October 4, 2016 Hi Quadear.... good to see you again. I'm no expert, but I know two other ways to do edge outlines. Both suck, but both are not post-processing effects, and therefore SHOULD be affected by semi-transparent mesh atop. #1. The linesMesh method. http://playground.babylonjs.com/#QKQHS#375 That is a miserable "remake" of .showBoundingBox, except you can't see back-side lines THROUGH the mesh. It takes a serious bit of code per box, likely diminishing performance. #2. The 6-plane boxMaker function, with slight gaps at the edges, and another colored box put inside. http://playground.babylonjs.com/#TYAHX#69 This is also quite a miserable task, and performance damaging. Deltakosh's idea is much wiser. Quote Link to comment Share on other sites More sharing options...
Quadear Posted October 4, 2016 Author Share Posted October 4, 2016 Ty guys, i will use textures then. 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.