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)

3
votes
2answers
120 views

Make a light only affect one object

I'm wondering if it's possible to make a light source only affect one object? I know that it's possible to use layers and culling mask, but then I would need one layer for every single object which is ...
2
votes
1answer
227 views

2D lighting causes black rings to appear

A year ago I implemented 2d lighting in XNA using sprites. The sprites I used were created by placing a soft white photoshop brush on a transparant background. The result was this: (lights only) ...
3
votes
2answers
825 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 ...
5
votes
3answers
154 views

Random black pixels GLSL shader bug

I've recently been following a tutorial for writing a game engine in Java using LWJGL 2. I followed the tutorial for writing a fragment shader that utilizes spotlights in GLSL. The example game ...
1
vote
1answer
687 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 ...
3
votes
0answers
29 views

Light bounding geometry for deferred rendering

What is the best bounding geometry to use in a deferred renderer for each one of the following light types? Sphere area light (obviously a sphere) Disk area light (obviously a cone) Rectangular area ...
3
votes
1answer
52 views

Per-Texel lighting? (not per-vertex or per-pixel)

In my game, I have a 3D shader that does lighting using color ramps on models with very low resolution textures. Basically, the vertex shader calculates color values for direct light and ambient ...
5
votes
1answer
88 views

Unity - Small holes of light seems to go through my blender mesh

So, I am currently working on a low-poly terrain in Blender which will be flat-shaded in Unity. It all works great, however I am working on a cave for the terrain, and I seem to be getting these small ...
0
votes
2answers
44 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?
4
votes
1answer
314 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 ...
6
votes
3answers
1k 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
votes
1answer
51 views

Volumetric Lighting/Light Shafts in DirectX

So currently I am trying to implement Light Shafts into my DirectX Engine. I read the Nvidia GPU Gems Article (http://http.developer.nvidia.com/GPUGems3/gpugems3_ch13.html) I am new to Graphics ...
0
votes
1answer
26 views

Possible to detect handedness of normal maps in shader?

I've implemented normal maps into my game renderer using the formulas by Christian Schuler. It works OK with most normal maps but some not so much since in some the Y component (green) is reversed. ...
1
vote
1answer
561 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 Off....
1
vote
1answer
29 views

Java - Performance problem with BufferedImage and AlphaComposite

:) I'm currently making a 2D platformer game and now I want to implement Light using AlphaComposite. For creating the lights I first create a blank BufferedImage with ARGB format. After this, I ...
2
votes
2answers
96 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 ...
1
vote
1answer
30 views

Deferred rendering - reconstruction of world position view dependent

