Questions tagged [lighting]

The simulation of light and illumination in games, including its interaction with the environment. A core element of games that can bring out vivacity into otherwise static worlds.

Filter by
Sorted by
Tagged with
0 votes
0 answers
19 views

Multiple Dynamic Shadow Casting Light Sources

I am trying to wrap my head around how to best tackle shadows and there seems to be no great solution. I'll try to break my question up as best I can. All the examples I can find show how to do ...
  • 222
0 votes
1 answer
43 views

Surface normal vs tangent space

I am having a hard time being convinced why calculating the tangent space the way most textbooks do is the best thing to do? Why shouldn't we just simply use the edges of our triangle as Tangent and ...
0 votes
0 answers
30 views

Generate Uniform distances in Distance Field without Square Textures?

Following this Godot Tutorial I've been implementing a shader for 2D global illumination. In the tutorial it mentions adding a UV to World aspect ratio change within the raymarching function to ...
0 votes
0 answers
28 views

How do I set the target sorting layer in Unity Light2D using Universal Render Pipeline (URP)

I'm making a top-down shooter game and I'm trying to add a muzzle flash by using URP light 2D. I'm trying to set the target sorting layers for the URP Light2D. I've looked in the documentation and ...
  • 1
0 votes
1 answer
34 views

Change environment saturation based on exposure to "light source" - Unity

I am trying to make a game where particular "light sources" bring color to an otherwise grey world. I am extremely new to the world of custom graphics processing. I assume it will require a ...
  • 3
0 votes
1 answer
48 views

Adding second light hides the first on iOS unless quality is set to high

When I add a light in the scene then the light will show on the ground, but when I add a second light, neither of them show on the ground. One light: Add second light: My light is a spot light, and ...
0 votes
1 answer
52 views

Why does lighting on the object changes when I import it as Unity Package from my old project to new one?

Here is the original lighting ( Unity 2021.1) And Here is the same setup imported in a new project ( Unity 2021.1): As you can see importing this package in new Unity project makes it a lot lighter ...
  • 131
0 votes
0 answers
71 views

Gaps in shadows even with zero bias set Unity

I have a problem with gaps in shadows in Unity. I know that there are many questions about that, but all of the answers are usually about setting bias property to 0. But this didn't help me. I use ...
1 vote
1 answer
61 views

HDRP indoor scene has no diffuse indirect light

The lights in my indoor scene correctly produce direct illumination, but no indirect diffuse illumination. So the areas that aren't directly lit are completely black before exposure/post-processing. ...
1 vote
0 answers
98 views

How to calculate geometry term from "Multi-Scale Global Illumination in Quantum Break"?

In presentation "Multi-Scale Global Illumination in Quantum Break" from SIGGRAPH 2015, on slide 105, they present concept of geometry term, which is used to help with light leaks in volume ...
  • 111
1 vote
1 answer
68 views

Inverse Spot light

A central mechanic in my game involves shining a flash light on a glass sphere, which then focuses the light like a magnifying glass in order to burn enemies. The flash light was easy to implement - ...
1 vote
0 answers
92 views

Strange lighting/shadows in Unreal Engine game (shadow suddenly gets darker or lighter)

As the title suggests. I have made a level for Unreal Engine. It uses RectLights in the ceiling without any directional lighting. There is a Lightmass Importance ...
1 vote
1 answer
67 views

Determine if a static mesh is lit by directional light

