Comments (9)
Yes, I could modulate the effect by fog. This feature will be added in the next update.
from n8ao.
Fog has been added - let me know if its working.
from n8ao.
Nice one! It's working perfectly and blending in with the fog.
However there does appear to be a new side effect when working with the pmndrs post processing library using a bloom pass.
Previously I would do a renderPass, then the N8AOPostPass then the post processing effect pass that contained a bloom effect and it all worked together well but the AO effect just displayed over the fog.
Now with the same workflow the AO effect blends in perfectly with the fog, but it seems to disable the bloom effect, the other post processing effect passes still seem to work and there is no error shown in the console.
Not sure if this is actually an issue, but I thought I'd let you know.
Below is a link to my WIP game which has the effects applied.
https://swimmy-fish.lukethompson.com.au/#debug
Let me know if it would be useful and I'll create a minimum example to reproduce the behaviour.
from n8ao.
![Screen Shot 2023-06-13 at 11 31 23 AM](https://private-user-images.githubusercontent.com/43304488/245529328-4d1c8d28-fb41-4f7c-9e8f-94afc06918a7.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MjQzNjc4NTksIm5iZiI6MTcyNDM2NzU1OSwicGF0aCI6Ii80MzMwNDQ4OC8yNDU1MjkzMjgtNGQxYzhkMjgtZmI0MS00ZjdjLTllOGYtOTRhZmMwNjkxOGE3LnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNDA4MjIlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjQwODIyVDIyNTkxOVomWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWMxYzQyMGI2YWU2YzI4ODQzNWYzMWUxNjFkNmM2ZjJiNmQyOTdlZDQ4NzI0NmNjNDg4MjRiZmNkOTAyMTk3MzYmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0JmFjdG9yX2lkPTAma2V5X2lkPTAmcmVwb19pZD0wIn0.McUDr1CzYFiJzkGqOdXz7OYsqVSRYOVT6N0VqmR5ye8)
A minimal example would be helpful!
from n8ao.
Try - instead of this:
this.effectPass = new gD(this.camera,this.aaEffect,this.brightnessContrastEffect,this.bloomEffect),
This:
this.effectPass = new gD(this.camera,this.brightnessContrastEffect,this.bloomEffect, this.aaEffect),
As the AA effect should come after everything.
BTW this works with the latest version:
const composer = new EffectComposer(renderer);
composer.addPass(new RenderPass(scene, camera));
const n8aopass = new N8AOPostPass(
scene,
camera,
clientWidth,
clientHeight
);
composer.addPass(n8aopass);
composer.addPass(new EffectPass(camera, new BloomEffect({
luminanceThreshold: 0.0,
intensity: 5.0
}), new SMAAEffect({
preset: SMAAPreset.ULTRA
})));
from n8ao.
Thank you for that. I see what the difference is now.
I'm using a selective bloom technique where I set the bloom effect luminance threshold to 1 and then set the materials I want bloom on to be toneMapped: false
and the emissiveIntensity
to a high value like 8. Then only those objects will have the bloom effect applied. Could it be that because the N8aopass goes first it renders a tone mapped output or some other way of clipping the colours back into the normal range of 0 - 1?
If you try this code sandbox and comment out the aoPass on line 79 you will see the bloom effect is visible again.
https://codesandbox.io/s/sparkling-cdn-qslj6y?file=/src/index.js
from n8ao.
N8AO uses non-float render targets... that could definitely be the problem. Next update (will be released tonight/early tmrw) will add support for floating render targets.
from n8ao.
Should be fixed now.
from n8ao.
Yep, it's working great. Thanks so much really appreciate the great work and fast updates!
from n8ao.
Related Issues (20)
- Turning on HalfRes on a Samsung A32 turns a part of the scene black/dark HOT 15
- Issues w/ AO at large distances from the origin HOT 6
- excluding objects HOT 4
- when camera far number too big have some problem... HOT 3
- hi, I'm here again... I found that an object that is very far away from the camera turns black.... HOT 19
- N8AO + Bloom doesn't work when multisampling enabled HOT 7
- Hi, I just found out when open halfRes with true, the ao in map also have some same problem.... HOT 5
- AO from single side materials HOT 1
- Colors issue with THREE.js r156 HOT 12
- Shader errors? HOT 7
- Option to accumulate over multiple frames HOT 10
- AO Visible in Direct Light HOT 2
- Incompatible with ThreeJS Helpers HOT 3
- Debug Mode Question / Issue HOT 2
- Fragment shader error resulting in black objects HOT 3
- THREE.WebGLMultipleRenderTargets has been deprecated and will be removed in r172. Use THREE.WebGLRenderTarget and set the "count" parameter to enable MRT. HOT 2
- My buffer is not being cleared HOT 1
- v167 Deprecates LinearTosRGB HOT 2
- AO receiver but not casting HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from n8ao.