#shader/material reuse question

1 messages · Page 1 of 1 (latest)

tight bone
#

shader/material reuse question

stable thistle
#

Yes, i got the same material from the example and put on my character, just changed the maps and color

#

But that is really slow, isnt a better way ?

#

This is the inspector for the shader, cause it uses a shader

tight bone
stable thistle
tight bone
# stable thistle The same effect from the example into my assets

the materials should already be the same as the examples by default but I really don't know enough about that specific package, if you're trying to test a bunch of different shaders you can try to click on the "Shader" dropdown at the top of the inspector window and choose another MK/Toon shader to replace the current one, however I'm unsure if the settings will be the same.

#

If the example is a scene in the package, you can copy the material directly and use it in another scene also.

stable thistle
#

So, here is the material for the house wall for example, i want the same shader effect, but into my own wall asset, keeping the colors from my wall, and just the shader and outline

#

If i just change the shaders from standard to mk ton

#

And if i just put the material from the house example

#

How to keep the first color into the 3rd effect

tight bone
#

Unfortunately, since the material colors aren't assigned to the object directly there's not (to my knowledge) a way to transfer them to the material without some sort of script assigning them. My best advice would be to get all of the colors that are common in your wall and copy and paste their hex codes into the intended locations of the material. I don't believe there is a built-in functionality that allows for automatic reassigning of colors to a material as there's not a way for the engine to know which "Color" variables assign to what in-between materials. My assumption is the only way of doing that would be to create a custom inspector script which would search for specific variable names and change them directly.

#

But from what I see it looks like only 3 or so colors you'd need to reassign, so copying the hex codes and reassigning them would probably be your best bet. I'd estimate it'd only take 10 or so seconds per material you're wanting to test.

stable thistle
#

I thought it was the only way to assing them directly. But as i wanted to try different examples and lighting i was trying to see if theres a better way. But thanks a lot man