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.

learn more… | top users | synonyms (1)

-1
votes
1answer
54 views

How should I make torch light diminish more naturally? [closed]

I am trying to program a torch to burn out, and thus diminish the intensity of it's light a bit more realistically. This is a question about game mechanics, not game graphics, the rendering itself is ...
0
votes
0answers
33 views

How to darken certain parts of my scene, Unity3D

I'm trying to darken certain parts of my Unity3D scene (an enclosed room to be specific). I've tried researching this, but couldn't find anything. I've read that using Lightmapping and Light Probes ...
3
votes
1answer
50 views

2D deferred lighting calculations not working

I have the following code for my HLSL pixel shader. Modified from another post here on GameDev (Link), but I have a few problems with it: // calculate UV and get texture and normal. float2 UV = ...
0
votes
1answer
23 views

SVD vs Normal decomposition for BRDF compression

In the slides over here by NVidia, they describe methods for BRDF compression. They first create a BRDF matrix where each column(or row) corresponds to a single light direction (or outgoing view ...
3
votes
1answer
26 views

Ray tracing - BRDF using Cornell measured spectral data

I wrote a ray tracer that implements various BRDF models (Oren Nayar, Lamber, Torrance Sparrow and so on). Now I'm trying to implement a BRDF from measured data. I choose the Cornell database data ...
6
votes
2answers
750 views

Where to cast light/shadows in a 2.5D view?

I'm working on a tile-based 2D pseudo top-down/side-on game very much in the graphical style of Prison Archiect. More specifically, I'm referencing their style of drawing wall tiles where you can see ...
2
votes
0answers
51 views

Would this 2D Lighting and Shadows implementation work? [closed]

I'm writing a top-down 2D tile-based game and I'm trying to decide on how to implement lighting and shadows. The game will have a large number of light sources, some static and some moving around the ...
1
vote
1answer
32 views

OpenGL ES 2.0 facet lighting

I am trying to figure out if there is a way to achieve facet lighting in OpenGL ES 2.0 without extensions. I know it is possible if I don't used indexed vertices but I don't really want to do that ...
2
votes
2answers
67 views

What is the difference between PBR and SSR

I am very new to game development and I have been trying to understand the difference between Screen Space Reflection and Physically Based Rendering. I have read about PBR, and from what I ...
0
votes
1answer
19 views

Lights appear when run in the player although Editor playmode seems to be dark enough [Unity 5]

I've removed all the lights in my scene and the ambient lighting. It works fine in the editor play mode but when I run it on my Android or as a standalone player a light source appears. The light ...
2
votes
1answer
60 views

How can I make a ball glow and cast light?

I want to make my ball glow and cast light on other objects in the scene. The scene is generated at run time so I believe baking is out of the question. Emission materials work only when the object ...
0
votes
0answers
22 views

Only one side of the object reflects light while in the shadow

in my scene I have a plane as a floor and a plane as a building next to it, my directional light is rotated to make the building cast shadow on the road. I placed a few cubes on the road, the ...
0
votes
0answers
32 views

LibGDX Box2DLights - Global Illumination

I'm using LibGDX + Box2D to create dynamic lights in my game, but I'm currently stuck. I'm trying to light up every game object in the game with its own shadow, kinda like global illumination. Do you ...
2
votes
1answer
43 views

Polygon edges visible when using per-fragment lighting (OpenGL)

I have created a mesh in Blender (just a sphere with a texture over it; it's supposed to look like mars) and I've exported it as OBJ. I've tried it both with exporting with normals in Blender's export ...
0
votes
0answers
28 views

Unity baked lighting having noisy lightmaps

I am baking a spotlight into my scene. It is made using modular assets. For some reason it is having noisy lightmaps. Shadows are occuring where there shouldnt be any. What am I missing? I am using ...
3
votes
0answers
71 views

How do 2D volumetric lights work?

Context So in my current project (written in Java using LWJGL / OpenGL, so GLSL for shaders) I added lighting quite a few months ago, which was already an interesting challenge, having never done ...
16
votes
4answers
1k views

How can I make particles glow and cast light on its surroundings?

Im currently attempting to make a firefly effect on a dark forest. The level has very low light and the player is one of the few light sources. To let the player see the level better, I am attempting ...
1
vote
0answers
27 views

Direct3D11: Directional Shadow Maps

I've recently implemented shadow maps on my project. However, I'd like to add a feature that allows the light direction to be dynamically changed, so that the terrain can be viewed using different ...
6
votes
1answer
96 views

How do I properly light characters in a Unity scene?

I made a game prototype and want to improve some of rendering the visuals through light baking (which I'm new to). While I was mostly able to do this in my environiments, I'm having issues doing this ...
1
vote
0answers
46 views

Point Light shows black box & rect (PointLight not working) - libgdx 3D

I am creating a 3d scene currently a box and rect, and trying to enable lighting. When i create a PointLight and add it to Environment everything turns to black color? all i want to do is ...
2
votes
2answers
76 views

How do I implement a flashlight in SDL2?

I'm a beginner trying to implement a flashlight in SDL2, but can't figure out a good way to do it. I've found a way to manipulate the background's color; changed it to dark and back to its normal ...
2
votes
0answers
36 views

Problem with baked lights

I'm working on a 3D gallery experience and I'm having some difficulties regarding directional and point baked lights. When I build it for web with webgl, only global lights are rendered, but when my ...
1
vote
0answers
102 views

Unity 5 lighting broken

EDIT: I've discovered the cause of the problem and it might make more sense if I continue in another question. To start with unity has decided that lighting inside reflection probe bounding boxes is ...
2
votes
1answer
43 views

Efficient Per-Tile Lighting Technique

Quite a few of the 2D games that I have seen use per-tile lighting, where each tile has a set brightness (continuous scale of 0 to 1, for example). One way of calculating the brightness of any one ...
3
votes
1answer
128 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
vote
1answer
74 views

How to combine tiles in a procedurally generated level in 2D tile based maps?

I am developing a 2D tile-based top-down game. It is currently instantiating square objects with a sprite renderer to procedurally generate the map. Each floor and wall is a 1-unit wide object. I ...
2
votes
1answer
57 views

Calculate angles between two other angles

I am trying to implement a FOV for my light casting algorithm. In the diagram below each white line represents a ray cast from a std::vector<float> of normalized radians. How can I only include ...
1
vote
1answer
88 views

Unity — custom shader behaves differently on WebGL deployment (correct) and editor view (incorrect)

I started working on shaders and lighting on Unity3D 5.2.1f1. I set up a scene where the sun object rotates the directional light (the only light in the scene) based on its position to simulate a ...
1
vote
1answer
64 views

Java Slick2d lighting using Raycasting

I am trying to make a top down view game in java using the Slick2d library, for lighting I wanted to do something like this : http://www.redblobgames.com/articles/visibility/. I was wondering if there ...
1
vote
0answers
44 views

How to make lens flare ignore layers work with first person character in Unity 5?

I have a simple lens flare on my directional light (sun) and I would like the flare to only be visible when the sun is directly visible, naturally...But right now with the default ignore layers, the ...
1
vote
0answers
45 views

Trouble creating fog and lighting in unity

I am trying to create a model in unity that looks like this picture by Escher I can create the lattice, however, I can not create the fog and background/lighting effect. When I adjust the fog in ...
2
votes
2answers
309 views

Unity 2D Alpha cutout layer for Sprites

I'm trying to make a simple Fog of War effect for my 2d game, similar to these: . I want to have a sprite layer of black and then have a sprite to cut out itself from the black layer, leaving a ...
2
votes
2answers
144 views

How to fix flare in unity?

I have a simple sun flare that I would like to appear on my directional light (sun). However I cannot see the flare, I have tried setting the ignore layers to everything and checked and double checked ...
15
votes
1answer
2k views

Phong lighting - there is something very strange with specular lighting

I implemented Phong lighting. Everything seems to work - torus and spheres are lighted as expected, etc. But I notices something strange regarding specular lighting of directional light. Here are two ...
2
votes
1answer
76 views

How to remove voxel lights with Minecraft-style algorithm?

I am making a voxel game. I have researched lighting techniques, and the minecraft-style algorithm appears the most efficient. When blocks are placed, they are marked for update. The engine performs a ...
2
votes
1answer
50 views

Check if .dds texture is gamma-corrected

How can I check if .dds texture is gamma-corrected? It seems to be gamma-corrected since after manual gamma correction in fragment shader image is too bright. But I wanted to be sure.
1
vote
0answers
117 views

Unity 5 - Textures look strange in Deferred Rendering

I've created an exterior terrain scene in Unity 5 which features lots of trees and grass but some textures look awful and I'm wondering why. Please see the attached image: This texture problem is ...
4
votes
1answer
440 views

Memory-Efficient, Optimized Terraria-Like 2D Lighting

I am working on a terraria-clone and I am aiming for it to be able to be run on most Android devices. I am able to generate a world, jump around, etc but I am not looking to add in some efficient ...
2
votes
2answers
355 views

How to achieve lighting like this in Unity for 2D games?

How could I accomplish a lighting effect something similar to this game?: I'm not talking about the shadows but about the glowing/lighting effect on the crystals and the torches. Anyone got any ...
3
votes
1answer
152 views

deferred tiled lighting

EDIT I have discovered that it does not seem to be the lighting calculation but the culling code because when i draw the lights without the culling it works perfectly. I have been attempting to ...
0
votes
0answers
44 views

Offscreen frame buffer lwjgl

I want to create simple 2d lighting. So my idea is to render everything on the default buffer and then apply light mask. For the light mask i want to use frame buffer which later i will apply on the ...
0
votes
2answers
130 views

2D TileMap smooth lighting

I want to implement (a smooth) lighting into my 2D Maps. I want to have the basic idea. What I thought of is 2 components. The Scene's Ambient light: The Tiles and Sprites are tinted into this colour ...
1
vote
0answers
69 views

Instancing meshes messing up scene lighting

I've been rendering a scene (some objects over a large field of grass) to test shadow mapping which is working fine. But when I use instancing to "gain" performance, I not only get a decrease in ...
1
vote
3answers
410 views

Unity LoadLevelAdditive and baked light scene settings

I am a programmer for a small game. For our levels, I separated the UI from the level data, so one scene is a scene which contains only the UI, the other scene has all the gameobjects and models and ...
1
vote
1answer
41 views

Shading a 2D visibility mesh to act like a light?

I have a visibility mesh made by raycasting: https://my.mixtape.moe/omjlgr.webm Right now, I'm using a shader to color the mesh white and fall off with distance and radius (the texCoord in this case ...
2
votes
1answer
244 views

How to create 2D shadows and lighting?

How do I create shadows and lights in a 2D top down perspective game? I want to achieve an effect similar to this game (also made in unity) where some objects like a torch, different sprites, and the ...
1
vote
0answers
23 views

My Directional light lights the floor of my cave but not the ceiling (concave mesh)

I am developing a small demo with Meshes created from a vertex map. When i put a hole in the mesh (making it concave) the physics work fine but the directional lightning only lights one part of the ...
1
vote
1answer
387 views

JS Canvas - Creating 2D Game lighting effect like Terraria

I just started working with canvas in HTML5 and with javascript. I'm pretty satisfied with my game so far: http://xenopal.dk/game-v1.1/. But I'd like to implement lighting as well in the style of ...
10
votes
1answer
266 views

How can I implement lights & shadows in a multi-layer 2d tilemap?

I am in the process of writing an isometric game from scratch, and I'd like to know how/if I can add lights and shadows. The code I have so far can be found here, but it should be enough to know that ...
1
vote
1answer
43 views

Calculating the illumination level of an object

In my (UE4) scene I have an object and several (point) light sources. The object can move around, getting closer and away from all those light sources. Now I need to calculate for each light source ...