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
1answer
375 views

Opengl the light position always on the origin point therefore the diffuse and specular does not work

I am newbie of opengl, so I did the tutorial by learnopengl. I have a strange problem when I was trying to do the light effect (ambient, diffuse and specular). For the diffuse, the effect appears on ...
0
votes
1answer
977 views

After baking my lights again in Unity, my character is black?

I had to re-bake my scene several times before getting the look that I wanted. This last time, the scene looks great, but my characters are now very dark and the playable character is completely black....
0
votes
2answers
2k views

Unity - How to get nicer shadows from distant point lights?

I get too unsatisfying results for shadows when using a point light that is far away. (The quality settings are maxed.) The scene: The result: The light: What can I do to get better shadows?
0
votes
0answers
10 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?...
3
votes
2answers
14k views

How to avoid "completely" dark shadow using directional light (as Sun) ?

Look at my scene: Sun is rising and as you can see the scene is realistic; I mean, that what is in shadow is almost completely dark. This is correct, but i would like something less "dark", like an ...
6
votes
3answers
10k views

Lights shining through walls

I'm currently having a problem with lights in Unity. They shine through walls for some reason. Point, directional, etc. If a light is next to a wall on one side, you can see it on the floor on the ...
1
vote
1answer
184 views

How to add lighting to a 2D Tile-based game in JavaFX?

I'm making a 2D roguelike tile-based game with Java and JavaFX. I'm currently working on adding lighting and darkness to the dungeon, but whenever I try running it, it takes a very long time to load, ...
0
votes
2answers
4k views

Spotlights and Pointlights not working with Unity Render Pipeline?

I'm experimenting with URP, Render Pipelines, and Shaders for the first time recently and have noticed something odd. In the scene I'm building, Point Lights and Spotlights don't work. No matter what ...
0
votes
1answer
42 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
1answer
71 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 ...
0
votes
0answers
16 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
0answers
11 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 ...
1
vote
0answers
79 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 ...
4
votes
2answers
508 views

2.5D platformer how to darken building edges?

I was wondering how I could go about creating a vignette type effect / some sort of volumetric shadow for the 'cross section' parts of a 2.5D level. The effect I'm going for can be seen in 'This war ...
0
votes
0answers
22 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"...
0
votes
1answer
50 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 ...
0
votes
1answer
287 views

Baking lights causes weird seams on meshes. How to avoid it?

I'm trying to bake lightning in the simple scene with some imported geometry. The result is weird seams near the edges of the meshes even there is no free space between them. How to avoid it and just ...
1
vote
1answer
33 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
1answer
1k views

Unity Ambient Occlusion not working with Orthographic camera

It seems like the Ambient Occlusion setting from the Unity Post Processing stack (obtained from the asset store) only works with a Perspective camera, yet I haven't ...
4
votes
2answers
258 views

Fine tuning light shader mechanics

I'm currently trying to implement the lighting technique described in this article. I've done pretty much exactly what is done in the article. My technique is the same, and my shader is the same. ...
0
votes
0answers
64 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 ...
6
votes
2answers
343 views

How to generate a multiplier map for radiosity

I am following this tutorial: here I am at the part where you are creating a hemicube. I have got the code to render the scene into a texture and therfore an array. Now how can I generate a so-called ...
1
vote
0answers
24 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
0answers
27 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
1answer
39 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'...
0
votes
0answers
14 views

Are global lighting settings meant to be changed at runtime? Unity

I would like to influence things such as daycycle. Yet it seems that the global lighting settings are meant to be permanent. Can this be done, or is there another way of creating large lighting ...
5
votes
1answer
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 ...
3
votes
1answer
231 views

Why are 2D game tiles often lit from the top left? [closed]

I have been in to game programming for some time now, and recently ventured out in to trying to create my own pixel art. So I have learned the basics of lighting and shading etc. and noticed that ...
1
vote
1answer
312 views

Performing image based lighting in an open world game

I finally have a PBR implementation in an engine that I'm writing for a game I'm developing but I'm stuck on how to use IBL in real situations. Most IBL tutorials use it just to show a single mesh or ...
1
vote
1answer
116 views

Are realtime lightning calculated every frame , also the ones not 'visible'?

