Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

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.

0
votes
0answers
27 views

How to do lighting for endless runner game?

I have been working on a endless runner game for a month now and have to do basic lighting. In my game Player moves forward and world is being generated according to player position. So the positions ...
2
votes
2answers
86 views

Minecraft-Style Voxel Sunlight Algorithm

I'm implementing a pure Minecraft clone, and I want to implement sunlight. I have a basic sunlight algorithm working perfectly in 2D, and I understand how to scale it to 3D. But how do I make it so I ...
0
votes
0answers
41 views

Unity Soft Shadows

I'm building a puzzle level in Unity. I have a ball with cracks on it and a point light inside it. The goal is to project the light coming through the cracks into the walls. I've managed to do that ...
0
votes
0answers
15 views

Precomputed realtime global illumination in unity

I'm trying to learn and understand how to use this option in unity and I'm working off the example given in this tutorial https://unity3d.com/learn/tutorials/topics/graphics/introduction-precomputed-...
0
votes
1answer
22 views

Unity point light baking into lightmap

I'm developing a puzzle with a ball with cracks on it. Inside the ball there's a point light. Its light rays come out of the cracks and hit some platforms (walls/ceiling/floor). To solve the puzzle ...
0
votes
0answers
35 views

Looks like render in Unity ( Light Shaft on Particles etc.)

guys, i hope someone can help me, i want to get a looks like rendering, like a screen, i can buy Aura 2 and use volumetric light to have affect on Fireflies, and make a light shaft / good ray? The ...
0
votes
1answer
49 views

Variable number of light sources

I'm going to be writing a very simple renderer, mainly for learning purposes (using OpengGL). I've been wondering about how to implement support for dynamic number of light sources. Two solutions that ...
0
votes
1answer
25 views

WebGL - two different approaches to Point Light: what is the difference?

So I'm studying Webgl and after directional light I'm approaching point light. So I've seen two different approaches: Take the directional light (diffuse and specular components) and multiply them ...
1
vote
1answer
16 views

Unity is Creating Black Boxes when I look around

Please help me with this issue. I believe it came about after I finished tweaking post processing behavior in a minor way. If anyone has any idea please share it. I tried to rebake lighting on both ...
0
votes
0answers
15 views

Projected Light Cookie Has Its Texture Edges Instead of Spotlight Circular Edges

The projected light of Unity Spotlight on a flat surface is almost a circle: But when I add this light cookie: It renders the following projection: I expect the projected image takes the ...
0
votes
0answers
39 views

UE4 Error lighting needs to be rebuilt

I opened a blank project that came with two types of flooring, a table with two chairs and a statue. The only things I modified was the size of one of the floors and the texture of the two floors. ...
1
vote
0answers
64 views

How to lower the cost of realtime lights?

Besides Deferred rendering, what can I do to make realtime lights cheaper to render? I don't really need them but I could make good use of them in my game. BTW I thought Deferred render would give me ...
0
votes
0answers
19 views

Light is breaks after added light source with bake mode. Why?

I added spotlight to the scene and set mode to 'Bake'. After baking the light objects have incorrect color (only on wall segments). My wall consist of segments (diffrent 3d object). I don't understand ...
0
votes
0answers
16 views

Incorrect shading after building light

Whenever I build light in Unreal, the light doesn't seem to reflect off of objects correctly. This seems to happen with basically anything I import into the engine (I use Blender for all my meshes) [...
0
votes
0answers
49 views

Unity: how to mimic the lighting of a mesh as seen in the editor view

I have a camera which shows a "bird's eye view" of a procedurally generated mesh like so: Currently in the editor view (right), the terrain looks exactly as I would like it to. However, in game (left)...
1
vote
0answers
47 views

Alpha is not working in diffuse light shader

I am following this tutorials series on rastertek.com and I got a bit stuck on the Diffuse Lighting Tutorial. Particulary, the part that does not work for me is alpha channel of the light color. Here ...
0
votes
0answers
34 views

Specular/Diffuse light on an icosahedron opengl

I'm having a problem with my model here. I draw an icosahedron using GLUT, and the edge length is set to 0.8. The info of the coordinates are listed below: (X and Z are calculated since our edge ...
0
votes
0answers
30 views

Prefabs imported from asset bundle are not lighting properly

It only happens in my main game project. I've tested it in 2 other empty projects, both in multiple versions of unity (2018.3.0f2 and 2018.3.2f1). The strange thing is that if I look at the material, ...
0
votes
0answers
75 views

Reflection captures need to be rebuild message wont go away

So I have a problem. I can't seem to get rid of the message saying reflection captures need to be rebuilt. I have built the lighting and clicked on build reflection captures but the message is still ...
0
votes
0answers
25 views

GLSL and normal mapping

I'm trying to implement normal mapping on my existing shaders, but I'm definitely doing something wrong, probably related to the TBN matrix. The point is, while drawing two perpendicular walls with ...
0
votes
0answers
17 views

Missing shadow: why?

In these scene, i can't figure why, my player, and object it place, can't cast shadow on floor. All other static objects in scene cast shodow correctly. There is a floor with it's material, then ...
1
vote
0answers
59 views

Realistic intensity of a sun in Unity to match the outside world

I am creating an ARCore application in Unity where I want to make lighting shadows that match the real lighting outside. For this, I have made a rotational directional light that simulations the ...
0
votes
1answer
74 views

LibGDX Box2dlights - Body Shadow Problem

While playing around with the box2dlights with libGDX, I have managed to get it all up and running, but have a problem with the shadow rendering. This is what I currently have atm: With the lighting ...
1
vote
1answer
76 views

