When i export roblox-blender i loss colors of materials

When I export my models to blender they just show a plain color like a grey but they dont show the real color.

image
On the solid mode they look exact color as I exported them.

But if I change the mode to the render mode they look with texture but with a really plain color.

Someone knows how to make it looks with colors and with textures on render mode? Please help is urgent, I been doing GFX for almost 2 years is really fustrating that roblox, a millonaire company doesnt give good patch for this type of stuff.

3 Likes

I don’t really know if I can help, or if the help I’ll give is useful, but I’ll give it anyway. Hope I help.

There’s a video I have found for how to import textures from Blender to Roblox Studio. I haven’t watched the video yet, so–as I said before–it might help, it might not. Hope it does, though.

If that doesn’t help, there’s this topic someone where someone had had the same problem:

man, iam saying i loss the color texture at blender not at roblox…

Experienced the same issue. You can run this blender script or something like it to mix the viewport display color with the texture of all materials.

import bpy

for mat in bpy.data.materials.values():
    color = mat.diffuse_color
    mat.use_nodes = True
    tree = mat.node_tree
    
    node = tree.nodes.new("ShaderNodeMixRGB")
    node.inputs[2].default_value = color
    node.inputs[0].default_value = 0.85#sometimes 1 is better
    node.blend_type = 'MULTIPLY'
    
    output = tree.nodes["Principled BSDF"].inputs[0]
    
    #this logic is to find the node thats image texture is being used
    for img_node in tree.nodes.values():
        if img_node.name.find("Image Texture") >= 0:
            if img_node.image.name.find("_diff") >= 0:
                png_node = img_node
                break

    tree.links.new(node.outputs['Color'], output)
    tree.links.new(png_node.outputs['Color'], node.inputs[1])
1 Like

Could you explain to me how to add it into blender, please?

The problem may be that you didn’t apply the textures. Go to the object’s texture settings, create a new texture, click the yellow dot next to base color and select image texture. Now, find the image that exports with your obj. Usually the name of the model or base part. Now click the folder button under the image texture, find your image and voila!

Yeah, also it turns out this line

node.blend_type = 'COLOR'

should be replaced with this line, as it more closely represents how Roblox mixes textures with color.

node.blend_type = 'MULTIPLY'

As a side not, when glass is exported from roblox, its invisible in blender, so make sure to replace those materials.

To run a script in blender, select the scripting view to see the text editor:
image
Make a new file, copy paste into this panel and click the play button

1 Like

image
Uploading: image.png(1)…
why the model is like that, also, that doesnt work

also idk why i get this weird thing:

I see, my apologies, the script is tailored to what i noticed from my export. I think you would be best served by being able to vaguely understand the script so you can edit it.

These lines probably caused you an issue.

Try this script:

import bpy

for mat in bpy.data.materials.values():
    color = mat.diffuse_color
    mat.use_nodes = True
    tree = mat.node_tree
    
    node = tree.nodes.new("ShaderNodeMixRGB")
    node.inputs[2].default_value = color
    node.inputs[0].default_value = 0.85#sometimes 1 is better
    node.blend_type = 'MULTIPLY'
    
    output = tree.nodes["Principled BSDF"].inputs[0]
    
    #this logic is to find the node thats image texture is being used
    for img_node in tree.nodes.values():
        for out in img_node.outputs:
            for link in out.links:
                if link.to_socket == output:
                    png_node = img_node
                    break
    if png_node:
        tree.links.new(node.outputs['Color'], output)
        tree.links.new(png_node.outputs['Color'], node.inputs[1])
6 Likes

This isn’t from Roblox … you are missing the obj texture. You will need to figure out how to save your textures from blender to use with the objects.

I asked. Also, why don’t you stop harassing people, thanks.

Sorry bro, I’am autistic as shit.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.