Announcement

Collapse
No announcement yet.

converting to nodes error

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • converting to nodes error

    I am getting an error converting materials/ textures to nodes. I'll try to get a small sample file together. Here is the error text:

    V-Ray For Blender Converting material SW_7004_Snowbound
    Exception = 'KeyError' 'bpy_prop_collection[key] key Fog Color not found'
    Traceback =
    File CProgram FilesBlender 2.75 (With V-Ray Additions)2.75scriptsaddons
    vb30compatoperators.py, line 46, in execute
    convert.ConvertScene(context.scene)
    File CProgram FilesBlender 2.75 (With V-Ray Additions)2.75scriptsaddons
    vb30compatconvert.py, line 1519, in ConvertScene
    ConvertObject(scene, ob)
    File CProgram FilesBlender 2.75 (With V-Ray Additions)2.75scriptsaddons
    vb30compatconvert.py, line 1397, in ConvertObject
    ConvertMaterial(scene, ob, ma, textures)
    File CProgram FilesBlender 2.75 (With V-Ray Additions)2.75scriptsaddons
    vb30compatconvert.py, line 1347, in ConvertMaterial
    baseBRDF.inputs['Fog Color'].value = oldPropGroup.fog_color

  • #2
    sample scene
    Attached Files

    Comment


    • #3
      Thanks for the fix Andrey! Working great now

      Comment


      • #4
        hi sir, where canwe find the convertor? thanks

        Comment


        • #5
          It's part of the program. Look in the scene tab for the tool to convert the materials.
          Attached Files

          Comment


          • #6
            thanks, andybot_cg

            I find a bug with the convertor
            1. import this obj file
            2. run the material convertor
            3. I get
            Code:
            V-Ray For Blender:   Texture "Bump.002" {IMAGE:NONE}
            V-Ray For Blender: Converting material: button
            Exception => 'KeyError': 'bpy_prop_collection[key]: key "Bump Amount Texture" not found'
            Traceback => File "E:\greensoft\3d\blender\Blender 2.76 (With V-Ray Additions)\2.76\scripts\addons\vb30\compat\operators.py", line 46, in execute convert.ConvertScene(context.scene)
              File "E:\greensoft\3d\blender\Blender 2.76 (With V-Ray Additions)\2.76\scripts\addons\vb30\compat\convert.py", line 1519, in ConvertScene     ConvertObject(scene, ob)
              File "E:\greensoft\3d\blender\Blender 2.76 (With V-Ray Additions)\2.76\scripts\addons\vb30\compat\convert.py", line 1397, in ConvertObject
                ConvertMaterial(scene, ob, ma, textures)
              File "E:\greensoft\3d\blender\Blender 2.76 (With V-Ray Additions)\2.76\scripts\addons\vb30\compat\convert.py", line 1316, in ConvertMaterial
                mainBRDF.inputs['Bump Amount Texture'].value = _getBumpAmount(ma)

            Comment


            • #7
              The converter isn't working again! converting from internal blender materials gives an error and stops working when textures are present in the materials. This had been fixed back in March, but the builds for the past few months have been broken.

              Code:
              V-Ray For Blender: Executing operator: "Convert To Nodes"
              V-Ray For Blender: Converting from Blender Internal: _1
              V-Ray For Blender: Converting from Blender Internal: _10
              V-Ray For Blender: Converting from Blender Internal: _11
              V-Ray For Blender: Converting from Blender Internal: _2
              V-Ray For Blender: Converting from Blender Internal: _3
              V-Ray For Blender: Converting from Blender Internal: _5
              V-Ray For Blender: Converting from Blender Internal: GLASS_offc
              V-Ray For Blender: Converting from Blender Internal: Material
              V-Ray For Blender: Converting from Blender Internal: Material12
              V-Ray For Blender: Converting object: barrel-house-3D-study-photo2b
              V-Ray For Blender: Converting material: _11
              V-Ray For Blender: Converting material: GLASS_offc
              V-Ray For Blender: Converting material: _2
              V-Ray For Blender: Converting material: _1
              V-Ray For Blender: Converting material: _3
              V-Ray For Blender:   Texture "Kd" {IMAGE:NONE}
              V-Ray For Blender: Converting material: _10
              V-Ray For Blender: Found texture "Layered Texture" for attr "diffuse"
              Exception => 'KeyError': 'bpy_prop_collection[key]: key "Output" not found'
              Traceback =>
                File "C:\Program Files\Blender 2.76 (With V-Ray Additions)\2.77\scripts\addons
              \vb30\compat\operators.py", line 46, in execute
                  convert.ConvertScene(context.scene)
                File "C:\Program Files\Blender 2.76 (With V-Ray Additions)\2.77\scripts\addons
              \vb30\compat\convert.py", line 1519, in ConvertScene
                  ConvertObject(scene, ob)
                File "C:\Program Files\Blender 2.76 (With V-Ray Additions)\2.77\scripts\addons
              \vb30\compat\convert.py", line 1397, in ConvertObject
                  ConvertMaterial(scene, ob, ma, textures)
                File "C:\Program Files\Blender 2.76 (With V-Ray Additions)\2.77\scripts\addons
              \vb30\compat\convert.py", line 1339, in ConvertMaterial
                  CreateTextureNodes(nt, baseBRDF, textures)
                File "C:\Program Files\Blender 2.76 (With V-Ray Additions)\2.77\scripts\addons
              \vb30\compat\convert.py", line 754, in CreateTextureNodes
                  texNode = tex.createNode(ntree)
                File "C:\Program Files\Blender 2.76 (With V-Ray Additions)\2.77\scripts\addons
              \vb30\compat\convert.py", line 727, in createNode
                  texLayeredNode, texSockName
                File "C:\Program Files\Blender 2.76 (With V-Ray Additions)\2.77\scripts\addons
              \vb30\compat\convert.py", line 423, in _connectNodes
                  outputNode.outputs[outSockName],

              Comment


              • #8
                This error is still in all the current builds I have an old build installed on one of my machines just so I can use the converter. Otherwise, converter stops every time when encountering a linked texture.

                Comment


                • #9
                  This is still an issue in the latest builds. It seems the converter stops and is not able to connect all the nodes. When it gets to the first linked texture it stops. Here's the error report, and here's what the incomplete node tree looks like when it stops (the nodes are initially all on top of one another, I moved them apart for clarity.) This same file converts fine in a 2.77 Blender build from March 2016 (vrayblender3-2.77-842478a-x86_64-windows.exe)

                  Code:
                    (  0.1100 sec |   0.1100 sec) Finished importing: '(..path..)\\Booklight_M_2_test_cover.obj'
                  Progress: 100.00%
                  
                  V-Ray For Blender: Executing operator: "Convert To Nodes"
                  V-Ray For Blender: Converting from Blender Internal: _Gray_
                  V-Ray For Blender: Converting from Blender Internal: _Ivory_
                  V-Ray For Blender: Converting from Blender Internal: _SaddleBrown_
                  V-Ray For Blender: Converting from Blender Internal: FrontColor
                  V-Ray For Blender: Converting from Blender Internal: SW_6133_Muslin
                  V-Ray For Blender: Converting object: Booklight_M_2_test_cover
                  V-Ray For Blender:   Texture "Kd" {IMAGE:NONE}
                  V-Ray For Blender: Converting material: SW_6133_Muslin
                  V-Ray For Blender: Found texture "Layered Texture" for attr "diffuse"
                  Exception => 'KeyError': 'bpy_prop_collection[key]: key "Output" not found'
                  Traceback =>
                    File "C:\Program Files\Chaos Group\Blender 2.78 (With V-Ray Additions)\2.78\sc
                  ripts\addons\vb30\compat\operators.py", line 46, in execute
                      convert.ConvertScene(context.scene)
                    File "C:\Program Files\Chaos Group\Blender 2.78 (With V-Ray Additions)\2.78\sc
                  ripts\addons\vb30\compat\convert.py", line 1519, in ConvertScene
                      ConvertObject(scene, ob)
                    File "C:\Program Files\Chaos Group\Blender 2.78 (With V-Ray Additions)\2.78\sc
                  ripts\addons\vb30\compat\convert.py", line 1397, in ConvertObject
                      ConvertMaterial(scene, ob, ma, textures)
                    File "C:\Program Files\Chaos Group\Blender 2.78 (With V-Ray Additions)\2.78\sc
                  ripts\addons\vb30\compat\convert.py", line 1339, in ConvertMaterial
                      CreateTextureNodes(nt, baseBRDF, textures)
                    File "C:\Program Files\Chaos Group\Blender 2.78 (With V-Ray Additions)\2.78\sc
                  ripts\addons\vb30\compat\convert.py", line 754, in CreateTextureNodes
                      texNode = tex.createNode(ntree)
                    File "C:\Program Files\Chaos Group\Blender 2.78 (With V-Ray Additions)\2.78\sc
                  ripts\addons\vb30\compat\convert.py", line 727, in createNode
                      texLayeredNode, texSockName
                    File "C:\Program Files\Chaos Group\Blender 2.78 (With V-Ray Additions)\2.78\sc
                  ripts\addons\vb30\compat\convert.py", line 423, in _connectNodes
                      outputNode.outputs[outSockName],
                  attached sample .obj file
                  Attached Files

                  Comment


                  • #10
                    I would really like a working shader converter. I am still getting an error when I try to convert from internal Blender with linked textures. If the converter does get fixed, I would like it to convert to a standard material, with the image file node. Example below is the last build with a working converter, and next is the desired cleaned up import result. Error log as follows.

                    Code:
                    V-Ray For Blender: Executing operator: "Convert To Nodes"
                    V-Ray For Blender: Converting from Blender Internal: SW_6133_Muslin
                    V-Ray For Blender: Converting object: Booklight_M_2_test_cover_Main-SW_6133_Musl
                    in
                    V-Ray For Blender:   Texture "Kd" {IMAGE:NONE}
                    V-Ray For Blender: Converting material: SW_6133_Muslin
                    V-Ray For Blender: Found texture "Layered Texture" for attr "diffuse"
                    Exception => 'KeyError': 'bpy_prop_collection[key]: key "Output" not found'
                    Traceback =>
                      File "C:\Program Files\Chaos Group\Blender 2.78 (With V-Ray Additions)\2.78\sc
                    ripts\addons\vb30\compat\operators.py", line 46, in execute
                        convert.ConvertScene(context.scene)
                      File "C:\Program Files\Chaos Group\Blender 2.78 (With V-Ray Additions)\2.78\sc
                    ripts\addons\vb30\compat\convert.py", line 1519, in ConvertScene
                        ConvertObject(scene, ob)
                      File "C:\Program Files\Chaos Group\Blender 2.78 (With V-Ray Additions)\2.78\sc
                    ripts\addons\vb30\compat\convert.py", line 1397, in ConvertObject
                        ConvertMaterial(scene, ob, ma, textures)
                      File "C:\Program Files\Chaos Group\Blender 2.78 (With V-Ray Additions)\2.78\sc
                    ripts\addons\vb30\compat\convert.py", line 1339, in ConvertMaterial
                        CreateTextureNodes(nt, baseBRDF, textures)
                      File "C:\Program Files\Chaos Group\Blender 2.78 (With V-Ray Additions)\2.78\sc
                    ripts\addons\vb30\compat\convert.py", line 754, in CreateTextureNodes
                        texNode = tex.createNode(ntree)
                      File "C:\Program Files\Chaos Group\Blender 2.78 (With V-Ray Additions)\2.78\sc
                    ripts\addons\vb30\compat\convert.py", line 727, in createNode
                        texLayeredNode, texSockName
                      File "C:\Program Files\Chaos Group\Blender 2.78 (With V-Ray Additions)\2.78\sc
                    ripts\addons\vb30\compat\convert.py", line 423, in _connectNodes
                        outputNode.outputs[outSockName],
                    Attached Files

                    Comment

                    Working...
                    X