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
1 answer
40 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 ...
user avatar
0 votes
1 answer
49 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 ...
user avatar
  • 127
0 votes
0 answers
59 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 ...
user avatar
1 vote
1 answer
36 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. ...
user avatar
1 vote
0 answers
88 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 ...
user avatar
  • 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 - ...
user avatar
1 vote
0 answers
61 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 ...
user avatar
1 vote
1 answer
58 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 ...
user avatar
0 votes
0 answers
23 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 ...
user avatar
  • 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'...
user avatar
  • 47
0 votes
0 answers
86 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 ...
user avatar
0 votes
1 answer
48 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 ...
user avatar
  • 1
0 votes
0 answers
19 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 * ...
user avatar
  • 47
0 votes
1 answer
33 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 ...
user avatar
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 ...
user avatar
  • 101
0 votes
1 answer
16 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 ...
user avatar
  • 47
0 votes
0 answers
42 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?
user avatar
0 votes
0 answers
132 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 ...
user avatar
  • 101
0 votes
1 answer
37 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 ...
user avatar
  • 3
1 vote
0 answers
506 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?
user avatar
0 votes
1 answer
152 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 ...
user avatar
0 votes
1 answer
121 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 ...
user avatar
  • 2,350
-1 votes
1 answer
106 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 ...
user avatar
0 votes
1 answer
151 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?...
user avatar
1 vote
1 answer
316 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 ...
user avatar
2 votes
0 answers
56 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 ...
user avatar
  • 21
0 votes
1 answer
72 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 ...
user avatar
  • 17
-2 votes
1 answer
121 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 ...
user avatar
-1 votes
1 answer
65 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 ...
user avatar
  • 1
2 votes
0 answers
198 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 ...
user avatar
0 votes
0 answers
142 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 ...
user avatar
  • 1,317
0 votes
0 answers
76 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 ...
user avatar
2 votes
2 answers
367 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 ...
user avatar
0 votes
0 answers
62 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?...
user avatar
  • 143
0 votes
1 answer
246 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 ...
user avatar
0 votes
0 answers
22 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 ...
user avatar
0 votes
1 answer
70 views

How to lerp between diferent spot angles

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

When dealing with Image based lighting, are the generated irradiance map and specular ibl dynamic?

I have been reading about IBLs, trying to understand how they work; so, I can implement them in my engine. I have understood the general concept and the calculation for the diffuse but I am still a ...
user avatar
  • 189
0 votes
0 answers
49 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"...
user avatar
  • 189
1 vote
0 answers
181 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 ...
user avatar
1 vote
1 answer
148 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 ...
user avatar
0 votes
1 answer
407 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 ...
user avatar
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 ...
user avatar
0 votes
0 answers
36 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 ...
user avatar
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'...
user avatar
  • 507
0 votes
1 answer
210 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 ...
user avatar
  • 103
5 votes
1 answer
1k views

How is this lantern glow effect achieved?

I was wondering if anyone knows how this lighting effect is achieved. It's clearly not a bloom shader. My best guess right now is that it's a billboarded transparent sprite, which is animated to give ...
user avatar
  • 800
0 votes
0 answers
38 views

The scene becomes dark when reloaded

I have a prototype of a simple game. When I hit a spike, the game restarts, but when it does the whole scene becomes dark. The light intensity level stays the same. ...
user avatar
4 votes
1 answer
967 views

Invert the colour of pixels where 1 bit sprites are overlapping

I have a simple scene in Unity that makes use of some simple art that uses either white or transparent colours to create a 1-bit art design. The image below shows this. I want to have a that if two ...
user avatar
  • 143
0 votes
0 answers
17 views

Updated Unity project from 2020.2.1f to 2021.1.7: lighting is messed up, scenes are brighter

I've updated my project from 2020.2.1f to 2021.1.7 (also tried 2020.3.8), and now my scenes are much brighter for some reason: Any tips? Current I use the standard pipeline I think, because the ...
user avatar
  • 627

1
2 3 4 5
14