Dad72 Posted March 9, 2015 Share Posted March 9, 2015 Hi, There is a shader compilation error on this example in the documentation. http://www.babylonjs-playground.com/#DX6AV#1 Quote Link to comment Share on other sites More sharing options...
fenomas Posted March 9, 2015 Share Posted March 9, 2015 Seems to work for me? (mac/chrome 41). Quote Link to comment Share on other sites More sharing options...
jerome Posted March 9, 2015 Share Posted March 9, 2015 Works for me too FF + Chromium (linux) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 9, 2015 Author Share Posted March 9, 2015 For me, in Google Chrome (Windows 7) it does not work Quote Link to comment Share on other sites More sharing options...
RaananW Posted March 9, 2015 Share Posted March 9, 2015 @dad72 same here. Chrome 41, Windows - doesn't work. IE works. Quote Link to comment Share on other sites More sharing options...
iiceman Posted March 9, 2015 Share Posted March 9, 2015 latest Chrome doesn't work here either, but Firefox does. Quote Link to comment Share on other sites More sharing options...
Stephen Andrews Posted March 9, 2015 Share Posted March 9, 2015 Works fine for me, Linux x64, Chrome(ium) 40. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted March 10, 2015 Share Posted March 10, 2015 Wow, Dad72, you and I were doing discussions about the same PG scene... in different threads... at the same time. (the "check my scene" thread) Weird. I arrived late to the party, it seems. Thanks for checking our PG scenes. Good find. Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 10, 2015 Author Share Posted March 10, 2015 Sorry Wingnut, I did not see this same subject Quote Link to comment Share on other sites More sharing options...
Wingnut Posted March 10, 2015 Share Posted March 10, 2015 We just talked about the same playground, but not about the same subject. You had shader problems, I had slow-loading problems that I thought was crashes. Did you discover what causes/caused the shader error? Google Chrome only? (thx) Quote Link to comment Share on other sites More sharing options...
Dad72 Posted March 10, 2015 Author Share Posted March 10, 2015 No Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 10, 2015 Share Posted March 10, 2015 i pingued the author on Github (jahow) : https://github.com/BabylonJS/Babylon.js/pull/408 Quote Link to comment Share on other sites More sharing options...
jahow Posted March 17, 2015 Share Posted March 17, 2015 Hi all, Thanks for the feedback. Looks like I have to dig back into this issue after all... Will post here if I make progress. Quote Link to comment Share on other sites More sharing options...
Wingnut Posted March 17, 2015 Share Posted March 17, 2015 This might be a bug in Google Chrome, right? All in all, thanks for trying to beat this, Jahow! I would be more than glad to help with something, if you need me for anything. Also, can we hand this off to Google Chrome support staff? Maybe they are looking for a bug to work-on. Fellow forum users... let's help Jahow with this, in any way we can. Depth-of-Field/LensEffects is an awesome system, and we all need to stand behind it and try to get 100% browser compat if we can. So, put me to work, Jahow. Want me to fly-in to Google HQ and have a little talk with the Chrome dev team? I'm on it. Quote Link to comment Share on other sites More sharing options...
jahow Posted March 17, 2015 Share Posted March 17, 2015 Haha thanks for the support Wingnut! Even if this is browser-related, I need to isolate the problem one way or another. Which is going to be hard since I can't reproduce the issue on my machine But I have a few leads so don't worry. GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
jahow Posted March 20, 2015 Share Posted March 20, 2015 https://github.com/BabylonJS/Babylon.js/pull/446 Let's hope this works better! Note to self: do not use 'for' loops in shaders. jerome 1 Quote Link to comment Share on other sites More sharing options...
GameMonetize Posted March 20, 2015 Share Posted March 20, 2015 PR validated.. Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted April 16, 2015 Share Posted April 16, 2015 I really love your DOF lens effect jahow !! But to produce a good tilt shift or simulate macro photography, the "far" blur should be a lot more blurry. I don't see any param to increase the blur power, is there a way to change it ? (maybe a second blur pass is required to obtain a really nice blur, that's why you didn't put a blur factor value ?) Quote Link to comment Share on other sites More sharing options...
jahow Posted April 16, 2015 Share Posted April 16, 2015 Thanks!! You're right about the tilt shift. In my effect, the far blur is actually 'capped', the radius reaches a maximum limit and stops. I did that because since objects are getting further anyway, even with the same blur radius, they will still be more and more blurred. Also, in my shader the blur is computed in one pass, so to make it look nice I had to do a lot of samples. The maximum number of samples is 30 (for things very far away), which is already a lot. I didn't want to go further than that, so increasing the blur radius was not possible. You can try to play with the 'depth bias' parameter, which determines how quickly the blur increases with depth, if you haven't already. Also, recently I've looked closely at how Cities: Skyline does the tilt shift effect (screenshot) and it's actually very simple. It's just a blur on the whole screen that is stronger on the upper and lower part, and non existent in the middle. I'm pretty sure they do not need any depth calculation, and they can do this with a multi pass blur hich would be much more efficient. It's the same technique used here: you can see that the part of the screen staying sharp is always an horizontal line at around a third of the screen's height. Anyway, I'm glad you liked it Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted April 16, 2015 Share Posted April 16, 2015 By 'depth bias' you means your aperture param I presume, yes I've already played with it (and that's just a very great param, congrats!!).But the scene is still not enough blurred in my taste. You're right, many tilt shifts are made like that : an simple horizontal line with sharp focus and the rest of the screen blurry (even on my real Canon camera the tilt shift mode is based on that simple principle), but that not always produces a really convincing effect. With 3D we can achieve a far more efficient tilt shift since we can have real depth taken in account. But for that we need 1. the ability to choose the quickness of the blur to appear (your magical aperture param, tragically lacks on the screenshot of Cities: Skyline you provided, resulting in a "fisher price" tilt shift) and the ability to define the averall strongness of the blur (I'd say 3 times stronger than actual one would be good). All other parameters you provided are just perfect! And for macro photo DOF simulation, we would even need more strongness if we want to simulate that kind of pic. And I'm not even talkin about the background (we can put a map already blurred as wanted), but simply the blurred foreground showed here would be a great start Quote Link to comment Share on other sites More sharing options...
jahow Posted April 17, 2015 Share Posted April 17, 2015 Then maybe a good solution would be an additional blur pass on the already blurred parts of the screen, that can be enabled or disabled. This way it should be possible to achieve what you want without taking hundreds of samples per pixel Also I found a very nice webGL lens blur with bokeh here: http://evanw.github.io/glfx.js/demo/#lensBlur I'd be curious to see how the author did that! Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted April 17, 2015 Share Posted April 17, 2015 What a link!!!!! Oh man, thanks jahow it's the best image effects js library I've ever seen!!!Don't know if I'll need it one day, but just to know it exists made my day.(but it applies to pictures, I don't get why and how WebGL is involved in this lib... ) Do you think it's a big work to add this additional blur pass in your lens effect ? Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted April 17, 2015 Share Posted April 17, 2015 I had a look at the source code for this marvelous glfx lib, but I don't get anything (I can't read shader langage, that's just chinese to my eyes... ) Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted April 17, 2015 Share Posted April 17, 2015 Would it be possible to have params in your lens effect to choose the blur max samples and the number of iterations ? Quote Link to comment Share on other sites More sharing options...
Vousk-prod. Posted April 17, 2015 Share Posted April 17, 2015 I saw also that in some macro photos, a technique to enhance the effect is to darken the out focus parts (the more out focus, the darker, same as the blur). Do you think it's possible to have an additionnal effect of this kind in your post process, with a param defining the amount (exactly like your chromatic aberration, or distortion params) ? 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.