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
1answer
374 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
121 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
85 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 ...
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
25 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
146 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
311 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 ...
1
vote
1answer
661 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 ...
2
votes
1answer
214 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) ...
2
votes
2answers
747 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 ...
0
votes
0answers
19 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); ...
4
votes
1answer
276 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
1answer
23 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 ...
0
votes
1answer
20 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 ...
1
vote
1answer
27 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
2answers
82 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 ...
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
22 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
58 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
532 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....
2
votes
1answer
293 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 ...
1
vote
1answer
35 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
12 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
143 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
255 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
206 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
26 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
24 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
164 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
27 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 ...
4
votes
0answers
51 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
56 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
283 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
137 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
58 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
54 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
86 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
58 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 ...
1
vote
1answer
40 views

Doubts with results of per-vertex lighting shader

I'm researching simple shaders to add to my DirectX 11 project such as a per-vertex diffuse shader plus specular reflection component. I'll begin with the results: Seems specular reflection is ...
8
votes
2answers
167 views

Why is the distance from object to eye irrelevant in illumination models?

For example in Phong model and Blinn model, the light intensity does not change depending on how far away the camera is. Why is that?
1
vote
1answer
72 views

How can I achieve a flickering torch/candle effect in 2D?

I'm currently working on a 2D lighting system that has point lights effectively rendered as a quad in a top-down 2D view, something like this for each light: I'd like to achieve a somewhat ...
2
votes
2answers
310 views

How can I build Minecraft-style light propagation without recursive functions?

This question is more about expanding on an answer posted for an old but similar question. Part of the answer says this: You simply fill the sunlight from the top to the bottom, every layer is ...
0
votes
0answers
86 views

Light only passes through static mesh when selected - Unreal Engine 4

I just started working with UE4 and this issue has been bothering me for a couple of nights now. There are two questions regarding this problem on Unreal AnswerHub, but none of them offers a solution. ...
2
votes
1answer
970 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: ...
1
vote
1answer
106 views

How to create realism similar to scenes rendered in Vray?

I am tasked to make a game which requires very realistic interior scenes. Unity's bedroom demo(http://blogs.unity3d.com/2015/11/10/bedroom-demo-archviz-with-ssrr/) really caught my eye. See I know how ...
1
vote
2answers
78 views

Achieve a red lighning effect in unity for a 2d game

Effect that im refering to: http://youtu.be/jaBY83WvS3M#t=05m36s How could I achieve this kind of red lightning/flashing/shadowy effect in Unity3D for a 2D game? I'm trying to think of a way but I'm ...
1
vote
3answers
2k views

Why Does unity_LightPosition[0] Seem to Depend on Camera Position?

I'm trying to write a fairly basic shader but I keep running into lighting issues with Unity. My first problem was trying to figure out which variable stored the light's position in world space. (I'...
1
vote
1answer
108 views

Why do my point lights have red X's on them in the Unreal editor?

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 ...
0
votes
0answers
69 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 ...