I want to determine if a mesh is lit by the directional light on my scene in editor to automatically disable its "dynamic shadow casting" property (let's say I have one light source in my ...
0 votes
0 answers
25 views

Procedural Terrain Computing Normal in Shader

I've been pulling my hair out on this. I'm trying to paint a procedural terrain. The white ball in this photo is supposed to be the light source. However, it looks like it is shining black light. The ...
  • 111
0 votes
0 answers
39 views

Problem with pointlight used as "cubic" light

I'm now applying my recent work to some "real" game level and find an issue with the lighting. In this level I'm using a light source which should be like a "cube" (see picture). I'...
  • 57
0 votes
0 answers
88 views

What's the solution to this kind of shadow acne?

I'm working with a OpenGL ES/GLSL homebrew engine my company developed, in C++. Below is a screenshot of it rendering shadow acne. The light's direction is too perpendicular to the face of the curve ...
0 votes
1 answer
72 views

How do I fill a scene with light by using real-time lights in Unity?

This is my scene: Components of this scene: Cube Spotlight This project is under URP and I am building it for android. In this scene, I want more indirect lighting so that the objects/materials ...
  • 1
0 votes
0 answers
20 views

Problem of lights in mirrored scene

I've achieved foward or deferred rendering of mirrored scene but I have a small trouble with the ambient directional lighting (both forward and deferred). I'm using a worldobjectmatrix * ...
  • 57
0 votes
1 answer
43 views

How do I adjust the start diameter of a spotlight in Unity?

To clarify, I'm an experienced 3D modeller, but there are hiccups here and there getting used to Unity's interface. I'm working with an adjustable spotlight for a game; it can be mounted and directed ...
0 votes
0 answers
28 views

How to calculate if a complex shadow matches a Texture?

Unreal 4.27, newbie and experimenting, will switch to 5 if supporting features are not available in 4. I have a light on the left side of the room pointed toward the right side. In the middle of the ...
  • 101
0 votes
1 answer
17 views

Math function equivalence for deferred transparency blending

if one consider the following blending operation: color1*src_alpha blended with color2*(1-src_alpha) Where ...
  • 57
0 votes
0 answers
79 views

Why Area light looks like Circle light? ( Unity )

All my Area light with Rectangle shape but after baking I get this circle shape ligh. Why?
0 votes
0 answers
162 views

What is a good method for 2D isometric lighting in Pygame?

I'm making my first isometric game in Python using Pygame. It's a 2D tile-based dungeon crawler, but I want to create a nice lighting system. I've made a random level generator that creates the rooms ...
  • 101
0 votes
1 answer
39 views

Storage of surface and vertex normals

I am writing a program that displays a bunch of 3D objects in a room with lighting. I am doing that from scratch, so I have to implement normals calculation myself. Say I have a set of 3D points ...
  • 3
1 vote
0 answers
663 views

Spotlight and Point Light not working in HDRP

I have a Unity project using HDRP, and in my scene only directional lights work. Spot lights and point lights don't work, even if set them to a super high value. How can I correct this?
0 votes
1 answer
195 views

How can I make my Unity 2d scene pitch black, except for manually added lighting?

I have tried modifying all the settings suggested that I can find, but the lighting of objects in my Scene remains unchanged. I've used the "Generate" button, I've set "Intensity ...
0 votes
1 answer
204 views

Scene lightning is wrong when scene is loaded from a different scene

I have a problem with the light in my scene. If I start the scene directly, it looks like I want it to be. If I load the scene from another, the light is too dim. Lighting is still applied, but ...
  • 2,375
-1 votes
1 answer
109 views

Is diffuse reflection definition failed when we see both reflection(diffuse,specular) is happening on one single object?

Let us consider the situation where only we moved the camera. The object and the light source remain in the same place. Thus the angle of the incident light is the same for every point.I have captured ...
0 votes
1 answer
219 views

Changing Ambient Light settings in Environment window does not affect scene after baking LightMap

My settings: Unity version - Unity 2021.1.12f1 Lightmap Lighting Mode - Bake indirect Render Path - URP I want to change Ambient Light in Environment window while I have baked LightMap. Is it possible?...
1 vote
1 answer
337 views

Why specular reflection portion changes when we move in different direction?

We know that in Specular reflection rays reflected off surface at inverse angle;so camera position matters;creates bright highlights. I have taken one image where specular reflection is seen(Here ...
2 votes
0 answers
58 views

Best practices for treating Light Volumes in Deferred Lighting pipeline

This topic is about ways to handle light volumes in a deferred lighting pipeline. I currently have a deferred lighting pipeline where spheres are sent to an openGL GLSL lighting shader. The sphere ...
  • 21
0 votes
1 answer
78 views

Improving performance of lighting on mobile

I'm trying to make a 3D game for mobile. When rendering a very simple scene, my performance drops from 60 fps to 30 fps when I use fragment shader lighting instead of vertex shader lighting. I really ...
  • 17
-2 votes
1 answer
142 views

GL error GL_INVALID_OPERATION: mismatched type setting uniform of location "4" in program "1"

I get this error while trying to add lighting ...
's user avatar
-1 votes
1 answer
73 views

How do I add light to my textures?

How do I add light to my textures using this? I have this GLfloat ka = 1.0; glm::vec3 ia = glm::vec3(0.5f, 0.5f, 0.5f); and in the fragment shader ...
  • 1
2 votes
0 answers
264 views

Tweak brightness of widget in UE4

I would like to make an interactable monitor in Unreal Engine 4.26. I am using the default material for widgets as you can see in the image below: The texture I would like to show is: When I drive ...
0 votes
0 answers
186 views

Lights do not fully respect SortingLayers in Universal Render Pipeline

I just installed Universal Render Pipeline (10.5.1) into my Unity (2020.3.15f2) 2D project and believe I have everything configured correctly. I created a new RenderPipeline asset I deleted the ...
  • 1,327
0 votes
0 answers
77 views

Have object accept shadows cast from other objects without receiving lighting (Unity)

I have a map object with textures (including lighting) baked in. I want to have a realtime directional light shining on my character walking on the terrain such that the character shadow is cast on ...
2 votes
2 answers
473 views

How can I create a shader which makes an object transparent in bright light and opaque in low light?

I'm trying to set up a shader that, as the title says, functions similarly to the effect appearing in the "Lights Out" horror short film. Cut down to the very basics, I'm looking for advice ...
0 votes
0 answers
73 views

Fade in / Show unity lights only at a specific distance from a camera

I noticed that in URP point / spotlights are not initially visible at a distance and then they sort of fade in the closer they get to the camera. I am wondering if I can control this behaviour somehow?...
  • 143
0 votes
1 answer
265 views

How to calculate the shadow bounding box with a directional light

I'm trying to implement a directional light in my C++ / OpenGL engine, but I struggle to calculate the shadow bounding box (i.e the shadow frustum). The bounding box has to encompass the main frustum ...
's user avatar
0 votes
0 answers
31 views

Shadows issue in Unity

I am using Unity Built-in render pipeline 2020.3.5 I have a weird shadow projection when pointing at game objects with my flashlight (spotlight). It looks like the shadow is floating or is another ...
0 votes
1 answer
78 views

How to lerp between diferent spot angles

I have this code that Change spot angle randomly between 'minAngle' and 'maxAngle' each 'interval' seconds: ...
0 votes
0 answers
60 views

Is there a technique to properly illuminate a PBR material when using directional light?

I use the following formula to calculate PBR color for each light source. For the sake of this post, let's assume that there is only one directional light. I am using Vulkan; so, +Y is "down"...
  • 189
1 vote
0 answers
191 views

Unreal 4 - Static mesh has strange, glitchy shadows?

The first image below shows my mesh in Blender with the Blender lighting, and the second image from inside UE4 has this weird shading on it. Is there any way to help it look like the first image? I've ...
1 vote
1 answer
175 views

Unity Light Bugs in Android

I was testing my game, so I made a build to test it on my phone. I noticed that when I play in an android build, it is so darker than when I play in the editor or in a PC build. It looks like this in ...
0 votes
1 answer
506 views

How to make a shadow-casting day/night system in 2D URP?

I am trying to achieve a day/night lighting system similar to the game RimWorld. Short preview of what I want can be seen here: https://giphy.com/gifs/VgzcwtjueP7BrYSrXe Instead of using Global Light ...
1 vote
0 answers
27 views

Perspective of a Point Light

I'm trying to calculate shadows by projecting the silhouette of each object seen by the light source. (The shadows are just going to go on planes.) To get each silhouette I take a snapshot from the ...
0 votes
0 answers
51 views

Unity Light Bug

I saw this while testing my game. I have a light situated behind the Main Camera. All is working perfect, until I get a Game Over, and changes to the Game Over scene. From then, all lights have no ...
0 votes
1 answer
45 views

Lights beyond the fourth do not appear?

In my scene there are 6 point lights. But 2 of them do not illuminate my floor plane. If I disable any of the working lights, then one of the non-working lights starts working. It's like my level can'...
  • 507
0 votes
1 answer
270 views

Unity baked light messes up a set of objects

On a few objects I use a technique where instead of using geometry, I place planes with a Cutout Material on top of each other, creating a 3D illusion with minimal cost. The thing is, it looks great ...
  • 103

1
2 3 4 5
14