Skip to content
This repository has been archived by the owner on Feb 11, 2024. It is now read-only.

[2019.2.5f1] SabreCSG meshes not receiving realtime lighting properly #239

Closed
JillCrungus opened this issue Nov 27, 2019 · 7 comments
Closed

Comments

@JillCrungus
Copy link

I have no idea what's causing this but SabreCSG meshes in my project aren't at properly receiving realtime lighting. Baked lighting works but takes a long time to bake even for a simple scene. Unity's standard primitives are receiving lighting just fine. But SabreCSG meshes aren't.

It's that that they aren't receiving the lighting at all - they are, and I can see it if I crank up the light intensity to ludicrous levels. I have no idea what could be causing it.

I've attached a zip containing 2 videos. The first shows that Unity's primitive meshes are receiving lighting properly, the second shows the SabreCSG meshes are receiving the lighting, but not properly.

Vids.zip

I don't know if this is an issue with my lighting settings or what, or if there's any way I could reset them to the defaults. I've fiddled with them a bunch but not had any success in fixing the issue.

@Henry00IS
Copy link
Collaborator

Hey Jill, just for reference, what Unity version are you using?

@JillCrungus
Copy link
Author

JillCrungus commented Nov 27, 2019

Hey Jill, just for reference, what Unity version are you using?

As stated in the issue title, 2019.2.5f1.

It's more than likely that this may be a problem with my settings for the project but I'm not sure what specifically could be causing it. I'm positive that it was working before but I did just upgrade SabreCSG so it's possible there was an update that broke it between now and the last time I downloaded it. I'll check in a seperate project.

@JillCrungus
Copy link
Author

Well I've made a new project and it's working fine there so obviously something's went very wrong with my lighting settings.

@Henry00IS
Copy link
Collaborator

Yeah I can also confirm that it works fine... well I believe SabreCSG does mess with the "Auto Generate" checkbox in the lighting settings. #230

@JillCrungus
Copy link
Author

As is typical, I've found the issue immediately after seeking help for it. Turns out that at some point I'd accidentally managed to knock the pixel light count in the quality settings to 0, which apparently causes this issue.

This is concerning though, because it means that any game that uses Unity's default quality settings and SabreCSG will have realtime lighting break on quality settings below "Medium", which sets the pixel light count to 0.

@Henry00IS
Copy link
Collaborator

I have been able to reproduce the issue by reducing the quality settings to medium indeed. It appears that Unity falls back to a simple per-vertex lighting scheme. Having a small default box or plane receives lighting however making them larger yields identical results:

image

Unless you move the light closer to a vertex:

image

Same with SabreCSG meshes:

image

Unless you move the light closer to a vertex:

image

As such it doesn't matter whether you use SabreCSG or any other mesh and I believe it's out of the scope of this project to fix it. It should be up to the game developer.

@Henry00IS
Copy link
Collaborator

I assume that this issue has been resolved and I will close it as no reply has been posted for almost a month. You can re-open this- or create another issue if you find that this is a problem with the mesh output of (or exclusively with) SabreCSG, which does not seem to be the case.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants