Comments (11)
I tried that in a local copy and yes that "fixes" the issue (now the cubemap version looks the same as the equirectangular a-sky version). I think the question now is if sRGBEncoding should be default, up to you.
from aframe-cubemap-component.
Those discussions make it sound like texture.encoding = THREE.sRGBEncoding;
should be the default, but when I tried it with the Yokohama example the resulting cubemap was darker than the original image:
Left is the original image, right is the rendered cubemap.
from aframe-cubemap-component.
For comparison, here is the current code (without texture.encoding = THREE.sRGBEncoding;
).
Left is the original image, right is the rendered cubemap.
from aframe-cubemap-component.
I can certainly make texture encoding a property though.
from aframe-cubemap-component.
Good points all around, yes a property probably makes the most sense
from aframe-cubemap-component.
Did some more reading into this and found A-Frame's renderer has a colorManagement property that balances the darkness brought by texture.encoding = THREE.sRGBEncoding;
.
<a-scene renderer="colorManagement: true">
<a-entity cubemap="folder: /assets/Yokohama3/"></a-entity>
</a-scene>
I still think making texture encoding a property is the way to go, but maybe A-Frame will make colorManagement: true
the default some day.
from aframe-cubemap-component.
Looks good! Thanks for digging in to that, and your new example showing what happens with colorManagement: true
on the scene while using sRGBEncoding is helpful and accurate as far as I know.
In fact, it appears that when colorManagement: true
, the A-Frame core material handlers use a helper applyColorCorrection
function to set textures to sRGBEncoding, like in this example.
from aframe-cubemap-component.
In fact, it appears that when
colorManagement: true
, the A-Frame core material handlers use a helperapplyColorCorrection
function to set textures to sRGBEncoding, like in this example.
Oh interesting! Instead of an encoding
property, we could retrieve the renderer system and apply color correction automatically just like the core library. I think this would actually be better!
Thanks for those links!
from aframe-cubemap-component.
from aframe-cubemap-component.
Yes this looks great! I didn't test it but the logic seems right. I can test a little later or after you commit those changes.
from aframe-cubemap-component.
Yes this looks great! I didn't test it but the logic seems right. I can test a little later or after you commit those changes.
Cool.
I'll merge it in--we can patch it later if you find it's not working correctly.
from aframe-cubemap-component.
Related Issues (17)
- The cubemap component doesn't support multi-cubemap in a scene HOT 3
- Support for A-Frame asset loader syntax for cubemaps HOT 8
- Transparency is broken HOT 1
- Race condition in component updates
- npm install HOT 3
- Fix minification/update build system
- Yokohama example didn't work HOT 2
- visible edges HOT 4
- Is the name of events in the readme wrong? HOT 1
- negx.jpg is not rendered in yokohama example on MacOS Chrome? HOT 2
- Fix live demos (GH pages) HOT 1
- 'Fade' demo is broken HOT 1
- Transparency doesn't seem to work? HOT 3
- needed: fade effect when a new cubemap is loaded HOT 6
- Does it support stereo cubemap ? HOT 2
- Update for threejs v111 (A-Frame 1.0.1+) 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 aframe-cubemap-component.