question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Diffuse BSDF and use_nodes=False are not supported.

See original GitHub issue

Describe the bug

Materials colors are not exported

Taking this file

Cow.blend.zip

Exporting with the old exporter I get this

Screen Shot 2019-06-27 at 18 46 27

With the current export (cloned from the repo) I get this

Screen Shot 2019-06-27 at 18 46 52

To Reproduce Steps to reproduce the behavior:

  1. Download the attached file, unzip, double click the .blend file
  2. File->Export->glTF 2.0
  3. Export
  4. Load in a viewer

Expected behavior

There are material colors

Checking the gltf data the old exporter has this

    "materials" : [
        {
            "name" : "Black",
            "pbrMetallicRoughness" : {
                "baseColorFactor" : [
                    0.02327823673603291,
                    0.02327823673603291,
                    0.02327823673603291,
                    1.0
                ],
                "metallicFactor" : 0.0
            }
        },
        {
            "name" : "Pink",
            "pbrMetallicRoughness" : {
                "baseColorFactor" : [
                    0.640000066757203,
                    0.1408390542989828,
                    0.1733517791830268,
                    1.0
                ],
                "metallicFactor" : 0.0
            }
        },
        {
            "name" : "White",
            "pbrMetallicRoughness" : {
                "baseColorFactor" : [
                    0.6400000190734865,
                    0.6400000190734865,
                    0.6400000190734865,
                    1.0
                ],
                "metallicFactor" : 0.0
            }
        }
    ],

the new exporter only this

    "materials" : [
        {
            "name" : "White",
            "pbrMetallicRoughness" : {}
        },
        {
            "name" : "Black",
            "pbrMetallicRoughness" : {}
        },
        {
            "name" : "Pink",
            "pbrMetallicRoughness" : {}
        }
    ],

yes, export materials was checked

Version

  • OS: macOS
  • Blender Version 2.79

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (6 by maintainers)

github_iconTop GitHub Comments

2reactions
juliendurourecommented, Aug 16, 2019

@samanthajo2 @kocsis1david In blender, use_node is most of the time enable by default. You provided only .blend file, so I don’t know what file format you imported, and I can’t check what happpen at import level.

The aim of an exporter is not to export exactly what was imported, but to export what is inside Blender. If use_node is not checked, and render in blender, you will not see the same render than if use_node is checked. Exporter should take this into account to export was use can see when he renders. ( of course modulo specification of the file format, that can’t handle everything done in blender)

1reaction
scurestcommented, Jul 27, 2020

The title talks about Diffuse BSDFs, but the Cow.blend file only uses use_nodes=False. I filed #1148 to fix use_nodes=False.

If Diffuse BSDF needs to be exported, I think a separate issue should be filed with an example .blend.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Node editor - I do not have Diffuse BSDF node available. Why?
Being really new to rendering things, I have little knowledge no how things work in Blender (texturing/rendering wise).
Read more >
Diffuse BSDF — Blender Manual
The Diffuse BSDF node is used to add Lambertian and Oren-Nayar diffuse reflection. ... Lambertian reflection, higher values activate the Oren-Nayar BSDF.
Read more >
Blender 2.93 | Diffuse BSDF node | Basics - YouTube
Blender 2.93- Diffuse BSDF node - BasicsThe Diffuse BSDF node is used to add Lambertian and Oren-Nayar diffuse reflection.
Read more >
Is mixing Diffuse BSDF and Emission possible? - Blender Artists
I've tried some combinations of nodes that seemed logical in my mind but nothing works. Is this just not a possible effect to...
Read more >
Basic Shaders - Learning Blender: A Hands-On Guide to ...
How can you add shaders to a material? When you add a new material, in the Surface panel you'll see a Diffuse BSDF...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found