Comments (8)
Stingray PBS is far and beyond the best result in general -- but yes, I definitely want the conversion to work, so I'm grateful for the .fbx that shows it failing.
from fbx2gltf.
I was just taking too many liberties with the conversion. I suspect I should just throw Phong -> PBR out. But until I can dig into it more thoroughly, I've bastardised the expressions I was using, kind of randomly, with the result being fairly reasonable:
from fbx2gltf.
I'll take a look at this shortly. That said -- does the texture actually work when you try to render the model? I noticed recently that I always write four-channel PNGs, which is pretty silly since it'll render them transparent in an image viewer. I'll file an issue to fix that, too, ASAP. :)
from fbx2gltf.
from fbx2gltf.
First of all, I should say, you're running into some very newly written code and it's not well tested. I appreciate the feedback & especially supplying me with a model to duplicate the problem.
But also you're running into a fundamental problem that's explained in the Readme in some detail.
GLTF 2.0 is a PBR format. There is no built-in support for traditional materials such as Phong, which this model uses. The converter tries to convert old textures, like a straight diffuse, to something that'll work okay in PBR. That's why it doesn't just copy. It does some pretty fancy calculations to come up with baseColor (albedo), roughness and metalness.
Clearly something in that process is going wrong, though, cause the whole point is that it should come up with something fairly close to the original. I will dig in later and try to work out what's failing, hopefully tonight, but I can't make promises -- it's mostly a hobby project. :)
from fbx2gltf.
Ah, thanks for the info. I'm exporting from Maya LT, so given what you said about having to convert from Phong I thought I would try the Stingray PBS material. Unfortunately the FBX export does something weird with the texture maps. I'll dig into this workflow a bit more.
Anywho, thanks a ton for the tool and for looking into this.
from fbx2gltf.
I take that last comment back, using Stingray PBS does fix the problem. That's a pretty good solution for me, though it would of course be great if it worked magic on the older materials.
from fbx2gltf.
Did a bit more digging -- this isn't a coding error, it's a problem with the underlying equations, or with how I use them here. In practice, what happens is there is no specular map; specularFactor is 1, 1, 1, 0, which means a 100% metallic material, which in turn means baseColor is entirely composed of the specular contribution, is... (1, 1, 1, 0), basically. I'm not sure what can be salvaged here -- maybe the whole silly idea was not just silly, but doomed.
from fbx2gltf.
Related Issues (20)
- Windows Build - upload new release or fix build instructions
- 2.32GB FBX model causes FBX2glTF to stall until it's killed by the OOM killer
- Linux binary won't start HOT 1
- Convert issue.
- couldn't get command line FBX2glTF to work HOT 1
- macOS install error HOT 1
- Is this still work/compile? HOT 1
- Animation gets displaced towards down HOT 1
- How do I build under Windows?
- unsupported transform inheritance type 'eInheritRrSs'
- Using FBX2glTF.exe to convert FBX to GLTF format, the resulting character material is brighter and the model size is reduced by 100 times
- Can't get materials
- Running from node-alpine HOT 1
- FB_ngon_encoding (quads in glTF) HOT 2
- The file name contains Chinese format conversion support HOT 1
- KHR_lights_punctual lights missing lights BUG
- Naming of buffer.bin causes problems
- Warning: node /RootNode/Model uses unsupported transform inheritance type 'eInheritRrSs'. (Further warnings of this type squelched.) HOT 1
- How does the source code compile and install under centOS?
- windows has a compilation problem
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 fbx2gltf.