Open quacrobat opened 2 years ago
And what seems like a very useful video on the subject: Creating a glTF-compatible Blender material from a set of PBR textures https://www.youtube.com/watch?v=70LRKp54zIc
and a more detailed one here: Highlight: Making a glTF-compatible material from scratch in Blender https://www.youtube.com/watch?v=YFV33iCXXmo
hello, any way to fix this?
I'll start looking into this. Real life and other projects have kept me away.
After some cursory testing, it looks like it has something to do with the custom node groups that make up the materials. Exporting with a shader directly connected to output gives me that color, but using a node group gives me all grey.
I'll keep experimenting to find out for sure.
thanks for taking the time! happy holidays :)
On Wed, Dec 28, 2022, 05:04 cuddlyogre @.***> wrote:
After some cursory testing, it looks like it has something to do with the custom node groups that make up the materials. Exporting with a shader directly connected to output gives me that color, but using a node group gives me all grey.
I'll keep experimenting to find out for sure.
— Reply to this email directly, view it on GitHub https://github.com/cuddlyogre/ExportLDraw/issues/30#issuecomment-1366350699, or unsubscribe https://github.com/notifications/unsubscribe-auth/AA673BLQ3AOTPG3QECUE74TWPO34LANCNFSM6AAAAAARACIGKY . You are receiving this because you authored the thread.Message ID: @.***>
After some cursory testing, it looks like it has something to do with the custom node groups that make up the materials. Exporting with a shader directly connected to output gives me that color, but using a node group gives me all grey.
I'll keep experimenting to find out for sure.
yes, perhaps the damage is already done at import time, when the LDraw colors are converted into node materials. An option toggle to import as an alternative node setup may be simpler than trying to change the nodes types at export time. What do you think?
After reading more, this isn’t an uncommon issue and it does appear my material setup is too complex for the exporter.
I’ll experiment with a way to simplify the node setup.
Happy New Year! Did you find time to look into this @cuddlyogre?
The only solution I could find is flattening the material node structure. I'm working on a dynamic programming solution so that I don't have to change the materials.
Hello, bump :)
I haven't forgotten. The different ways I could find to do it haven't really panned out. I'm still working on it though.
no worries, thanks for your quick reply!
Congrats on the new release! does it fix the materials export to gltf issue?
Unfortunately no. The gltf exporter doesn't seem to process anything but the principled bsdf shader, so it all still comes out grey. The best I could manage to export is the solid color with some shininess and some transparency. The end result isn't great, so I shelved it until maybe the gltf exporter improved, which is doesn't appear to have.
If you are only looking for basic colors and some specular and maybe transparency, it appears to be doable. If you're looking for materials with anything more than that, I don't think it's doable without having to do a lot of work by hand per part.
I was able to uv unwrap some parts using the sharp edges as a starting point. From there I baked a diffuse and normal texture and exported, set up a material to use them, and the visual results were pretty good. The origin of the object is at 0,0,0 though, so you'd need to sort that out if you're exporting a scene.
wow, that's a lot of work, thanks!
Hi, great work on this plugin, thank you.
One issue I found is when attempting to export imported LDraw models to glTF (using the default gltf importer/exporter), the colors/materials are not exported or at least are not read by any glTF viewer. According to the Blender glTF IO docs at https://docs.blender.org/manual/en/3.3/addons/import_export/scene_gltf2.html:
and
Would you consider adding something like a "Convert to glTF compatible materials" toggle in import options?
Thanks :)