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
18 views

WebGL Multiple Lights, Blending, and Render Order

I am trying to do simple forward rendering for multiple lights using additive blending in WebGL. Following advice from this SO and this one, I simply turn on blending using glBlendFunc(GL_ONE, GL_ONE) ...
0
votes
0answers
8 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 ...
0
votes
0answers
22 views

Lighting changes when loading scene

I have a script that changes the levels using Application.LoadLevel (sceneNameToChangeTo); Once a level is loaded using that code when testing with the editor, the lighting changes dramatically. ...
0
votes
0answers
22 views

Unity 2D: Lighting ground tiles in a sidescroller?

I'm trying to find a good way to tint the ground tiles in my 2D game at sunrise, sunset, etc. I thought it'd be a good idea to use a diffuse material + lighting in order to create effects by ...
0
votes
0answers
24 views

Phong shading blows out things close to white [OpenGL]; is there a way around this?

I'm doing per-pixel lighting using the Phong shading model. In pseudo code this looks like: vec4 ambientColor = light.ambientIntensity * material.diffuse; vec4 diffuseColor = light.diffuseIntensity ...
0
votes
0answers
42 views

Creating Lighting effect in openGL [duplicate]

I am trying to make my wall have the same color and shade as the walls shown in the picture (Please ignore the frame and the bulbs). I can create a a cube and view it from inside but how can we give ...
43
votes
1answer
3k views

Making a night scene without being dark on the monitor

What would be a good way to make a 3D scene look "like" a dark night, without being so dark on the monitor that it's hard to see stuff (especially when playing in a brightly lit room). I've been ...
0
votes
0answers
56 views

OpenGL Diffuse Lighting Issue

I seem to have a problem in my OpenGL scene where if I (the camera) am looking at an plane it's brightness changes depending on what angle I am to the plane. It seems as though the camera is a source ...
1
vote
1answer
59 views

Question regarding irradiance

I know that the formula for irradiance at surface point p with normal n given a point light source at position l is: H = I(cos x) / ||l - p||^2 Where: x = angle between n and l-p I() = Intensity ...
2
votes
1answer
59 views

Proper normal vector transformations in normal mapping

Hello! This question is about transforming normal vectors from normal maps properly. I have tried methods from over five sources, still can't get it to work, and I'm really desperate. Included are ...
3
votes
1answer
547 views

What causes this graphics quality difference between WebGL Build and Unity 5 Editor?

The Editor version and WebGL version of my Minesweeper clone have some graphics quality differences. I chose 'Fast' option when building this deployment. Is this the difference between 'Fast' and ...
0
votes
1answer
63 views

Incorrect Normal Matrix

In my game engine I'm passing a normal matrix to my shaders like so: Matrix3f normalMatrix = modelMatrix.invert().transpose(); However this is causing lighting to rotate with my object, producing a ...
1
vote
1answer
111 views

How to cast colored shadows

I have a glassy object and when light passes through it I want it to cast colored light behind it, instead of the shadow. I could just use another light object to cast that colored light, but is it ...
1
vote
1answer
127 views

Unity 2D: Sprites/Diffuse is making my character weird, like an antialias

i'm trying to put light and shadows on my 2D character but when i set the material on it to Sprites/Diffuse, it's kinda putting a strange smooth on my pixels. Without diffuse: With diffuse: And ...
0
votes
0answers
20 views

Connect lightsource with object in Libgdx

I want to make an minimalistic highway chase game in LibGDX, but I have a question. Can I attach a source light to an object so gravity will affect the source light, by pulling it down? One solution ...
1
vote
0answers
51 views

Sprite outline based on light position in UE4

I have simple sprite (for example black box) and I like to add to it outline (red line on example image) but based on light direction. I know UE4 use deffered renderer, so I cant access to lights, but ...
2
votes
2answers
47 views

Rectangular area light illuminance - colour banding

I'm currently working on an implementation of rectangular area lights but I am having some issues with the illuminance calculation, which gives me serious colour banding across the entire lit area. ...
0
votes
0answers
266 views

Unity 5 Enlighten - How do I make objects look bright?

I've recently started using Unity 5 and have been reading up on their global illumination and physically-based shaders using Enlighten here. Unfortunately, I would seem that the demo project which ...
1
vote
1answer
133 views

Custom shadowmapping in Unity not working properly

To experiment with a certain technique, I'm implementing my own shadow mapping in Unity. I'm using a camera for the light "view", which is rendered to a RenderTexture after being post-processed with ...
0
votes
1answer
77 views

Imported Blender modular mesh lighting/shadows issue - Unity

Hi I've very recently started using Unity and am creating a game level. I've created my environment in blender and am currently using a modular design as I'd like to include destructible environments. ...
1
vote
2answers
214 views

Are shaders the only way to implement 2d lighting?

I'm working on a 2d top down game with libgdx and I think i got the basics. No want I want to implement lighting, I don't know anything about lighting. I want just to have some light sources and ...
1
vote
1answer
130 views

Dot based light mask with shader on sprites

So I have a scene, completely based on 2D sprites. I want to render "light sources" into a seperate frame buffer (so mostly dots around, for example, the centre of a flame) and then render that frame ...
3
votes
1answer
169 views

What are the advantages of tangent space shading/lighting, and what about attenuation?

In several topics here it was suggested by people that doing lighting in tangent space is better than doing it in world space. Right now I am doing it in camera space, but it's really similar to world ...
-1
votes
2answers
47 views

What are 'ambient' lighting/illumination/occlusion? [duplicate]

What's the difference between ambient lighting,ambient illumination and ambient occlusion ? What are they? What's the difference between them?
2
votes
1answer
109 views

