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
6 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
21 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
1answer
22 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
147 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
48 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
53 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
172 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
90 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
128 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
39 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
65 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
523 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
111 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
44 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
75 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
64 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
40 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
154 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
135 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
90 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
1answer
40 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
87 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
57 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
88 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
230 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
130 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
59 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
60 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
218 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
93 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
46 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
58 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
79 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
114 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
80 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 ...
0
votes
1answer
60 views

Can diffuse and specular component of Phong model shine thru object?

I have been implementing simple 3D engine in OpenGL, mostly based on tutorials by Tom Dalling. I have implemented the Phong lightening model as described in his tutorial, but I see light artifacts on ...
0
votes
1answer
85 views

Specular light flickering with high specular power

I'm having some issues with specular lights, to be more specific, the specular color seems to be flickering when I set high power, like 512 (I set the specular color to green, so you can see better): ...
5
votes
4answers
359 views

OpenGL lighting appears to be clamping

I'm experiencing an odd problem where everything placed in front of my light appears black in my scene. This happens on multiple axes. I've searched the depths of the internet to find a solution, but ...
0
votes
3answers
180 views

Combine flat and smooth shading with a single model geometry

I need to be able to switch between smooth and flat shading interactively. Is there a way to do this efficiently with a single geometry? For example, smooth shading does not require duplicate ...
1
vote
1answer
156 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 ...
0
votes
0answers
114 views

Unity directional light for a day night cycle on a hex sphere

So I am trying to create a Day Night cycle on a sphere but it doesn't work the way I want it to. As the model is hex tiled, you see the edges of the hex tiles also lit up like below. I am using a ...
0
votes
1answer
102 views

Backface culling without light leaking through

I want to be able to see through walls, so to do this I used planes for the walls, and enabled backface culling. However with shadow mapping I have a lot of light leaking through: I read that using ...
0
votes
0answers
52 views

Voxel sparse octrees for indirect illumination

I don't understand the use of voxel sparse octrees for indirect illumination calculations. First of all, what exactly is happing? We're rendering the scene as usual with diffuse lighting. In the ...
0
votes
1answer
559 views

Getting the Halo property of a point light in Unity

I am adding point lights in my scene ( max 6 ) and I want to be able to enable its Halo property via script. However in the documentation reference, they haven't mentioned how to enable the halo ...
0
votes
0answers
27 views

How to upload lights when doing one pass per light

Suppose I have a reasonable amount of light sources that I upload at once in my forward rendering and accumulate them in shader. Now that I am willing to move to deferred, and so one pass per light, ...
1
vote
1answer
166 views

How do I procedurally create a directional light cone with an HTML canvas?

To create a directional light effect, I want to draw this kind of transparency mask on an HTML canvas (using context2d): I also want to be able to generate such a mask dynamically. I've tried using ...
2
votes
1answer
65 views

How can I tint a Texture2D with a gradient?

I am working on a lighting system for my game. Instead of lighting each tile completely with only one color, I want to create a gradient on that tile so to make the lighting look more dynamic and ...
1
vote
1answer
122 views

Ambient occlusion of cubes, a specific case

After much fiddling around and thinking I've got my AO working on my game engine as intended; except one specific case. When a block is nestled between others on two sides, but the corner block is ...
0
votes
0answers
47 views

Volumetric spotlight

Hy I'm working on the a volumetric spotlight into my engine(DirectX 11). I read quite a lot about it and would like to find a relatively quick solution. ShaderX3's approach dividing the light volume ...