Jump to content

filter effect


chroms3
 Share

Recommended Posts

Hi Chroms!

    Thanks for showing us that article about CSS blends.  I don't have any answers, but... I assembled a testing playground.

http://playground.babylonjs.com/#S4TXN

(check which browsers honor this) 

Lines 162+  ... I am trying various things, but... because the canvas is in a 3D context and not a 2D context, CSS might be different.  Perhaps, a canvas element NEVER uses a background color set in CSS.  In most cases, you need to "fill" the background with color... for a canvas.

You can see that I was successful in putting a red border on the playground's 'canvasZone' element in line 168 (the wrapper for the canvas), and you can change the 'zsty' to 'csty' and it still works.

So, I am able to put borders on the canvas, or its wrapper.  But changing the backgroundColor on canvas or canvaszone...no success for affecting the backgroundBlendMode CSS rule (so far).

Use this playground, try some experiments... see what you can discover.  Edit stuff, RUN again and again, SAVE as wanted, get ZIPs... let us know what you discover.

If you want to accomplish those same effects WITHIN a Babylon.js scene... you could likely use 'post-processing' or a shader solution.  We can talk about that later.  Good luck.

Link to comment
Share on other sites

59 minutes ago, Wingnut said:

Ahh, sorry I misunderstood. 

You want those same abilities, but used on Babylon.js rendered view.  Sounds cool. Perhaps post-processing can do it, but I don't know the answer.  Sorry.  We'll wait for experts. 

Это моя вина. Я плохо знаю английский (  

Link to comment
Share on other sites

Hmm.  I was thinking that @chroms3 was seeking an effect that affected the entire camera view.  (Like our "Sepia" and "black and white" things.)

Speaking of sepia, here is an interesting playground whose author is using a filterPostProcess... looks fun.  KernelMatrix?  Wow, that sounds technical!  PostProcessing is a magical world that I have yet to learn.  renderPipelines, postRenderPipelines, we can put processing on them all.  What a powerful area for "artsy" folk. 

I like the 'sepia' option that used to be available on BJS website demos.  That was... weird.  But black and white mode is still on the menu... and it, too, is.. weird.

Sorry, rambling.  :)

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