Skip to content

Commit

Permalink
Merged
Browse files Browse the repository at this point in the history
  • Loading branch information
RodrigoGama1902 committed Feb 1, 2023
2 parents e6f7cb6 + dc6b50a commit 4c9a698
Show file tree
Hide file tree
Showing 48 changed files with 1,714 additions and 828 deletions.
3 changes: 3 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"python.formatting.provider": "autopep8"
}
12 changes: 7 additions & 5 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,16 +1,18 @@
bl_info = {
"name": "Cycles to Octane Converter",
"description": "Node Tree Converter",
"name": "Cycles2Octane Converter",
"description": "Convert material nodes from cycles to octane",
"author": "Rodrigo Gama",
"version": (0, 1, 2),
"blender": (2, 93, 0),
"version": (0, 1, 7, 0),
"blender": (3, 0, 1),
"location": "View3D",
"category": "3D View"}


def register():
from .addon.register import register_addon
register_addon()


def unregister():
from .addon.register import unregister_addon
unregister_addon()
unregister_addon()
Binary file added __pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file added addon/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
338 changes: 338 additions & 0 deletions addon/data/cycles2octane_data.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,338 @@
{
"ShaderNodeBsdfTranslucent": {
"inputs": {
"Color": "Albedo",
"Normal": "Normal"
},

"outputs": {
"BSDF": "Material out"
},

"octane_node": "OctaneUniversalMaterial"
},

"ShaderNodeBsdfPrincipled": {
"inputs": {
"Base Color": "Albedo",
"Metallic": "Metallic",
"Specular": "Specular",
"Roughness": "Roughness",
"Anisotropic": "Anisotropy",
"Anisotropic Rotation": "Rotation",
"Sheen": "Sheen",
"Sheen Tint": "Sheen roughness",
"Clearcoat": "Coating",
"Clearcoat Roughness": "Coating roughness",
"IOR": "Dielectric IOR",
"Transmission": "Transmission",
"Emission Strength": "Emission",
"Alpha": "Opacity",
"Normal": "Normal",
"Clearcoat Normal": "Coating normal"
},

"outputs": {
"BSDF": "Material out"
},

"octane_node": "OctaneUniversalMaterial"
},

"ShaderNodeTexImage": {
"inputs": {
"Vector": "Transform"
},

"outputs": {
"Color": "OutTex"
},

"octane_node": ["ShaderNodeOctImageTex", "ShaderNodeOctAlphaImageTex"]
},

"ShaderNodeOutputMaterial": {
"inputs": {
"Surface": "Surface",
"Volume": "Volume",
"Displacement": "Octane Geometry"
},

"outputs": {},

"octane_node": "ShaderNodeOutputMaterial"
},

"ShaderNodeInvert": {
"inputs": {
"Color": "Texture"
},

"outputs": {
"Color": "Texture out"
},

"octane_node": "OctaneInvertTexture"
},

"ShaderNodeMapping": {
"inputs": {
"Location": "Translation",
"Rotation": "Rotation",
"Scale": "Scale"
},

"outputs": {
"Vector": "Transform out"
},

"octane_node": "Octane3DTransformation"
},

"ShaderNodeVertexColor": {
"inputs": {},

"outputs": {
"Color": "Texture out"
},

"octane_node": "OctaneColorVertexAttribute"
},

"ShaderNodeMixRGB": {
"inputs": {
"0": "0",
"1": "1",
"2": "2"
},

"outputs": {
"0": "0"
},

"octane_node": [
"OctaneMixTexture",
"OctaneAddTexture",
"OctaneMultiplyTexture",
"OctaneSubtractTexture"
]
},

"ShaderNodeMath": {
"inputs": {
"0": "0",
"1": "1"
},

"outputs": {
"0": "0"
},

"octane_node": ["OctaneBinaryMathOperation", "OctaneUnaryMathOperation"]
},

"ShaderNodeBsdfTransparent": {
"inputs": {},

"outputs": {
"BSDF": "Material out"
},

"octane_node": "OctaneNullMaterial"
},

"ShaderNodeAddShader": {
"inputs": {
"0": "1",
"1": "2"
},

"outputs": {
"0": "0"
},

"octane_node": "OctaneMixMaterial"
},

"ShaderNodeMixShader": {
"inputs": {
"0": "0",
"1": "2",
"2": "1"
},

"outputs": {
"0": "0"
},

"octane_node": "OctaneMixMaterial"
},

"ShaderNodeBsdfDiffuse": {
"inputs": {
"Color": "Diffuse",
"Roughness": "Roughness",
"Normal": "Normal"
},

"outputs": {
"BSDF": "Material out"
},

"octane_node": "OctaneDiffuseMaterial"
},

"ShaderNodeBump": {
"inputs": {
"Strength": "Strength",
"Distance": "Distance",
"Height": "Height",
"Normal": "Normal"
},

"outputs": {
"Normal": "Normal"
},

"group_inputs": {
"Strength": "NodeSocketFloatFactor",
"Distance": "NodeSocketFloatFactor",
"Height": "NodeSocketColor",
"Normal": "NodeSocketColor"
},
"group_outputs": {
"Bump": "NodeSocketColor",
"Normal": "NodeSocketColor"
},

"null_links": {
"Height": "Bump",
"Normal": "Normal"
},

"octane_node": "None"
},

"ShaderNodeNormalMap": {
"inputs": {
"Strength": "Strength",
"Color": "Color"
},

"outputs": {
"Normal": "Normal"
},

"group_inputs": {
"Strength": "NodeSocketFloatFactor",
"Color": "NodeSocketColor"
},
"group_outputs": { "Normal": "NodeSocketColor" },

"null_links": {
"Color": "Normal"
},

"octane_node": "None"
},

"ShaderNodeHueSaturation": {
"inputs": {
"Color": "Input",
"Hue": "Brightness",
"Saturation": "Saturation",
"Value": "Gain"
},

"outputs": {
"Color": "Texture out"
},

"group_inputs": {
"Input": {
"node_type": "NodeSocketColor",
"default_value": false
},

"Brightness": {
"node_type": "NodeSocketFloatFactor",
"default_value": 1
},
"Gamma": {
"node_type": "NodeSocketFloatFactor",
"default_value": 0
},
"Contrast": {
"node_type": "NodeSocketFloatFactor",
"default_value": 0
},
"Exposure": {
"node_type": "NodeSocketFloatFactor",
"default_value": 0
},
"Mask": {
"node_type": "NodeSocketFloatFactor",
"default_value": 0
},
"Hue": {
"node_type": "NodeSocketFloatFactor",
"default_value": 0
},
"Saturation": {
"node_type": "NodeSocketFloatFactor",
"default_value": 0
},
"Gain": {
"node_type": "NodeSocketFloatFactor",
"default_value": 0
}
},
"group_outputs": {
"Texture out": "NodeSocketColor"
},

"use_custom_group": false,
"octane_node": "OctaneColorCorrection"
},

"ShaderNodeBrightContrast": {
"inputs": {
"Color": "Input",
"Bright": "Brightness",
"Contrast": "Contrast"
},

"outputs": {
"Color": "Texture out"
},

"octane_node": "OctaneColorCorrection"
},

"ShaderNodeRGB": {
"inputs": {},

"outputs": {
"Color": "Texture out"
},

"octane_node": "OctaneRGBColor"
},

"ShaderNodeMapRange": {
"inputs": {
"Value": "Value",
"From Min": "Input min",
"From Max": "Input max",
"To Min": "Output min",
"To Max": "Output max",
"Steps": "Steps"
},

"outputs": {
"Result": "Texture out"
},

"octane_node": "OctaneRange"
}
}
3 changes: 2 additions & 1 deletion addon/operator/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
COC_OP_ConvertNodes,
)

# create a panel in the scene context

def register_operators():
from bpy.utils import register_class
Expand All @@ -17,4 +18,4 @@ def register_operators():
def unregister_operators():
from bpy.utils import unregister_class
for cls in reversed(classes):
unregister_class(cls)
unregister_class(cls)
Binary file added addon/operator/__pycache__/__init__.cpython-310.pyc
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading

0 comments on commit 4c9a698

Please sign in to comment.