I've a big scene, with a lot of realtime light. I noticed a big drop in FPS after finished to add lights, so I suppose that too many realtime light are a 'bad practice'. But my question is: are all ...
0
votes
0answers
19 views

Ray tracing Bug with Diffuse material

I am trying to do ray tracing in python (following the tutorial given in Ray Tracing in a weekend). Basically I am shooting rays from eye and the recursively bounce around, each time they hit ...
5
votes
1answer
875 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 ...
0
votes
0answers
30 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. ...
1
vote
3answers
2k views

One side of every object is black

I'm trying to make a driving game in Unity, but recently have been having lighting issues. When I was first building it, the lighting worked fine. However, recently, one side of everything (the ...
0
votes
0answers
14 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 ...
1
vote
1answer
37 views

How to use a normal map for light effects with an AnimatedSrpite?

I am trying to add light effects with normal map on an AnimatedSprite. I was following that tutorial but with no success. I am using a Ligth2D, this sprite sheet: ...
0
votes
2answers
363 views

Disable lighting in DirectX10

I'm implementing a D3D10 version of my renderer (not porting to avoid losing Windows XP support). I didn't go straight to D3D11 because MSDN and other sources recommend upgrading to 10 and then to 11. ...
1
vote
0answers
187 views

Baked lightmap: Parts of scene appear too dark

I'm having trouble setting up global illumination in my Unity 2021.1.1 URP project Parts of my scene are appearing completely dark, I'm only using directional light and area light on the windows, here'...
2
votes
2answers
193 views

How to implement pixel art lighting as in the game Project Eastward?

Project Eastward Lighting Demo Can somebody point me to the right direction as to how this lighting is done to recreate this lighting effect? The game is 2D but uses a 3D lighting system.
0
votes
1answer
94 views

How to get light level (brightness) of a particular location?

I'm making a 2D top-down survival game similar to Rimworld, I'm trying to emulate a day-night system. Many features depend on whether any tile is light (or dark) ...
1
vote
1answer
557 views

Weird blue shine on URP Lit shader Unity

I recently started to use URP and I am noticing a weird blue like tint on shiny objects that use the URP/lot shader and I can't understand what it is and how can i remove it.
2
votes
1answer
194 views

How to create a glowing corona/halo around a sun and make it emit light

I am trying to understand material and shaders in Unity. make my object glow like a sun. For the moment I do not care if it's not looking like a star, but I would like that it at least emit light. How ...
0
votes
1answer
16 views

Lights not displayed on Sprite

I have a scene that contains 3 elements: Main Camera A 2D Sprite that renders a single white pixel image, scaled to 2000 x 1000 A point light with a yellow color What should be done so that the ...
0
votes
1answer
64 views

How can I make 3D lighting smooth?

I'm trying to view 3D objects in a terminal. Everything was looking good until I implemented lighting. I'm using shadow rays to determine where the object should be lit. Although it's working I don't ...
1
vote
1answer
258 views

How to make 2D lighting in JavaScript

I am making a recreation of the 2D voxel game Terraria in JavaScript. Like most sandbox games, Terraria has lighting, but because I am using JavaScript, performance is going to be an issue. I have ...
0
votes
0answers
32 views

How can I get my physically based sky to be blue all the way down?

I'm rendering with a physically based sky. I want to get a very simple light blue background but below the horizon the sky becomes grey/brown. How can I get it so that the sky is blue all the way down?...
1
vote
1answer
27 views

How do you simulate UV light and materials with UV-reflective/fluorescent properties within a PBR renderer?

I have a PBR setup, say, in Unity (or Unreal, doesn't really matter, I'm asking about the general principle, not specific implementation), and I would like to add a UV light source, and have control ...
0
votes
0answers
14 views

Adding lighting to custom vertex shader in Unity

What's the simplest way to add shadow functionality based on the modified vertices, nothing I've found online seems to work ...
1
vote
0answers
43 views

What is the best way to bake my own environment maps?

My engine has support for IBL by using pre-obtained HDRIs. It looks fine, but... I want the environment map to match the scene that is currently being rendered I want the environment map to take the ...
3
votes
2answers
5k views

Why are there no dynamic shadows in UE4?

So my problem is that other than for static objects which have baked shadows from building lighting, there are no shadows for movable objects, like those cubes. Neither from the Light source actor, ...

1
2 3 4 5
14