Box2D Lights - Simulate water

I have a libGDX project, in which I have a Box2D world, which is currently filled with some boxes as a terrain. I also added a DirectionalLight to the scene for simulating the Sun. I almost have the ...
1
vote
2answers
581 views

What are 'physically-based' lighting/rendering/materials?

What's the difference between physically based lighting, physically based rendering and physically based materials? How they are different from deferred and forward rendering? And physically based ...
2
votes
1answer
118 views

Rendering lighting only on specific objects

I have done something similar to this in monogame: My question is, what would I have to do to draw that lighting effect only on the pillar and not the background ? Is there something like ...
1
vote
1answer
49 views

Where is Light in Game view

Very Basic Question.when i run the the game the game Mode is Too dark as shown below in the picture. please suggest me some Setting how to globally switch on built in light while Running the game in ...
0
votes
1answer
80 views

OpenGL light calculation

I want to add somebasic point lights to my OpenGL application. I read here that I have to caluclate the light in a pre-projection space: Lighting can be done in any pre-projection space (e.g., ...
0
votes
0answers
91 views

2D GLSL Lighting and Sprites

I'm trying to make a 2D game engine, and I really want to support ambient light as well as multiple point lights that you can define the color, intensity, radius, etc from uniforms in glsl shaders. ...
0
votes
0answers
73 views

Fake Lighting 2D Space Java

I have an image that I want to be used as the light. The white are should be drawn, the black should not. I need the light to be tinted to whatever color I pass to the light object. I have code ...
4
votes
2answers
195 views

Hide some objects from the camera (fog)

I'm trying to implement a visibility representation in a 2D game ( no plains, no quads - plain 2D ) In the examples below I have calculated what the player can see using raytracing and added all the ...
0
votes
2answers
225 views

Three.js: Lighting not calculating correctly on THREE.Geometry objects

I have a three.js (REVISION: '68') issue with the lighting of THREE.Geometry objects: I'm using the THREE.Geometry class to build up objects using vertices and faces, then I computeFaceNormals() ...
0
votes
1answer
116 views

Reflection/environment mapping

I'm implementing reflection/environment mapping using a cubemap. I have it working for the most part but when I move my camera around, I see the same area reflected on the object. I am calculating the ...
0
votes
2answers
87 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 ...
0
votes
1answer
98 views

Normal Mapping issue

The first image shows a spotlight shining correctly on the floor. The second image shows the same spotlight but rotated 180 degrees. The first is correct, the second is not. The third image ...
0
votes
0answers
58 views

SFML - Rendering a torch with a fire animation [duplicate]

I have coded a 3D maze simulator in SFML using raycasting. However, I want to add a torch to the screen, so that the lighting seems more realistic. From my understanding, I would have to use ...
1
vote
1answer
114 views

How does an energy-conservative Blinn-Phong-Fresnel model work?

What is a plausible, basic equation/pseudo-code for energy-conservative Blinn-Phong shading, including Fresnel with a coloured light-source? The net gives so many alternatives that it's hard to ...
2
votes
3answers
284 views

2D Smooth Tile Lighting

I am currently working on a 2d platformer and have the general idea of how to apply 'lighting' to my level, but I am not sure at all how to make it smooth, similar to Terraria, as you can see here. ...
1
vote
2answers
140 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
63 views

How can I add sphere falloff to my specular lighting implementation?

I'm using point light in my game and tried to add specular lighting. It looks good but when standing close to wall player can clearly see where lights end. Image from front: Image when near wall: ...
1
vote
2answers
62 views

Rendering order of shadowing point lights?

I'm implementing shadow mapping in my deferred rendering engine. I've got spot lights working, and now I'm working on point lights. Currently, I do it like this: // Loop through the point lights for ...
0
votes
0answers
11 views

How to set up lights in Libqglviewer?

I decided to use Libqglviewer and the simple camera example to have a basic camera setup and play with fragment shading. I have not much experience in OpenGL but I have made my way through it. I have ...
2
votes
1answer
395 views

OpenGL light appears to move with camera and changes with object rotation

I have a working open gl es 2.0 3d engine (my own) that I've used in several iOS apps. I recently noticed that on a mutli-symmetrical object the lighting didn't look the same at each rotation. For ...
1
vote
1answer
154 views

model view projection multiplication order

I'm debugging a lighting problem where the camera position is effecting the diffused lighting component on my 3d model. In researching my problem I went back and am reading over all the how to ...
0
votes
1answer
51 views

Why is 2D light ray collision result getting inverted at specyfic angle

recently i've been working on 2D lighting for my game. I've created new little project, and I've encoutered a problem. The collision between light ray and the object is fine at angles 316-360 and ...
1
vote
0answers
70 views

Smooth seams and banding of overlapping lights in deferred rendering

I have finally managed to get on screen multiple lights with a deferred renderer, but the result is somehow disappointing. In particular I have severe banding problem Other than having clear ...
1
vote
0answers
89 views

Why is my diffuse lighting changing with camera position?

I am trying to do lighting in view space, but I am afraid I have an issue. I calculate the normals as: N = norm_mat * vec4(vert_norm,0.0) where norm_mat is the transpose(inverse(model_view_mat)). ...
-1
votes
1answer
147 views

How to optimize my lighting shader?

I want to create a lighting effect on a gray-scaled world using cocos2d-x. What I've done is creating a layer which runs a shader program that receives light positions and radiuses as input and ...
1
vote
0answers
101 views

Understanding diffuse lighting in The Division

Here is a screenshot of the main character walking under a bright lamp: His hat, that was originaly dark grey, turns completely white. My question is how can such lightsource do this without making ...