I try combining 3D (environment) and 2D pixel art, I have a problem with the 2D sprite. it's not reacting to the environment's light, like when it's on a bright room or a dark room the sprite still have the same visibility. even if it's in a complete darkness the sprite is still visible, I'm new so I have no Idea what's the problem
#2D sprite not reacting to 3D Light (DONE)
1 messages · Page 1 of 1 (latest)
Sprites use unlit material/shaders afaik. You'll need to assign a lit material to it for it to have any effect. And even then, 2d is not meant to play nicely with 3d lights by default.
I can't assign any material into the 2d sprite, it will change the sprite itself into the material. I don't want the sprite itself to emit light but I just want it to react with the lighting of the environment for example it will be barely visible in the dark room
as you can see the character sprite is in a dim room yet it looks as bright as if it's on a sunny environment
Yes, well, the only way to do it is what I mentioned.
Basically, if you want it to be affected by 3d lights, it needs to be rendered as a 3d object.
ouh that's unfortunate, more work to do I guess hha. thank you
let me know if anyone have another solution, I'd appreciate it.
I mean, it's not that much work. You just need to assign a lit material with alpha clipping and your sprite texture in the color slot.
maybe, I just expect 2d sprite to react to 3d lighting out of the box
2D sprite not reacting to 3D Light (NOT DONE)
https://www.youtube.com/watch?v=flu2PNRUAso
oh my god I found this 3 minutes tutorial
In this brief video tutorial, we'll take a look at how to get 2D sprites to display shadows and receive lighting in 3D similar to the Square Enix game Octopath Traveler.
Unity Default Sprite Shader: https://github.com/TwoTailsGames/Unity-Built-in-Shaders/blob/master/DefaultResourcesExtra/Sprites-Diffuse.shader
Complete Shader: https://pastebin....