How to fix Pink Materials in Unity

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
[Music] so your scene is looking pink let's find out the reason behind this pink color is shader mismatch or you can say unsupported materials now the question is why does this happen as you know in unity you can choose three different kinds of render pipeline for a project first default or built in under pipeline second urp or universal render pipeline third hdrp or high definition render pipeline the default renderer or built-in render pipeline is being used in unity for a very long time and most of the asset you find on unity asset store are created for built in under pipeline whereas the other two render pipeline urp and hdrp were introduced about two years ago in unity 2018.3 or 2 if i correctly remember and that's why you can find only a few assets on unity asset store that are supported for this under pipeline because of their different nature these dental pipeline has their own default materials which are non-interchangeable i mean for example a urp material will look pink in both hdrp and built-in under pipeline and same apply for other 2-render pipeline when you create a new unity project using unity hub it asks you to choose a rendered template or you can say a rendered pipeline and here is where most of the people who are new to unity makes mistake the default render pipeline which you can choose by selecting either 2d 3d or 3d with extra template has a combination of both urp and hdrp features and that's why for a new unity user i always recommend to use this render pipeline and trust me game developers are still using it and making games with awesome graphics for various platforms the other two templates as you can see here are for urp and hdrp and i suggest you to only use this if you have a basic understanding of these for a quick brief the hdrp is used for high-end devices like pc and console and urp as the name says can be used for all kinds of platform from mobile to pc and console with modded graphics now let's jump to unity and see why this problem happens and how to solve it all right i have opened up unity and in this project i'm using universal under pipeline next i go to unity asset store and let's say we want to use this asset in our project so i simply click on open unity and import the asset i open up the scene and open the demo scene and as you can see it is looking pink now if i right click and create a 3d cube you can see our cube is looking perfectly fine then why the other object is looking pink like i said in the beginning of this video this problem happens because of material mismatch and if i go to the cube's material you can see it is using lit material from universal render pipeline while if i go to this object's material it is using standard material which is only supported inside built-in under pipeline to quickly show you that if i go to edit project settings and if i temporarily remove this urban set you can see now the other objects are visible but our cube is looking pink and that is because the materials between these two pipelines are not interchangeable so now how do we actually solve this problem let's first assign the urps set back to solve this problem all you need to do is convert the materials so if i go to this material and change the shader from standard to universe center pipeline and lit which is the default shader in urp and you can see now the objects are visible we just need to assign our textures back so if i assign the textures again you can see now the objects are properly visible inside urp but if you are working on a large project that has a lot of assets using lots of material then converting every single material using this process could be a pain in the butt so how do we converts all the materials into urp materials well unity also provide a tool that automatically convert all the materials for you so if i ctrl z and select both material then go to edit render pipeline universe render pipeline and here you have two options you can either select upgrade project materials if you want to convert all the materials to urban materials or you can choose upgrade selected materials if you only want to select specific materials so i'm going to choose this one and you can see it automatically converted both materials and assign all the textures back and the same process can also be applied to hd render pipeline as well select both material go to edit under pipeline htrender pipeline upgrade from built-in pipeline and here you can see we have the same two options so i'm gonna select use selected materials and also adjust the lighting and here you can see now the asset is also working inside azure under pipeline one thing to note that this automatic material conversion most of the time only support for a standard shader so for example if i use a differentiator let's say this mobile bump diffuse and then try to convert the material you see it's not working so in this situation first you select all of your materials which are not using a standard shader then first convert their shader to standard and then try this material conversion tool now there are some situations when your assets are using a custom or third party shader which also doesn't support this auto conversion so now let's see how we can also convert those materials for urp and hd render pipeline to show that i'm gonna import this ultimate 10 plus shader pack in my urp project and as you can see it is also looking pink by default let's first try the automatic conversion tool so i select the material go to edit enter pipeline and use selected material and like i said it will not work because the shader is using is different than standard shader so now in order to use the automatic material conversion tool first we need to change the shader to standard shader but before i do that please note that there are some additional parameters like this wind animation and the speed which are only available inside this specific shader these options are not available in standard shader so when we convert our shader this functionality will be lost so what we can do here we can partially convert this material we can't perform a fully conversion so let's first see how this material is looking right now so again disable my urp asset and play the scene and here you can see this grass has a wind animation which can be controlled by these parameters let's convert this material to urp material so now again switch back to urp and let's see how we can convert it in urp material so like i said first we need to change the shader to standard and you can see we only got the albedo texture so we need to manually assign our normal map okay and now let's try the automatic conversion tool as you can see our object is now visible and we can enable our transparency back from this alpha clipping option okay but now if i play the scene and as you can see our wind animation is gone because those parameters are not converted in late material now if you want those additional features like wind animation then you will need to re-add the shader for urp or hd render pipeline whatever you are using which requires a good knowledge of shader programming but the good thing is unity also provides an awesome node based tool called shader graph which allows you to easily create your own shader without writing a single line of code i also have some tutorial about the basics of shader graph so feel free to watch them and if you are looking for more advanced tutorials about graphics in unity then please give a visit to my patreon page link is given in the description and finally once again huge thanks to all of my patreon supporters and special thanks to hannah sinconan di medu carrie lauderdio alexander brendan manion florian adrian francois lobbe hooden view blue jb john marks josemar elvis longley luis alves hernandez silas renault and the master that's it for this video see in the next one bye bye
Info
Channel: UGuruz
Views: 189,955
Rating: undefined out of 5
Keywords: unityguruz, uguruz, unity pink texture fix, urp pink materials, unity pink material, unity pink screen, unity pink shader, unity pink trees, unity pink object, unity pink textures urp, unity pink color, unity pink terrain, unity everything pink, render pipeline unity, unity pink screen fix, unity hdrp pink materials, unity hdrp pink, unity urp pink, unity pink particles, unity pink avatar, unity fix pink material
Id: nB0r0c-SIVg
Channel Id: undefined
Length: 9min 49sec (589 seconds)
Published: Mon May 10 2021
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.