I am moving my small renderer from forward to deferred, I have now noticed something a bit odd. I am for now using a simple way to reconstruct world position in the lighting pass: float3 GetWP(...
1
vote
0answers
21 views

Can I make global illumination from directional lights only affect their assigned layers?

I have a large space station scene, where there are giant mirrors that are sources of reflected light, and to emulate this, I made directional lights attached to the mirrors with cookies to make them ...
1
vote
1answer
40 views

PBR How to correcly use standard lighting and IBL

I'm creating a physically based renderer but I am a bit confused on how to put together standard lighting with IBL, since like I'm doing now I think it's wrong. Right now, for each light, I evaluate ...
13
votes
3answers
966 views

How can I create light shafts like Journey's in Unity?

I'd like to create cartoon looking sun / light shafts that look very close (or identical) to the ones in very well known and loved games like Journey: and Ori: How can I accomplish this?
2
votes
1answer
303 views

How do I render a volumetrically lit spotlight?

To be clear, I really do mean volumetric lighting; not only calculating which area is lit, but also realistically lighting the volume of "air" that the light hits on the way. Like this: I've tried ...
0
votes
1answer
386 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
128 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 ...
17
votes
3answers
7k views

Is there a way to use an arbitrary number of lights in a fragment shader?

Is there a way to pass an arbitrary number of light locations (and colors) for the fragment shader, and loop over them in the shader? If not, then how are multiple lights supposed to be simulated? ...
3
votes
0answers
39 views

Emissive material not casting light on itself in Unreal

I have a static mesh that has an emissive material applied to part of the mesh. The emissive material successfully cast light to surrounding objects. However, the face of the mesh with the emissive ...
3
votes
1answer
157 views

Trying to implement forward rendering in OpenGL

I'm working on implementing forward rendering in my 2D engine, as far as I'm aware everything should be set up correctly, I've ran into some issues earlier but I'm sure I've fixed those at this point. ...
3
votes
1answer
335 views

In a large space simulation, why is my sun light not reaching the planets?

I want to create a space simulation, but I'm facing some difficulties when I try to create a realistic sun. Currently, I've a simple Point Light inside a sphere. But for some reasons, no matter the ...
0
votes
0answers
27 views

How to program light effects in Andengine

I'm trying to make some light effects to my game, but for now i failed to do it well, i try put 3 Sprites: bitmap1 = new BitmapTextureAtlas(getTextureManager(), 1400, 1400, TextureOptions.DEFAULT); ...
0
votes
1answer
33 views

Unity3D: Sudden lighting change in a scene

Sorry if this is a duplicate question, but I have no idea what this would be considered. Hello, I have recently been creating an FPS game, but while researching some things on the internet, the ...
17
votes
3answers
1k 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
27 views

OpenGL ES vertex/fragment shaders - Blinn phong

I'm developing a simple educational project to study OpenGL ES. I'm try to render some simple OBJ models using Blinn-Phong. The first version of the of my implementation calculate all the lighting ...
0
votes
1answer
60 views

Lighting in Minecraft/Block-esque worlds [duplicate]

Chaps, I'm sure we all know at a high level how Minecraft's lighting engine works. Light sources flood surrounding blocks with light, which themselves flood their neighbors and so forth. However, I ...
1
vote
1answer
37 views

Handling light bounding volume

So, i managed to do deferred shading like yesterday or 2 days ago. I got pretty big impact which causes my fps to drop from 1000fps to around 300~fps for 25 lights (after some optimization, i don't ...
0
votes
0answers
15 views

Unity and C# - Lighting concentrated on floor with RenderSettings? How to get even lighting on all objects?

I am just getting into lighting with Unity 3d and right now have a function that progressively deepens the lighting of my scene here. I have done this via Render Settings and have tried 3 different ...
1
vote
1answer
144 views

What causes still objects have lines in them when lighting is being changed? [duplicate]

First, here is what I'm talking about (I changed the contrast to make it more visable, since it's not really visible in still images): Ingore the chat box, I was spamming buttons to see which one ...
2
votes
2answers
275 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 (http://...
0
votes
1answer
215 views

How to calculate spherical harmonic coefficients for indirect diffuse?

After reading the article "An Efficient Representation for Irradiance Environment Maps", I'm a bit confused as how to calculate the spherical harmonic coefficients. I'd like to generate these ...
1
vote
0answers
27 views

Light intensity on plain from angle

Given a vector (v) for the direction of light and a vector (n) for the normal of a plain. How can I calculate a rudimentary intensity value (i) where When (v) points at (n) directly/face on (i) = 1....
0
votes
2answers
1k views

Tutorials for shadow mapping with multiple point lights in XNA [closed]

I've been trying to crack this problem for a while now and I'd like to know if there's a tutorial or two out there that can help me with this. I know how to do shadow mapping with a single light, and ...
0
votes
0answers
30 views

Low intensity of projector in dark enviornments

I am using light Projector as Headlight for player bike....The thing happening is the intensity of projector reduces in dark environment whereas in normal sunny day projector brightness is proper ,. ...
3
votes
1answer
178 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 ...
0
votes
0answers
29 views

Unity Lens Flare disappears at edge of screen?

I'm using a Lens Flare component to represent the sun in a 2D game. When the sun rotates onto or off of the screen, I noticed that the flare effect disappears. Basically, once the center of the sprite ...
5
votes
0answers
57 views

Spherical Area Lights do not match reference

So I'm adding spherical area lights to my application, and comparing my results with mitsuba, I am getting some differences (left is my approach, right is mitsuba - a pathtraced reference): What I ...
0
votes
0answers
60 views

Why does my Point light turn off if Player walks in any direction in Unity 2D?

My 2D Sprite has a material, Sprite diffuse attached to it. Now when I set up a light, it works but if I play the Game and walk, the light turns off immediately and the Player turns black. The ...
1
vote
1answer
327 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 ...
2
votes
2answers
150 views

Box2DLights in libGDX - Bad quality of the light gradient on Android

I am facing a problem while porting one of my libGDX project from desktop to Android : My game uses Box2DLights. While the light effect look very fancy on the desktop version of the game, it looks ...
4
votes
0answers
75 views

Irradiance Map ( Irradiance environment map)?

As irradiance map is generated for every possible normal for all the texels in environment map (as every texel act as a light source) so that we can look up irradiance map, based on normal of fragment ...
1
vote
2answers
57 views

OpenGL strange color issue

I recently made terrain generation for my game, and I created a lighting system (simply diffuse lignting), but there's a strange problem around the edges. I know, OpenGL interpolates the different ...
1
vote
0answers
119 views

Unity: Build looks different then gameview: runtime reflection probes not working correctly

Im having a really hard time figuring out how to configure my reflection probes to update in runtime once I build. The game port view looks totally different than the build view. Ive tried turning off ...
3
votes
1answer
62 views

What causes regions of improperly-lit terrain when my pixel light count is below 4?

My Unity3d game has a strange bug where if you have the pixel light count set below 4, these strange boxes appear on the terrain. Because this game is going to be for mobile, if I set the pixel light ...