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)

0
votes
0answers
45 views

2d Lighting over Sprites in C#

I am currently working under a project , a small application where i have to implement 2d lighting . For example , in the GDI+ canvas , a image will be drawn and i will have to put a lighting effect ...
-2
votes
2answers
70 views

How do I properly combine the colors of different lights?

Let's say I have 4 light colors: (0.6,0.0,0.0), (0.0,0.6,0.0), (0.1,0.1,0.1), (0.1,0.1,0.1) And now I want to combine them properly. I can't add them together, because if I add for example 3rd ...
0
votes
1answer
83 views

Weird squares everywhere

So in unity I have some weird squares on surfaces of certain objects, which are buildings represented by planes: I don't know what causes it, I tried changing some settings in lighting and ...
0
votes
0answers
35 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
51 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
27 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
758 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
52 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
34 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
79 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
62 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
36 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
46 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
30 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
75 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
50 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
77 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
107 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
44 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
138 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
78 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
93 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
67 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
45 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
46 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
327 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
154 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
51 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
124 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
442 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
365 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
157 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
136 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
70 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
436 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
44 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
253 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
396 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 ...