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
vote
0answers
53 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 ...
3
votes
1answer
134 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, ...
3
votes
1answer
155 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 ...
1
vote
1answer
42 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 ...
15
votes
3answers
920 views

How can I model a star?

I'm trying to model a star in Unity, and it, sort of works, but it's not ideal. Currently, I'm using a large sphere with a self-illuminating material containing a star texture applied to it's surface, ...
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 ...
1
vote
1answer
66 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 ...
2
votes
1answer
735 views

LibGDX - Box2D: Realistic Light and Layers

I'm having some problems with my current game. Short description: It's a 2D game where you have to avoid the lights or you lose HP. My problem is the following one: Here is the rendering process: ...
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 = ...
1
vote
1answer
428 views

VertexColor shader is not working correctly in built application

I want to change the vertex colors of my mesh. The light sources must not affect the objects with this shader, its lighting must be determined only by its vertices colors, so I turned the Lighting ...
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 ...
18
votes
9answers
2k views

Does the linear attenuation component in lighting models have a physical counterpart?

In OpenGL (and other systems) the distance attenuation factor for point lights is something like 1/(c+kd+sd^2), where d is the distance from the light and c, k and s are constants. I understand the ...
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 ...
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 ...
0
votes
1answer
269 views

GL_SPOT_CUTOFF not working properly

I'm new to OpenGL. I'm studying OpenGL 2.1 and I'm trying to make a little program to test the GL_SPOT_CUTOFF property, but when I set a value between 0.0-90.0, the light doesn't work and everything ...
1
vote
1answer
521 views

Lighting shadow casting sprites with box2Dlights

I currently have something like this using box2Dlights Ideally, I would like objects casting shadows to be lit, so the object is lit but there is still a shadow cast around it. Right now the object ...
6
votes
2answers
754 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 ...
1
vote
1answer
79 views

Unreal Engine 4 Point Light Limiters..?

I've noticed through the first two tutorials I've done that Point Lights begin entering the viewport with red x's on them. When I build those don't turn on. It seems to be implying some limit to the ...
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 ...
0
votes
2answers
131 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 ...
2
votes
2answers
318 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 ...
1
vote
1answer
165 views

Deferred rendering: camera inside point light's sphere of effect

I'm trying out deferred rendering and I'm using the tutorials at http://ogldev.atspace.co.uk. I've got the basics working and I'm currently trying to implement the final step from tutorial 37 ...
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 ...
4
votes
1answer
2k views

Libgdx - IsometricTiledMapRenderer and light shading

I am wondering if there is any way to simulate light shading in Libgdx using an IsometricTiledMapRenderer. Here is my code to draw an isometric map, it's able to be moved around with the mouse and ...
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
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
2answers
71 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 ...
2
votes
2answers
973 views

How to do directional per fragment lighting in world space?

I am attempting to create a GLSL shader for simple, per-fragment directional light. So far, after following many tutorials, I have continually ran into the issue: my light is specified in world ...
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 ...
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 ...
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
33 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
44 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
29 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
73 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 ...
1
vote
0answers
48 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 ...
1
vote
0answers
104 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 ...
8
votes
1answer
1k views

How to occlude lights in Unity3D?

First off, I own Unity Pro. I've been looking in to occluding lights when they aren't being viewed for a while now to improve performance. The main methods I ran in to were using BecameVisible() and ...
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 ...
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 ...
7
votes
3answers
6k views

How do I fix this weird lighting problem?

I'm making a small game in Unity, and some models are displaying very ugly shading. The shading usually looks funky along the edges between triangles. I'm pretty new to working in 3D; I bet this is ...
1
vote
3answers
423 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 ...
2
votes
1answer
246 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 ...
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
89 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
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 ...
2
votes
2answers
147 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 ...