- Home /
[3D] How to make lighting doesn't affect on character ?
As title, I want lighting on my character won't change no matter where the character is (outdoor, under tree shadow, dark scene or even without any light in scene). Up till now, there are 2 solutions I found:
1) Self-illumination shader. Let's say my character has 4 parts (head,body,legs, hands) with outfits, do I need set this shader to all of them (body parts + Outfits) ?
2) Culling Mask in lighting component + Layer. I added lighting to my character, set Culling Mask for other lighting in scene. Is it right ?
Which one is better and easier to implement in my situation ? Or any better solution ?
Thanks in advanced
For lighting an object the same way all the time, I would put the object on its specific layer, then add its own light(s) and set the lights' culling mask to only affect this specific layer. Then make sure that all other lights that shouldn't affect this object don't have this layer in their culling mask.
Answer by BeytullahUnal · Jun 28, 2018 at 09:26 AM
Depends on the type of lighting you want to achieve, I'd say.
Using an Unlit Texture shader will keep your character textures "illuminated" or rather, colored and not get affected by lighting on the scene. This, however, also means that there won't be shadows at all unless the shadows are drawn into the texture itself. And it will stay like whatever it looks like, always. And yes you need to set this shader for every material your character has. Clothes, body, weapons etc etc.
Culling mask + layering option will give you more room for customizing the type of lighting you want on your character. Like a shadow from character's hat dropping on character's face. Or changing the lighting on your character based on the area it is in etc. You can set a dedicated Light only for your character and then play with it's intensity, direction, color etc to your liking throughout the game. This 'may' be achievable with custom shaders but I'm not familiar with them so I can't suggest anything on that end.
Answer by AlejandroBoss10 · Jun 28, 2018 at 02:52 AM
You could use an unlit shader or material so that no matter if there is light or not it will remain the same color.
Do I need to apply this shader/material to all outfits and body parts ?
Yes, you would need to apply it to any parts that you want to be lit the same way (it's logical, if you think about it).