Comments (6)
hi @MaticDiba, I'm not well versed in THREE to know for sure. But it seems like it's some Color Space issue. Are you sure both Stackblitz use the same THREE.js version? In some later version, THREE.js has ColorManagement automatically. On the Angular version, you can try using the following inputs on ngt-canvas
to test it out: legacy
, linear
, and flat
from angular-three.
from angular-three.
Hi again, I just tested this the new Angular Three (in a different repo, different package, still in beta) https://stackblitz.com/edit/angular-three-demo-template-6c2vs4?file=package.json,src%2Fmain.ts,src%2Fapp%2Fscene.component.ts,src%2Fapp%2Fapp.component.ts
Also, I tested the same setup with React Three Fiber (https://docs.pmnd.rs/react-three-fiber/getting-started/introduction) and they seem to have the same output (https://codesandbox.io/s/youthful-solomon-u5i314?file=/src/App.js)
Both Angular Three and React Three Fiber have automatic color management (and rely on THREE.js ColorManagement prop)
Thoughts?
from angular-three.
Thanks for your fast replay :)
I think that using all three: legacy linear flat
are getting closer to the result. But still not there.
I guess I would need to somehow figure it out how to achieve the same coloring with automatic color management. I am quite fresh with Threejs.
from angular-three.
@MaticDiba it is easier to rewrite your example with vanilla JS without any framework then use my R3F codesandbox and ask about the issue in React Three Fiber github discussion. I think you'd get better answers there than here
from angular-three.
@MaticDiba I think I figured out the differences but it doesn't apply to the current version of Angular Three. The new Angular Three (from Stackblitz I shared above) DOES apply. I just wanted to let you know the differences so you're aware
Both Angular Three and React Three Fiber set up some defaults:
ColorManagement.legacyMode = false
on THREE.js 0.139 and olderWebGLRenderer.outputEncoding = THREE.sRGBEncoding
WebGLRenderer.toneMapping = THREE.ACESFilmicToneMapping
On this Stackblitz (https://stackblitz.com/edit/angular-three-demo-template-6c2vs4?file=package.json,src%2Fmain.ts,src%2Fapp%2Fscene.component.ts,src%2Fapp%2Fapp.component.ts), you can add [linear]=true
to change the outputEncoding
and [flat] = true
to change the toneMapping
. Then the result will be the same as the plain THREE.js sample. However, please be advised that the defaults Angular Three (and React Three Fiber) sets are to provide more correctness to the color space.
https://threejs.org/docs/#manual/en/introduction/Color-management
from angular-three.
Related Issues (20)
- Support for threejs r141 HOT 4
- Error: export 'XRRigidTransform' (imported as 'XRRigidTransform') was not found in 'three' HOT 4
- [Feature] Method to remove physics body HOT 1
- [Bug?/Feature] Missing loader objects HOT 5
- [Bug] Objects not added to scene after Enter VR on Oculus Quest HOT 1
- NgtPrimitiveModule not working. "'ngt-primitve' is not a known element" HOT 5
- Angular 14 support HOT 5
- THREE.WebGLRenderer: Context Lost. HOT 1
- 6.0.0-beta HOT 5
- Missing LUT3DEffect error HOT 4
- Cannon JS problem HOT 1
- How to import an glb object with no gemotery prop in node HOT 2
- Can't access useBody internal UUID when adding constraints against instance mesh bodies HOT 2
- NgtSobaOrbitControls missing update HOT 2
- QUESTION: Porting/Wrapping different physics engine "Force Directed layout in 3D" as a new component HOT 2
- THREE.MeshStandardMaterial: 'Uniform' is not a property of this material issue HOT 1
- Cannot load two same GLTF models in component HOT 1
- Bug - Soba Text whiteSpace
- How to deal with the disappearance of gizmo after adding NgtEffectComposer effects? HOT 2
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 angular-three.