I’m a bit stuck, and I’ve tried just about every solution I can find from:
Deferred Rendering
Casting Two Sided Shadow
Point Light Casting Shadows Is On
Tanking the Normal Bias
The walls have thickness.
The walls are overlapping, tried perfect butting too.
ect
There are no directional or ambient lights. I’ve tried all of the lighting settings for compression, pixel, ect. Not sure where to go from here.
I have rooms which are procedurally generated by chunks, and I’m getting light bleed from the next room. I can not bake as everything is 100% procedurally generated. If I have to buy an asset that’s fine. I don’t need AAA lighting, actually something more akin to Doom 3 would be fine with me.
Example, see light bleed on edges and ceiling from next room.
see how the shadow from the inside wall look offset to where the red arrow is. if you change shadow bias (not the normal bias) really close to 0, like 0.001, that will bring that red arrow closer to where the shadow should actually start.
I did so, and that seemed to help a bit, but I’m still getting light leak from the corner. I didn’t mean to take up your time with this tonight, I do appreciate the help anyhow.
Are you changing this setting on every light? You have to do it for every one.
Last thing to check is what quality your shadows are set to, Check unity quality settings and put them in the highest to see if that helps. Unity’s shadows are pretty bad…
Yeah, I’m instantiating a prefab with a point light, so when I change the settings for it, they are all changed. I restart the game just to make sure the graphics setting changes have taken full effect. The shadow quality is set to “Very High Resolution”. No dice.
There are no models, the floors, are simple 1x1 quads and the walls are simple 1x1 cubes with .5 thickness. To reiterate my first post, there is no lightmap baking, this game is 100% procedural. There are no premade models outside of those pieces, that it assembles the room with.
If I make the model any bigger it won’t work, a model of 1 x 1 x .5 should be plenty thick enough for shadows. For a test I doubled the size and it didn’t help.
I have tried every solution related to quality settings. I’ve searched through every post on Unity Forums related to this matter. I’ve been through several pages of Google. The only solution I can come up with is going to be custom shaders.
Should I report this as a bug? I can’t seem to find anyone who has had this problem, and found a solution to it. If I had to guess, a pieced together procedural room isn’t possible without shadow acne and light bleed, regardless of settings.
All realtime. No lightmapping. The rooms are assembled from pieces, the rooms are dynamically generated. Thanks for any tips, pointers, help, anything. Additionally, I tried to find if there was a way to generate lightmaps while the game is running, so when I generate a room I can generate the lightmap on the fly. No dice.
I’m alright with Unity’s default lighting system if I can get it to work. I would prefer a style of idTech 3’s engine, but Unity is fine.
Modular at run time. The rooms are generated from pieces, the rooms are destroyed and made on the fly.
PC only no VR.
It happens on the horizontal and vertical where the walls meet and the ceiling/floor meets the walls, it doesn’t happen between wall pieces. In that image that wall is 3 units high, that means it has 3 1x1x.5 meshes stack on top of each-other and extending the length of the wall.
Small example of bleeding. Associated screenshots, these aren’t the only settings I’ve tried either, this is just the current attempt with Unity’s lighting system. To clarify, once again, this is all 101% procedurally placed. Nothing in the scene is placed before it starts. The rooms are created and destroyed on the fly.
Any lights which aren’t set to cast shadows will cause bleeding. Because of how realtime rendering works: lights always have an effect* but shadows mask it. If the light does not cast shadows, or the shadow distance is too small, your lights will appear to be bleeding.
In reality, the shadow simply isn’t being rendered either due to max range or the mesh cannot receive shadows or the light is not set to cast shadows.
Note: you will not get an exact Quake 1/2/3 look because you have no radiosity in your scene, only realtime shadows. This is easily fixed later and we can address that separately if it’s even required.
*Assuming no tile based light culling is taking place and it won’t be for legacy unity renderers - you can disregard this until SRP HD.
I might be wrong here, but all of my settings above have the light casting shadows, and I even set the meshes to Two Sided as an experiment at one point. You can see the settings of my lights in the above images. I have the environmental light set to nothing so I can have a completely pitch black room if I want one. So the lights are set to cast shadows, I tried hard and soft, and the meshes are set to cast shadows.