Dude I struggled over 2 hours for a solution. I hardly tried to remap the Textur and put it in the alpha. You tell me just do contrast? Man you are awesome 😂
Thank you so much. I also suffered a lot with this. Image editor - lots of textures and variations. The storage space just going lower and lower. Then came shadergraph. Sometimes it's easier than creating a new texture for each model. I'm glad, if I could help. Have a nice day 🤗
Hi, It's depend what kind of Unity project you start or use (Standard / URP / HDRP) In URP you can use URP Lit in HDRP you can use HDRP Lit shader. I'm not sure standard PR can handle shaderGraph editor. I am using Unity 2021 (21). May older versions 5X, 17, 18, 19 not contain this feature (shader editor). The second dependency you must installed if it missing the shader graph package from package manager. This is a part of basic unity registry packages. Hope this help for you. Have a nice day :)
Hi Shiru jsjs The Unity help is more detailed and very useful in this case docs.unity3d.com/ScriptReference/ Not sure my is the best solution but maybe this small code example will help: _____________________________________________________ using UnityEngine; public class ccolor : MonoBehaviour { //Create a basic cube, add your material and drop this script on the cube, save this script as ccolor like a class name void Start() { // assign the object with this script and material to the myOBJ variable GameObject myOBJ = this.gameObject; // Get the Renderer component from the myOBJ (this hold the materials) var myOBJRenderer = myOBJ.GetComponent(); // Call SetColor methode using the shader property name "_ColorBase" and setting the color to red // "_ColorBase" is different in all shader, in my shader variant I give this public variable name to the base color //So You need change this reference what you give in your shader, or what your shader is use for basic coloring print(myOBJRenderer.material.GetColor("_ColorBase")); //just test read and inform in console myOBJRenderer.material.SetColor("_ColorBase", Color.red); //set the new color to red print(myOBJRenderer.material.GetColor("_ColorBase")); //just inform from the new color in console } } ________________________________________________ Have a nice day and happy coding
Many thanks bro!
Hi LesDremlet. You are welcome
Thanks so so much your feedback😊
Dude I struggled over 2 hours for a solution. I hardly tried to remap the Textur and put it in the alpha. You tell me just do contrast? Man you are awesome 😂
Thank you so much.
I also suffered a lot with this. Image editor - lots of textures and variations. The storage space just going lower and lower. Then came shadergraph. Sometimes it's easier than creating a new texture for each model.
I'm glad, if I could help. Have a nice day 🤗
excellent video as always :-) ! 🙏✌
Thank you so much Bro! 🤜💥🤛 You rock 🙏
thank you bro you saved my life
You are welcome :)
I am happy if this help for You.
Just what I needed! Thanks! Does this method only work on HRDP or also in URP?
Thanks so much your kind words!
Sorry, I not tested under URP so have no experience in URP. But I thinks this nodes must exist and work in URP too.
Thanks. Very useful.
Ooo, thank you so much.
Very useful content keep it up ✔️🟣
Thanks. We are happy if that was useful.
i do not see HD RP/lit anmywhere in the shaders for unity
Hi,
It's depend what kind of Unity project you start or use (Standard / URP / HDRP)
In URP you can use URP Lit in HDRP you can use HDRP Lit shader. I'm not sure standard PR can handle shaderGraph editor.
I am using Unity 2021 (21). May older versions 5X, 17, 18, 19 not contain this feature (shader editor).
The second dependency you must installed if it missing the shader graph package from package manager. This is a part of basic unity registry packages.
Hope this help for you. Have a nice day :)
How can I change the colors through code? tnx
Hi Shiru jsjs
The Unity help is more detailed and very useful in this case
docs.unity3d.com/ScriptReference/
Not sure my is the best solution but maybe this small code example will help:
_____________________________________________________
using UnityEngine;
public class ccolor : MonoBehaviour
{
//Create a basic cube, add your material and drop this script on the cube, save this script as ccolor like a class name
void Start()
{
// assign the object with this script and material to the myOBJ variable
GameObject myOBJ = this.gameObject;
// Get the Renderer component from the myOBJ (this hold the materials)
var myOBJRenderer = myOBJ.GetComponent();
// Call SetColor methode using the shader property name "_ColorBase" and setting the color to red
// "_ColorBase" is different in all shader, in my shader variant I give this public variable name to the base color
//So You need change this reference what you give in your shader, or what your shader is use for basic coloring
print(myOBJRenderer.material.GetColor("_ColorBase")); //just test read and inform in console
myOBJRenderer.material.SetColor("_ColorBase", Color.red); //set the new color to red
print(myOBJRenderer.material.GetColor("_ColorBase")); //just inform from the new color in console
}
}
________________________________________________
Have a nice day and happy coding