Comments (6)
UnityGLTF-Smoothness2Roughness-Test.zip (2022.3.17f1)
@hybridherbst I'm including a zip with a testing project. It contains a scene with a simple quad using the URP/Lit material with a plain metallic-smoothness map (metallic set to 1 and smoothness to 0.2). The project contains the dev branch of UnityGLTF as an embedded local package in the Packages folder, with no modifications (except a test Debug.Log to see when we use the gloss-roughness swap material to process a texture).
I did two glTF exports of the quad that you can find in the Assets/_Exports
folder:
- CurrentExport: the quad exported with no modifications on the UnityGLTF package. Put it on the scene and compare to the original quad, you will see how the roughness looks different.
- FixedExport: he quad exported with the
GammaToLinearSpace
line removed from the shader. It looks identical to the original quad. - GLB-Export: for some reason GLB exports are not using the shader so removing the line will do nothing here. GLB exports are also exporting the roughness incorrectly.
Screenshots of original vs current vs fixed exports:
Original | Current Export | Fixed Export |
---|---|---|
![]() |
![]() |
![]() |
Notes: I cannot share the models that I used originally to debug this issue, but I would like to mention that in that case the roughness difference is huge (a character with a really glossy skin when exported). For that project I used the latest Unity 2021 LTS.
from unitygltf.
I can confirm that the issue is fixed in the latest HEAD from the dev branch. Thank you so much!
from unitygltf.
it always outputs an incorrect map
The colorspaces for exported textures have underwent pretty rigorous testing for linear color space correctness, including automated tests. Could you add a model where you see that issue and a video of it? Thanks!
We will also triple check the tests here to ensure nothing new has crept in.
from unitygltf.
Will try to provide the models this week, but may delay to next. Anyways I want to point out that the returned color by the tex2D sampler method will always be in linear space when the project is set to linear mode. So it really makes no sense to make the GammaToLinearSpace correction here (maybe it should be at the other side of the #ifdef?)
from unitygltf.
Hey, can you please retest it with the new latest version?
I tested it with your sample and it seems to works fine now :)
from unitygltf.
Happy to hear :)
from unitygltf.
Related Issues (20)
- 'Texture2D' does not contain a definition for 'isDataSRGB' HOT 10
- Encounter object export errors when using package HOT 5
- Timeline for implementing KHR_interactivity? HOT 1
- Creating animation on runtime, from scratch HOT 10
- ShaderGraph dependency problem for OpenUPM install HOT 5
- how to get progress (while loading) runtime.? HOT 2
- Incorrect material texture offset value on KTX2-based compressed GLB import HOT 2
- KtxTexture AssertionException HOT 5
- Textures are loading twice in memory causing doubled CPU spike and memory usage HOT 15
- Shaders don't mark any exposed properties as "Main Color" HOT 2
- Default range for imported punctual lights is too high. HOT 2
- KHR_materials_anisotropy support HOT 1
- Freeze frame during runtime loading in Android HOT 6
- Fix Suggenstion for HDRP
- Only 4 bone weights per vertex exported/imported when Unity supports up to 256 HOT 2
- Mesh with tangents has validation errors and breaking compression HOT 7
- How to load glb as byte[] or MemoryStream
- i build and run my unity project and i found only pink object. if someone know please help me. HOT 7
- Issues building for runtime loading HOT 2
- File Names are wrong HOT 1
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 unitygltf.