Announcement

Collapse
No announcement yet.

Simple material converter

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

  • Simple material converter


    Convert Blender render materials to Vray material nodes.

    Supported with image textures: diffuse,specular, alpha, emit, bump, normal
    Supported without image textures: diffuse, alpha, emit
    Download script: https://github.com/JuhaW/VrayMaterialConvert


    Example: Sketchup model imported to Blender, not my modeling. Click image for larger version  Name:	Sketchup.effectsResult.jpg Views:	2 Size:	257.1 KB ID:	954461
    Click image for larger version  Name:	87577d0fb8.jpg Views:	1 Size:	231.7 KB ID:	954466
    Last edited by JuhaW; 01-06-2017, 03:17 PM.
    Win7 Ultimate 64bit, GTX 970, Standalone version: V-Ray Next 4.30.03,

  • #2
    Awesome! This looks to be very useful. Can you explain the usage? For some reason it's not showing up where I expect it to when I install it. Is it supposed to add an entry in the Render Layers panel under Node Tools? It's blank for me.

    Comment


    • #3
      Its that __init__.py file, download it, load or copy/paste into Blender text editor and run it.
      Win7 Ultimate 64bit, GTX 970, Standalone version: V-Ray Next 4.30.03,

      Comment


      • #4
        Ah, I thought it was like your other addons that made a button in the tools. I ran the script on a file that is a sketchup file, converted to obj, and imported into Blender. I got the following error. Is there a different import method you use for SU files? I use obj format so when I import I can use "Keep Vert Order" to make it all one mesh (instead of hundreds of component meshes)

        Code:
        Traceback (most recent call last):
          File "__init__.py", line 177
        , in <module>
        
          File "__init__.py", line 87,
         in textures_image
            def AddAttributes(plugin, pointerProp):
          File "__init__.py", line 20,
         in nodetree_create
            # along with this program.  If not, see <http://www.gnu.org/licenses/>.
        TypeError: BlendDataNodeTrees.new(): error with argument 2, "type" -  enum "VRay
        NodeTreeMaterial" not found in ('TextureNodeTree', 'ShaderNodeTree', 'Compositor
        NodeTree')
        Error: Python script fail, look in the console for now...

        Comment


        • #5
          I use Pcon Planner importing .skp files, then export .fbx or .obj and import Blender.
          I have noticed problem with .fbx file, normal maps are gone when importing Blender and importing .obj file normal maps are there but they are handled as bump maps because Textures > Image sampling > Normal map is ticked off.

          Seems that you are running the script vanilla Blender build ?
          Last edited by JuhaW; 02-06-2017, 08:03 AM.
          Win7 Ultimate 64bit, GTX 970, Standalone version: V-Ray Next 4.30.03,

          Comment


          • #6
            How do you get anything more than diffuse maps from SU? Does the Pcon Planner software convert a specific renderer's material info?

            Originally posted by JuhaW View Post
            Seems that you are running the script vanilla Blender build ?
            Yes, just the straight V-Ray install.

            Comment


            • #7
              Diffuse and reflection colors and transparency. Could you upload .blend with material where material convert gives error ?
              Win7 Ultimate 64bit, GTX 970, Standalone version: V-Ray Next 4.30.03,

              Comment


              • #8
                This file for example: https://forums.chaosgroup.com/forum/...173#post746173

                The internal converter was working at one point, but not lately (like since version 2.77)

                Originally posted by JuhaW View Post
                Diffuse and reflection colors and transparency
                How would this get applied in Sketchup? Native SU only has diffuse.
                Last edited by andybot_cg; 02-06-2017, 12:05 PM.

                Comment


                • #9
                  It converts without errors.
                  I dont use SketchUp for modelling, I just download models from 3dWarehouse for testing.
                  Win7 Ultimate 64bit, GTX 970, Standalone version: V-Ray Next 4.30.03,

                  Comment


                  • #10
                    Originally posted by JuhaW View Post
                    It converts without errors.
                    I dont use SketchUp for modelling, I just download models from 3dWarehouse for testing.
                    JuhaW - Seems there was a problem with the .obj file I tested it with initially (unless the build I had installed was giving me trouble.) Either way, with a fresh build, I tried a few others and it works perfectly. THANK YOU!!

                    Comment


                    • #11
                      thank you, for time saving tool

                      Comment

                      Working...
                      X