0
$\begingroup$

At first, they worked properly, but now none of the props in my scene are showing any materials in the rendered view. They seem to show an impression of material instead, where they are not just smooth objects but rather bumpy, sort of. picture of objects in rendered viewport

More information is that each object in the scene is made of different parts which is joined together. I of course gave them each materials before joining them with cntrl + J. I even use the UV editor to modify the way the texture displayed. But now none of it is showing which is confusing. I do not know what I did wrong. Could someone please help me?

I have included a link to the file, too. Thanks.

Blender file

$\endgroup$
1
  • $\begingroup$ for future uploads, please follow our file sharing guide to learn how to make an efficient and lightweight upload for our platform. 104MB filesize it too much for the average folk's network. Also it's a good idea to indicate which software version you are using, especially when you don't use the current stable release which most people assume to be of use. Here according to BPY you used v3.0.42, that's quite a jump backwards with many changes that happened in both render engines and shader nodes that have to be taken into account. $\endgroup$
    – Lauloque
    Commented Nov 13 at 1:52

2 Answers 2

1
$\begingroup$

Looking at your blend file I'm 99% sure it's because you're doing something weird with the Ambient Occlusion map and the Base Color. Can't confirm because the node is lost between our different versions of Blender, but it should be set up with both nodes going into a Mix node, set to Multiply blend mode and the Factor at 1.0. Doing that it seems to fix it on my end.

enter image description here

Result:

enter image description here

$\endgroup$
1
  • $\begingroup$ Thanks so much for checking it out! I appreciate you taking the time to troubleshoot—I'll set it up with the Multiply blend mode and Factor at 1.0 and see if that does the trick on my end too. Thanks again! @jakemoyo $\endgroup$ Commented Nov 13 at 19:40
0
$\begingroup$

The blend file data shows it was written using Blender v3.0.42. And yet when opening the file with that version, the MixRGB nodes in your materials are shown as being undefined:

enter image description here

This happens when a file was done on Blender versions from 3.4 and above, and then open in an older version of Blender from before 3.4. The issue with that being that the node was changed in version 3.4:

The "MixRGB" node for Shader and Geometry Nodes is converted to the new "Mix Node" on loading. Files saved with the new node are not forward compatible with older versions of Blender (bfa0ee13d5).

Note that it is possible to upgrade a file's mix node to a newer version, but not to downgrade. So the issue occurs only when opening newer files with older versions than 3.4.

If you have a version of your file that wasn't saved with a Blender version <3.4, you could use that. Otherwise, you have to go through each of your materials and replace the undefined nodes by the available Mix node.

I made a script that should theoretically be able to do it in one click, but it will not recover the mix type nor input values. It will only preserve the old socket color inputs/output connections, and assuming you used most of these mixRGB as multipliers between albedo and ambient occlusion: it arbitrarily sets the mix nodes to multiply and the factor at 1. You can change that if you want another set of... Settings... It's below the "EXTRA OPTION" comment.

But if you don't have most of your nodes doing that albedo multiply AO, then perhaps a more neutral script that just connects all nodes as is and leaves unconnected values at default is better, in which case see this other answer.

import bpy

for material in bpy.data.materials:
    if not material.use_nodes:
        continue

    node_tree = material.node_tree
    nodes = node_tree.nodes
    
    fail_state = False

    for node in nodes:
        if node.name == "Mix":
            try:
                input_links = {}
                output_link = None
                
                if len(node.inputs) > 6 and node.inputs[6].is_linked:  # Color1 input
                    input_links[6] = node.inputs[6].links[0].from_socket
                if len(node.inputs) > 7 and node.inputs[7].is_linked:  # Color2 input
                    input_links[7] = node.inputs[7].links[0].from_socket

                if len(node.outputs) > 0 and node.outputs[2].is_linked:
                    output_link = node.outputs[2].links[0].to_socket

                mix_rgb_node = nodes.new(type="ShaderNodeMixRGB")
                mix_rgb_node.location = node.location
                # EXTRAS OPTIONS
                mix_rgb_node.blend_type = 'MULTIPLY'
                mix_rgb_node.inputs[0].default_value = 1 # Factor

                if 6 in input_links:
                    node_tree.links.new(input_links[6], mix_rgb_node.inputs[1])  # Color1 input
                if 7 in input_links:
                    node_tree.links.new(input_links[7], mix_rgb_node.inputs[2])  # Color2 input

                # Reconnect the output link to the new MixRGB node's Color output
                if output_link:
                    node_tree.links.new(mix_rgb_node.outputs[0], output_link)

                nodes.remove(node)
            except:
                print(f"failed on material '{material.name}'")
                fail_state = True

print(f"Replacement of 'Mix' nodes with 'MixRGB' nodes completed {'with errors' if fail_state else 'with no errors'}.")

Paste in text editor and run.

$\endgroup$
2
  • $\begingroup$ Thank you for explaining all that. I’ll try the script you made to convert the nodes over—setting the Mix nodes to multiply with Factor at 1 sounds like a solid starting point. Really appreciate you going the extra mile to include those options. i cant thank u enough for your kindness. $\endgroup$ Commented Nov 13 at 19:46
  • $\begingroup$ The "🔼 upvote" and "✔️ accept answer" buttons to the top left corner of an answer are there for it ;) it also makes the answer more visible on the page and better referenced in search results. $\endgroup$
    – Lauloque
    Commented Nov 13 at 22:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .