#2D sprite not reacting to 3D Light (DONE)

1 messages · Page 1 of 1 (latest)

dark cave
#

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

floral perch
dark cave
#

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

floral perch
#

Basically, if you want it to be affected by 3d lights, it needs to be rendered as a 3d object.

dark cave
#

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.

floral perch
#

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.

dark cave
#

maybe, I just expect 2d sprite to react to 3d lighting out of the box

dark cave
#

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....

▶ Play video