-
Notifications
You must be signed in to change notification settings - Fork 824
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Post processing #3948
Post processing #3948
Conversation
Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA). View this failed invocation of the CLA check for more information. For the most up to date status, view the checks section at the bottom of the pull request. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for this! Very cool possibilities here, but this is significant change (from 2 dependencies to 3) so this'll require a lot of checking. Also a significant API change that we'll want to get right so we don't have to break it down the road. Have you tried the SSAO? And how many devices have you tested this PR on?
I have checked the SSAO it's very subtle and not a dramatic visual impact (which is good imo). So far I've tested only on Mac (firefox/chrome). I'll test on windows and linux, also edge, but there's nothing that shouldn't work because all of the post processing effects just use the inbuilt three renderer to do some image manipulation, in fact the implementation of most effects is quite similar to the three inbuilt postprocessing |
Please show off some before/after visuals of these various effects; that will help convince people to use them! Also, how is it on mobile? How significant is the performance reduction? |
I haven't checked on mobile, nor have I checked AR as I'm not sure how I can do that with a local-dev server. Testing on my old Macbook Air 2013 (1.3 Dual-Core i5, 4gb DDR3, Intel HD 5000 1.5gb vram) I see little to no performance impact from Bloom and SSAO combined. |
When I do local testing on my mac, I just do |
Ok sounds great, will test this weekend and upload some screenshots |
I'm looking into adding SSR (screen space reflections) to my project using modelviewer, so I'm interested in the developement of this, sadly based on it's roadmap it seems like /pmndrs/postprocessing isn't going to implement SSR any time soon. |
Mainly that the three postprocessing is less customizable, some effects like Bloom are of lower render quality (but I'm sure that can be fixed), and that it's actually hidden in the /examples/jsm/postprocessing and not where they say in their documentation. |
Where are we with this? I think I'm waiting for some screenshots and some details about transparent backgrounds. No rush, just making sure no one is waiting for me? |
Uni is a bit busy right now, I'll start working on this again probably next week. Haven't sent screenshots coz I had some trouble getting the project to run on my vmware ubuntu and I don't have access to the macbook anymore |
No problem. If you're on windows, we have directions for setup on WSL2: https://github.com/google/model-viewer#windows-1011-setup if that helps. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey, tests passing, congrats! I'm going to go ahead and push a release before we merge this, since I'd like plenty of time for our users to find bugs through our docs pages before we release it. However, I also think we need to get pretty consistent rendering across browsers before we merge, or we'll get flooded with issues. Do you have access to any other test machines?
I do have a Mac air 2013 that I'll have access to next weekend, and maybe a Mac Pro (non M1) |
…viewer into post-processing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this one is ready, what do you think? With a PR of this magnitude I'm sure we could keep reviewing it forever, but I think I'd rather get it merged so users can test it out on our docs pages. And of course, further PRs are certainly welcome, and it'll make reviewing easier if they're separated.
I think it's ready as well! 🎆 |
Hello guys, |
@zelghrabi-edu Since I just released v3.1.1, I'm merging this now to make it easier to get feedback on. It'll be visible on modelviewer.dev, and you can pull the pre-release libraries by adjusting the URLs from https://modelviewer.dev/docs/faq.html#entrydocs-general-questions-api. |
@Beilinson FYI: https://twitter.com/modelviewer/status/1651007361862225921 Happy to mention you if you have a twitter handle. |
Thanks @elalish Thank you Best |
That would be nice! I'm part of a programmer collective @galaxyhuntersil . Thanks! |
Hey @Beilinson |
Hey @zelghrabi-edu, there are two main issues with implementing postprocessing effects on AR:
As such for now theres not too much to be done. Sorry :( |
More on WebXR iOS support: It is currently in an "experimental state", which is accessible through: It is disabled by default, and I am not sure how well it will work in the case of model-viewer, though it might be interesting to test. Additionally, apple has the RealityKit API for AR experiences on IOS, which does allow for custom postprocessing, however this is only for full on IOS apps, while browsers are limited to quick look which is not customizable. |
* Draft, began working on mixin and new rendering * first attempt at mixin and rendering with only bloom effect * updated imports * first attempt: working, but globally * switched post-processing libraries * better default settings * First iteration of enabling/disabling effects per scene * added effect map * Added basic docs * revert scenegraph docs changes * stash before pivot to webcomponent composition * effects-composer, pixelate-effect webcomponents * Created <model-viewer-effects> library, fixed bugs * updated package.json * Tests passing, dirtyRender for glitch, better custom Passes * added prepare back * Improved Glitch API, added BlendMode mixin * removed prefix, fixed SSAOEffect * Fixed SSAOEffect with transparency, tested three importmap * remove goldens from mve * Added no-three bundle to rollup, added test for image similarity * Better examples, easier to create custom effect component * . * fixed example * updated readme * depthWrite * added beforeRender callback * removed accidental styling changes from model-viewer * fixed double import issue * CR fixes, added selective bloom example with rocketship * removed browserstack from karma conf * improved screenshot tests * Added selective bloom effect * disconnect bug, rename to @google * updated versions, removed unneeded comments * Bootstrap works locally * updating dependencies * Tests passing, fixed bugs * added mve-docs, added msaa to effect-composer * Completed docs, fixed bugs * minor styling * fixed test * removed fxaa effect * update deps * improved string literal type safety * removed clearPass, fixed "empty" effectComposer * tonemapping + example (fixes bloom color) * minor fixes all around * fixed package-lock --------- Co-authored-by: Emmett Lalish <elalish@google.com>
Hi @Beilinson, I'm trying to introduce a new lit component to model-viewer and was looking at your changes as an example. I noticed that the main https://github.com/aardvarkk/model-viewer/blob/master/packages/model-viewer/src/template.ts Am I reading your design correctly? If yes, why did you decide to do it differently? |
Hi @samaneh-kazemi, I recommend that you read a bit about Lit (the web component library powering model-viewer and model-viewer-effects). The template is required only if you are adding or affecting dom elements in the document. Model-viewer-effects only adds behavior to model-viewer through JS, and does not require any template. |
Deals with #213, #210
I started working with the inbuilt three.js post-processing pipeline, but switched to the pmndrs/postprocessing library instead after seeing that it has a significant performance increase over the three.js, and seems to have a better developed API overall.
I however have come upon some issues for the implementation for the model-viewer (note, I use bloom-effect here in reference to any possible post-processing effect, as thats what I tested with)
<model-viewer ... bloom-effect></model-viewer
. then we have the following issue:If multiple modelviewer elements exist in the same window, the last one in the DOM decides whether or not bloom is activated:
As such, my current implementation only allows activating the effects, while disabling them has to be done manually through code. This isn't perfect though, would love some input on a better solution