Comments (2)
Theoretically it should be possible.
From a strict point of view, I think glTF specification discourages it because they consider glTF as the "jpg of 3D", so you could say that in a materials library only glTF. "there's nothing to view". But I don't think importers and exporters would complains much. At best you would simply have warnings when exporting/importing an empty scene.
Regarding KhronosGroup/glTF#1420 , glTF spec does not support referencing external components, but it's something I would not dislike to have, not only for materials, but also for meshes and animations too.
But, right now, there's only two ways of doing it:
- As they suggested, with extensions (which also means you would have to fork and tweak importers and exporters to suit your needs, not for the faint of heart)
- hack you engine, so when loading a glTF, replace the materials by name from another glTF.
From the point of view of SharpGLTF, it would be not too difficult to import a scene, convert the materials to MaterialBuilders, and export them individually, but it could be even easier if you simply load the Json DOM and simply remove every node except Textures, Images, Materials and so on.
from sharpgltf.
Thanks for answer!
I'm using currently SharpGLTF for creating from scratch some old materials from old game (UE2) to PBR-materials for importing to UE5, so variant with loading existing scene is not for me, unfortunately. Now Iām just deleting extra-nodes with JSON parser.
My proposal it's s let users adding MaterialBuilder to scene without creating meshes: something like a scene.AddMaterial(MaterialBuilder)
Btw gltf-validator successfully validating GLTF even with only one material node. And even more: Unreal engine 4/5 also importing this material to assets without problem.
Ty for your time and have a good day!
from sharpgltf.
Related Issues (20)
- Reflection Problems for Trimming HOT 15
- AttenuationDistance incorrect default value HOT 1
- [BUG] Extras data lost during load HOT 3
- Satellite image file name incorrect when the gltf file contains extra dot HOT 1
- [Question] Vertex Normals HOT 1
- [Feature request] Export image with its name rather than just the GLTF's name + number HOT 1
- Automaticaly Generate Normals HOT 1
- Expose accessor bounds
- FileLoadException in Navisworks plug-in HOT 3
- [enhancement] make LogicalBufferIndex field public in file gltf.BufferView.cs
- Use generated C# files from CodeGen HOT 6
- [Question] Mesh Vertex with UVW are exploded HOT 2
- CodeGen Tool generates JsonNode not the object itself HOT 1
- No tag for the alpha0031 release from nuget.org HOT 2
- [Questions] Some questions regarding correct procedure for reading HOT 6
- [BUG] VerifyAccessorBounds does not support component type other than FLOAT HOT 3
- Use FileStream to write json gltf HOT 5
- Mesh Extras not supporting custom encodersettings, to avoid special character serialization HOT 1
- CodeGen - Self referencing array in json schema results in stackoverflow HOT 3
- Should SharpGLTF throw an exception when an unsupported extension is required? HOT 5
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 sharpgltf.