I wanted to test out ChatGPT converting RS Standard Materials to OpenPBR. After 30 minutes of correcting it I gave up. I changed the Redshift_Material_ID to 5703 after it suggested I check the material ID through another script it created. I still couldn't get it to work. I ended up running out of my free credits. Is this functionality going to be in the next C4D 2025 update? I had submitted a request on Maxon's site but it goes into the void.
It did mention one thing: If Maxon exposes official Redshift Python API for 2025+, it might become possible, but as of now, it’s limited. ChatGPT called out Maxon?
This was one of the versions it created. The first iteration actually had a section for specific texture inputs:
transfer_texture(rs_material, "diffuse_color", openpbr_node, "base_color")
transfer_texture(rs_material, "refl_roughness", openpbr_node, "roughness")
transfer_texture(rs_material, "bump_input", openpbr_node, "normal")
----------------------------------------------------------
import c4d
REDSHIFT_MATERIAL_ID = 1036229 # Redshift material type ID (adjust if needed)
OPENPBR_MATERIAL_ID = 1036227 # OpenPBR material type ID (adjust if needed)
# The node ID string to identify Redshift node graph — you may need to adjust this based on your scene/plugins
REDSHIFT_NODESPACE_STR = "com.redshift3d.redshift3dnodegraph"
def find_nodegraph_by_id(root_node, id_string):
""" Recursively search nodes starting from root_node to find nodegraph by ID string """
if not root_node:
return None
# Check current node's type ID string
if root_node.GetTypeName() == id_string:
return root_node
# Recursively check children
for i in range(root_node.GetDownCount()):
child = root_node.GetDown(i)
found = find_nodegraph_by_id(child, id_string)
if found:
return found
return None
def convert_redshift_to_openpbr():
doc = c4d.documents.GetActiveDocument()
mats = doc.GetMaterials()
changed = False
for mat in mats:
print(f"Checking material: {mat.GetName()}")
# Check if this is a Redshift material
if mat.GetType() != REDSHIFT_MATERIAL_ID:
print(" - Not a Redshift material, skipping.")
continue
# Get Node Material reference
nodemat = mat.GetNodeMaterialReference()
if not nodemat:
print(" - No node material found.")
continue
# Get root node
root_node = nodemat.GetRootNode()
if not root_node:
print(" - No root node found.")
continue
# Find Redshift node graph inside root node by ID string
rs_graph = find_nodegraph_by_id(root_node, REDSHIFT_NODESPACE_STR)
if not rs_graph:
print(" - No Redshift node graph found.")
continue
# Here you would copy or remap the textures/nodes from Redshift graph to OpenPBR graph
# For demo, just create a new OpenPBR material and replace the old material in document
print(" - Creating new OpenPBR material.")
new_mat = c4d.BaseMaterial(OPENPBR_MATERIAL_ID)
new_mat.SetName(mat.GetName() + "_OpenPBR")
# Insert new material
doc.InsertMaterial(new_mat)
# Optional: Transfer textures/connections here if possible
# Replace material in objects (simplified example)
for obj in doc.GetObjects():
if obj.GetMaterial() == mat:
obj.SetMaterial(new_mat)
# Remove old Redshift material (optional)
doc.RemoveMaterial(mat)
changed = True
print(f" - Converted material: {mat.GetName()} to {new_mat.GetName()}")
if changed:
c4d.EventAdd()
print("Conversion complete, scene updated.")
else:
print("No Redshift materials found to convert.")
if __name__ == "__main__":
convert_redshift_to_openpbr()