V!nc3r Posted September 19, 2018 Share Posted September 19, 2018 Is my setup of LUT texture inside defaultRenderingPipeline wrong? https://www.babylonjs-playground.com/#23YL1J#2 (play with boolean line 12) I don't understand why I haven't the same render than the LUT post process. Bug or PEBKAC? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 19, 2018 Share Posted September 19, 2018 I am on it but I suspect it is because you are not relying on an sdl file, I let you know ASAP Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 19, 2018 Share Posted September 19, 2018 So to use the same texture a bit of trickery is required as the default is sdl format. So you need to not inverse the texture and not use the green channel for depth: https://www.babylonjs-playground.com/#23YL1J#5 I am now looking into the post process configuration as smthg seems off. Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted September 19, 2018 Author Share Posted September 19, 2018 25 minutes ago, Sebavan said: as the default is sdl format erf OK! I miss that info 'cause I've seen on the API that we need a colorGradingTexture: Nullable<BaseTexture>. Shouldn't be said colorGradingTexture: Nullable<ColorGradingTexture> instead? Thanks for the tips :) Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 19, 2018 Share Posted September 19, 2018 It defaults to it but png are allowed, just need a tiny bit of conf ? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 19, 2018 Share Posted September 19, 2018 So here you go: https://www.babylonjs-playground.com/#23YL1J#6 V!nc3r 1 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted September 19, 2018 Author Share Posted September 19, 2018 OK, very nice, thanks! I don't find your tips in the doc', am I missing something? Should probably be here I think: http://doc.babylonjs.com/how_to/how_to_use_postprocesses#imageprocessing The associated colorGrading playground actually use this 3dl texture, could be a nice idea to give also an example with png, what do you think? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 19, 2018 Share Posted September 19, 2018 @V!nc3r, Would be amazing !!! fancy creating a PR ? Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted September 19, 2018 Author Share Posted September 19, 2018 'can do that Sebavan 1 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted September 20, 2018 Author Share Posted September 20, 2018 PR done. I notice we get some edge-detection-artefacts when increasing the default contrast, example: https://www.babylonjs-playground.com/#K4S3GU#28 But these artefacts aren't here when I tweak the LUT from Photoshop. Is it another properties combination where I'm wrong? ? [edit] is it have something to deal with mipmaps? (even if noMipmaps is set to true?) Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 20, 2018 Share Posted September 20, 2018 Yup another setting, you were not far with mipmaps it has to do with wrapping. The texture needs to not be in wrap mode repeat: https://www.babylonjs-playground.com/#K4S3GU#29 V!nc3r 1 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted September 20, 2018 Author Share Posted September 20, 2018 So, another PR in its way Seems to works perfectly now, Thanks ! GameMonetize 1 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted September 20, 2018 Author Share Posted September 20, 2018 hmm, yep, me again, sorry if I bored you ahah. I've still the bug, in this test scene for example: https://www.babylonjs-playground.com/#XYK7JG#1 with - I think- all the tweaks you told me, and using pipeline. Make some test on our usual thread playground with kind-of same settings : https://www.babylonjs-playground.com/#K4S3GU#32 and here, all works fine. [edit: woops, actually artefact spotted! /edit] I tryied to understand from where the issue comes in the cornell box playground, and the only thing I found but don't understand why is that these artefacts disappear when I comment the light creation (line 10) https://www.babylonjs-playground.com/#XYK7JG#2 Have we something clamped somewhere, and another setting to add to the doc' ? Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 20, 2018 Share Posted September 20, 2018 I am wondering if it is not related to of the colors are mapped in the LUT. Could you try a sdl file instead ? On webgl2 browsers this would be blazing fast as it would rely on 3d texture and interpolations would not be an issue anymore. Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted September 21, 2018 Author Share Posted September 21, 2018 So, I tried with a .3dl. (didn't know until now that Photoshop allowing exporting this, thanks for the discorvery ) But, some colors looks inverted: Here my process in video: https://www.dropbox.com/s/fce6bj1ho7xvohf/photoshop-LUT-exporting.mp4?dl=0 And, of course, the playground: https://www.babylonjs-playground.com/#K4S3GU#35 and my .3dl direct link., compared to the BJS one online, I don't know if something is wrong here: I tried playing with the colorGradingWithGreenDepth things, same issue. But at least, no artefacts... just wrong colors (I think the doc' will be updated soon after all that things fixed ahah) PatrickRyan 1 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 21, 2018 Share Posted September 21, 2018 I ll check as soon as I finish a bug fix on tube update. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 21, 2018 Share Posted September 21, 2018 Yup it seems the colors are ordered in the other way ? I ll try to find where this comes from in the parameter and if I do not I ll add a way to reverse the texture on z. Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 21, 2018 Share Posted September 21, 2018 @V!nc3r or @PatrickRyan Could you please export an identity 3dl for me ? This would be the easiest to test the setup. PatrickRyan 1 Quote Link to comment Share on other sites More sharing options...
Sebavan Posted September 21, 2018 Share Posted September 21, 2018 @V!nc3r thanks a lot for your diggin I was able to fix to issues with the parser: https://github.com/BabylonJS/Babylon.js/pull/5229 It should be all good now and way easier for you to create amazing effects from toshop exports. V!nc3r 1 Quote Link to comment Share on other sites More sharing options...
PatrickRyan Posted September 22, 2018 Share Posted September 22, 2018 9 hours ago, Sebavan said: @V!nc3r or @PatrickRyan Could you please export an identity 3dl for me ? This would be the easiest to test the setup. @Sebavan here is your identity LUT if you still need one. I am starting a repo for LUTs for us to use/share. Yours is the first. https://github.com/PatrickRyanMS/BabylonJStextures/tree/master/LUT or if you just want the raw link to include in your PG: https://raw.githubusercontent.com/PatrickRyanMS/BabylonJStextures/master/LUT/NoAdjustment.3DL Sebavan 1 Quote Link to comment Share on other sites More sharing options...
V!nc3r Posted October 1, 2018 Author Share Posted October 1, 2018 Sorry for the delay (vacations), and nice job for the fix! Here my NoAdjustment.3dl file (from Photoshop CC 2017.1.1) PatrickRyan, Sebavan and GameMonetize 2 1 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.