michael-fadely / sadx-dc-lighting

Sonic Adventure 1 palette lighting for SADX PC.
MIT License
39 stars 3 forks source link

Screen space normals? (Camera-based lighting offset) #65

Open PiKeyAr opened 6 years ago

PiKeyAr commented 6 years ago

Looks like we've just found another cool feature of the original lighting system!

Brightness index selection is affected by camera movement, it gets slightly offset when the camera is rotated. It seems to affect everything, but it's most noticeable on big level pieces. Here's an example: Palettes used - image Video - https://dcmods.unreliable.network/owncloud/data/PiKeyAr/files/SA1%20research/lightdir2.mp4 Interestingly it doesn't just jump from one index to another (which would make sense with a palette like this), but it seems to blend into it? This is really cool.

Old post: It appears that SA1 does something with light direction in Sky Deck Act 1. Other acts (judging by Sonic's Act 2 and Knuckles' Act 3) and the character select screen are unaffected even though they use the same SL file.

Here's a comparison: SA1 image SADX + Lantern Engine image

I've confirmed that SL_60B.BIN is the correct file that is loaded in both cases. If I remove light rotation data from the SL file, it looks like this: SA1 image SADX + Lantern Engine image

Interestingly the lighting on objects seems fine, but on the level itself it's just slightly off. I've also confirmed that the "Allow dynamic light direction globally" code doesn't affect light direction in this level.

michael-fadely commented 6 years ago

it's always sky deck