I have multiply scenes, one of which is in the combat level, baked with light using light probes. when I load the addition 3D heroes scene with realtime lighting, I can see that the different battle level scenes affect the lighting of the hero scene, but I deactivated all lights except the 3D hero scene. What can affect the scene? And how I can avoid light affect? I use URP
Related
I use URP for my Unity 3d project. I have many point lights in my scene, they all set to mixed and important light. However some point lights does not produce any light on the scene after the baking.
Before baking:
After baking:
If I mark them as baked light instead of mixed than they just go completely black.
Any suggestions?
In URP there is a limit for realtime point lights. You can´t set more than 8 point lights. This is the reason, that in "mixed mode" some of your point lights are producing lights and the others don´t. Nevertheless baked lighting should produce a result for every point light. Probably the light setup is not correct. Try to follow some basic URP lighting tutorials i.e. on youtube
I'm using Unity2021.3, and this is a URP project.
There is a 3D sprite in the scene that receives and casts shadow, the material for its spriteRender uses a shader that is a simple modification of Unity URP Simple Lit, and there is a spotLight in front of the 3D sprite with shadow enabled, and there is also a directional light in the scene. The 3D sprite casts shadow on the ground due to the directional light and the spotLight, everything is correct.
But if I switch to a new shader, it seems the SpotLight passes through the 3D sprite, rendering the shadow incorrectly, if I move the SpotLight to make it far away from the 3D sprite, then it seems the shadow is correct.
Please see the attached screenshot, the top three screens are custom shader, below two are the URP Simple Lit variant.
I'm wondering what the problem is with the new shader?
Thank you so much.
I've been Experimenting with GPU Instancing to draw 1,60,000 Meshes and Unity's Graphics API has some really Good Functions to achieve this.
I am currently using Graphics.DrawMeshInstanced and I get the Meshes on the Screen, However, these Instanced Meshes only react to Directional Light, and not to Point/Sport lights. Is this a Limitation that cannot be overcome or am I missing Something here?
I am currently using an Orthographic Camera with Forward Rendering , and Unity's Standard Shader for the material. If It helps I am trying to make a Simple Rimworld like game.
With Directional Light
With Point/Spot Lights
I placed a light in my scene.
It is lighting the ground when i'm facing that light but when I turn the opposite direction, the light on the ground vanishes.
I think this might be some Unity's default behaviour.
Is there a way I can solve this issue?
Unity uses frustum culling to save performance, so it only draws items that are within the camera's viewing area. As a result of this, the particles behind you are not drawn, and any lights attached to them aren't either.
Scene-crucial lights aren't normally attached to particles, so it's normally not a concern if they're hidden along with their particles.
For conventional lights (not attached to particles), Unity should render the light as long as it affects objects within the camera frustum. If you use a conventional light, you should see better results.
Looks like you may have to disable occlusion culling. Unity3D Manual
I'm doing an augmented reality application using Unity3D and Vuforia. For each gameObject in my augmented reality scene I add a Light component to it and define it as a DirectionalLight.
In this scene the gameObjects are iluminated, but when I change to another scene (not destroying the gameObjects) they are not.
I already checked and they still have the Light component, but are not iluminated for some reason.
Do you guys have any clue of what might be the problem?
P.S.: The second scene is a normal scene with no interaction with the phone's camera. And the projection on the camera is orthographic.
Without more detail it's difficult to say with certainty, but the first thing I would suspect is whether you've culled layers on your lights or your cameras.
What "Layer" are the lights on? Are the cameras set to ignore these layers?
What "Layers" are the lights set to illuminate? Are the objects on these layers?