Lighting in Unreal is not fluid, lighting changes drastically at object “borders”?

I used the starter content's wall objects, an atmospheric fog, a directional light and this is the result: As you can see, it's obvious where the new object starts. Why?
4
votes
2answers
122 views

How to implement a clipped shadow in 2D?

I want to create a shadow effect similar to the one found in JoyMasher's Blazing Chrome. Notice that the shadow clips when you're on a ledge, and projects to the geometry below. Currently, my ...
1
vote
2answers
75 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 ...
1
vote
1answer
145 views

SceneKit flickering with Ambient and Omnidirectional lights

I have a project where I have a sphere with a png texture that represents a planet (or a moon in the videos I'm attaching). Wrapped around that sphere I have a hexasphere (implemented using the ...
2
votes
0answers
20 views

Unity Lighting Problems [duplicate]

I've got a problem with the settings of lighting in my unity scene. The objects have got "dark sides" and it doesn't look natural. You can see the screenshots and my light settings here: The ...
8
votes
1answer
359 views

How can I implement a revealing light beam?

In SEARCHLIGHT, you control a ray of light that illuminates incoming enemies that are otherwise invisible in the night sky. Here is an illustration: How would I go about doing this, preferably in ...
1
vote
1answer
117 views

OpenGL Deferred Shading Pixelation

I'm working on a 3-pass deferred lighting system for a voxel game, however I am having problems with pixelated lighting and ambient occlusion. The first stage renders the color, position and normal ...
0
votes
1answer
70 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
2answers
539 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 ...
3
votes
2answers
222 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
28 views

Unity Skybox for Realtime lighting

I have a Directional light as my "sun" which goes with the local time of the computer being used. However when it's night time the scene is excessively dark. I added another directional light to act ...
0
votes
0answers
46 views

Bright lights produce strange artifacts on Android

I'm testing lighting on Android and I'm getting strange artifacts when the light is increased. I'm not sure if this is normal with Unity or a setting somewhere is unchecked. The only light in my ...
0
votes
1answer
105 views

Light and shadows like Diablo

I wanted to have shadows in my game and thought the way they were implemented in Diablo was good enough. Any hints on how to produce a similar outcome?
1
vote
1answer
183 views

Getting dynamic objects to match baked lighting on nearby static objects

Here's how the hallway in my game looks now: You might notice the dark section near the centre of the screen; This is, in fact, a pair of cupboard doors which are not set to static and so don't get ...
0
votes
1answer
163 views

Directional light shadow on terrain

When player is walking on terrrain, around him Unity is rendering shadow coming from directional light. But after some radius in the distance, shadows are not rendered. Only when player walks close ...
0
votes
0answers
198 views

Dissolving fog of war when entering a room

I want to achieve a similar effect to what you see in the following clip from Enter the Gungeon. When a character enters a new area, I want a dissolving fog of war which begins dissolving at the ...
1
vote
1answer
13 views

Normal doesn't appeared on shadow/dark area in Mobile Shader

Let's look at this picture: You can see the red rectangles, those are shaded by normalmap. Here, is the same model with different light angle, there's no normal shading in dark area. It only ...
2
votes
1answer
477 views

Strange realtime shadows in Unity3D

I'm trying to do realtime lighting, and my shadows are acting very strange. When I project a spotlight out from the camera (like a flashlight in a first person game) my shadows show up as 3D skews of ...
3
votes
0answers
167 views

Moving directional light cause huge fps drop: why?

I've implemented a simple script to simulate Sun Rotation (day/night cycle). In my "Update" i Rotate main Directional Light (the sun). What i've noticed is that my FPS dropped from 60 to 20-25 fps. ...
0
votes
1answer
90 views

Artifacts in unity shading

I created block of 3x3x3 cubes, disabled shadows, set directional lighting color to white and ambient to black. And I'm getting this: Any idea what is going on and how to fix it? Effect is visible ...
1
vote
1answer
467 views

What's the use and difference between Forward, Deferred and Physically Based Rendering?

Maybe I'm still confused about my own understanding, Forward Render: render the lighting of an object according to the light source in the scene. (e.g Phong) Deferred Render : render the scene to ...
0
votes
0answers
40 views

How to Handle Lighting from a 3D Game Engine with a Roguelike Game using Shadowcasting

Normally the shadowcasting will, from the player position, set a brightness amount to each relevant tile. Yet I'm making a roguelike with a 3D map, and Unity has lighting. Currently I have the player ...
0
votes
1answer
29 views

Unity2D: Sprite Mesh Lighting Issue

I am trying to make my 2D mesh render sprites with the same brightness as the original file. On the below picture, the mesh on the left is darker than the UI Image on the right, which is an exact ...
0
votes
0answers
81 views

Half-shaded pixel artifacts on 2d dynamic lighting shader

I'm working on a shader for dynamic lighting in a 2 unity game. I'm new to shaders but I've managed to get something close to the effect I was looking for, although not 100%. As you can see in the ...
1
vote
1answer
132 views

Unity3d - Cast dynamic shadows without processing multiple lights

Back Story I've built a game with a friend and all goes well until there are too many spheres under a group of 5 lights, then things start getting choppy. Troubleshooting I've found that by turning ...
1
vote
1answer
127 views

Unexpected lighting on cube

I am following a tutorial for 3D game development in Java, using LWJGL. I have completed all chapters up to chapter 14 - Terrain, inclusive. The tutorial is in Java, but I'm using Scala. My full code ...
1
vote
1answer
127 views

efficient 2D light source

I wanted to add a light source for a project I'm working on, and luckily I had some code based on this article: http://ncase.me/sight-and-light/, but when I ran the code after carefully transplanting ...