Loading into my scene. All materials are green

Loading into my scene. All materials are green

Anonymous
Not applicable
3,226 Views
10 Replies
Message 1 of 11

Loading into my scene. All materials are green

Anonymous
Not applicable

So I have been making some assets for a game project. I have several 'scenes' in this project that I have been flicking between (not constantly flicking, but over the course of a week I been in and out of about 15 scenes).

 

This one if a beer mug. I already exported it and in the game it works. I have gone back in to the project because I want to now make the empty version of the mug. But all the materials have gone green.

 

image.png

 

 

When I saved it last it was all textured correctly.

 

What could be causing this?

0 Likes
3,227 Views
10 Replies
Replies (10)
Message 2 of 11

mcw0
Advisor
Advisor

Green means there's no shader assigned to the mesh.

0 Likes
Message 3 of 11

Anonymous
Not applicable

It happened again on the character I was working on. What exactly does it mean "no shader attached"? The material is still showing in the attribute editor for the character, but he is all green when I load in. Once again, he was fine when I saved-closed Maya last night.

 

(BTW: I have realised that I can re-assign the existing material to fix the problem. But I wonder why it is happening). Thanks

 

image.png

0 Likes
Message 4 of 11

mcw0
Advisor
Advisor

It's strange that you'd need to reassign each time you open the file.  I'd need to see the graph to know exactly what's going on.  There might be groupParts nodes for component shader assignments.  Or maybe check to see if "displayColors" is unchecked on the shape node.  Not sure that will cause this issue but it should still be unchecked.

0 Likes
Message 5 of 11

NIBEA119
Explorer
Explorer

I have the exact same problem, but sparce meshes in an environment scene.

I tried cleaning everything, having shorter names for textures, there's no reference in the scene, every namespace is cleaned, delete History, Freeze Transform. 
And yet, every time I open the scene, I have the exact same problem. About 8 meshes need to be reassigned their textures. 

Message 6 of 11

damaggio
Mentor
Mentor

Are the textures disconnected or not in the hypershade?

0 Likes
Message 7 of 11

NIBEA119
Explorer
Explorer
They are disconnected in the hypershade yes, like I can't Select Objects with Material from the texture
0 Likes
Message 8 of 11

damaggio
Mentor
Mentor

Just reapply the textures manually or assign a new shader to those objects. 

Message 9 of 11

NIBEA119
Explorer
Explorer
I know it works, but is there any way to resolve this problem permanently? Like, not reapply textures in my whole environment everytime?
0 Likes
Message 10 of 11

damaggio
Mentor
Mentor

I'm sorry but is impossible to say what happened to the scene or if you made a mistake somehow along the way.

If you want you can upload just the problematic objects and someone will inspect it for you.

Usually this happens when beginners save a file with history.

 

0 Likes
Message 11 of 11

mcw0
Advisor
Advisor

When things happen automatically, scriptJobs come to mind.  There are a lot of scriptJobs that run behind the scenes.  There might be one that is disconnecting those shaders.  Just thinking out loud.

Or as a total hack, create your own scriptJob to reconnect/reassign those shaders.