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

5
votes
1answer
1k views

Fast pixelshader 2D raytracing

I'd like to do a simple 2D shadow calculation algorithm by rendering my environment into a texture, and then use raytracing to determine what pixels of the texture are not visible to the point light ...
8
votes
2answers
748 views

Creating smooth lighting transitions using tiles in HTML5/JavaScript game

I am trying to implement a lighting effect in an HTML5/JavaScript game using tile replacement. What I have now is kind of working, but the transitions do not look smooth/natural enough as the light ...
3
votes
1answer
2k views

Can't get LWJGL lighting to work

I'm trying to enable lighting in lwjgl according to the method described by NeHe and this post. However, no matter what I try, all faces of my shapes always receive the same amount of light, or, in ...
7
votes
1answer
145 views

Shadowmap granularity

I thought that we could re-use the same shadowmap for every light. But I've seen an industry article suggesting that you can't re-use shadowmaps between lights, and have to use separate surfaces. Do ...
6
votes
3answers
723 views

For normal mapping, why can we not simply add the tangent normal to the surface normal?

I am looking at implementing bump mapping (which in all implementations I have seen is really normal mapping), and so far all I have read says that to do this, we create a matrix to convert from ...
1
vote
2answers
597 views

How does Minecraft compute lighting for it's non-block objects?

I was wondering how the creator of Minecraft went about lighting the objects (player and pickaxe) based on the lighting level around the player. I have implemented the ability to light the blocks ...
2
votes
1answer
652 views

2D Point Light XNA , Why my point light radius is Oval?

I friend of mine , taught me how to make a simple 2d point light with shader, so i follow his steps and finally done it ! but something happend , the light shape is like an oval and not like a ...
1
vote
1answer
172 views

Do any games support different lighting effects according to whether a surface is wet or dry?

I've noticed that when driving at night, when the road surface is dry, my headlights appear to illuminate much further than when the road surface is wet. I presume that this is due to the differences ...
4
votes
2answers
1k views

Grid/cell based light system

I am working on a top-down, 2d cell-based RPG game. I would like to implement a cell based lighting system, something like this and this. I basically have several light sources and light deteriorates ...
6
votes
2answers
775 views

How are dynamic blending shadows like this created?

I would like to know, how dynamic shadows, that 'blend' onto other objects, are created.
6
votes
1answer
509 views

Fast and simple attenuation from a flaming torch

I have a single point light-source which is a flaming torch. I compute the distance from the light accurately. I am not trying to have a particularly realistic torch effect, but I will be moving the ...
10
votes
3answers
3k views

Can I achieve a torchlight effect (lighter area around a light source) in a 2D game?

I am thinking of writing myself a simple 2D game. It will not shine with perfect graphics or gameplay at first, but I'd consider it my first step in PC game development. So, imagine such simple ...
3
votes
1answer
410 views

How to calculate FOV with four-walled tiles?

I'm working on a 2D tile-based game. I'm trying to calculate FOV and I've implemented walls so they don't take up an entire tile. Instead, they just take up a side of each tile. Similar to: class ...
1
vote
1answer
285 views

How do I make light objects in XNA?

Here's my dilemma : I want to have light sources placeable by the player, in terms of lanterns. I know the best way to do this is to use pixel shaders, which I have done a lot of research and use ...
13
votes
2answers
5k views

How can I implement lighting in a voxel engine?

I am creating the MC like terrain engine, and I have thought that lighting would make it look a whole lot nicer.The problem is that the blocks are not being lit properly when a block which emits light ...
11
votes
7answers
1k 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 abd c, k and s are constants. I understand the ...
4
votes
3answers
3k views

2D XNA Tile Based Lighting. Ideas and Methods [closed]

I am currently working on developing a 2D tile based game, similar to the game 'Terraria'. We have the base tile and chunk engine working and are now looking to implement lighting. Instead of the tile ...
2
votes
0answers
678 views

How can I use the dualforward parameter in my unity shader to use lightmaps and normal maps together? [closed]

I'm using the free version of unity and I would like to combine lightmaps with specularity and normal maps. After doing a -bunch- of research, I've figured out that there doesn't seem to be any easy ...
0
votes
0answers
108 views

How can I change this isometric engine to make it so that you could distinguish between blocks that are on different planes? [duplicate]

Possible Duplicate: Can you shade a specific section of a sprite? If so, how? The terrain is randomly generated. Here is a screenshot: http://i44.tinypic.com/qxqlix.jpg I think you can see ...
2
votes
1answer
758 views

How do I get light to go through a window texture in Unity?

I'm having trouble with the lighting (I have windows and the light wont go through). How do I get the light to proceed through the glass?
4
votes
3answers
905 views

How can I change this isometric engine to make it so that you could distinguish between blocks that are on different planes?

I have been working on an isometric minecraft-esque game engine for a strategy game I plan on making. As you can see, it really needs some sort of shading. It is difficult to distinguish between ...
6
votes
2answers
347 views

How do walls affect lighting?

I have been trying to implement a simple form of lighting in my 2D game. In the screenshot, I don't think it looks very good, kind of just plastered over the top of the map. How would the wall effect ...
11
votes
3answers
3k 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? ...
12
votes
4answers
3k views

How can I implement voxel-based lighting with occlusion in a Minecraft-style game?

I am using C# and XNA. My current algorithm for lighting is a recursive method. However, it is expensive, to the point where one 8x128x8 chunk calculated every 5 seconds. Are there other lighting ...
6
votes
3answers
599 views

What has changed in the lighting systems of Rage, Battlefield 3 to make them so realistic?

I've played and completed Rage and currently Battlefield 3 (which looks a lot better with less hype). One thing that is immediately apparent is the lighting, or the bump maps - I can't figure out ...
1
vote
1answer
540 views

How can I implement “cut outs” for lighting in OpenGL?

So, I'm working with OpenGL (I'm not exactly sure of the version), and I want to do an old-style lighting setup by essentially drawing a black rectangle over the screen, and drawing white circles over ...
0
votes
1answer
492 views

Blender: projecting an image via a spotlight onto a plane

I've create a plane with a spot light shining from above onto it. The spot light projects a texture of an image onto the plane. The light shots out at an angle but the texture is projecting in a flat ...
-3
votes
1answer
304 views

programming light sources in java

I was making a game and I wanted to program light sources but I don't know how to. every where I search it comes up with lightweight java. Can any one offer any help. Its a birds eye view mmorpg. Can ...
3
votes
1answer
485 views

Unusual Lighting Effects - Random Polygons Coloured

I am working on creating an object loader for use with iOS, I have managed to load the vertices, normals and face data from and OBJ file, and then place this data into arrays for reconstructing the ...
1
vote
2answers
514 views

OpenGL lighting engine for BSP geometry

I am trying to figure out the best way to go about creating a lighting engine for an old game format with BSP based geometry. I have all the relevant information about the light, ...
10
votes
1answer
891 views

How does Trine's lighting look so spectacular?

Is there some kind of "special" lighting in this scene? I notice that the sun seems to "pop".
16
votes
1answer
844 views

What is the math behind the light effect in krakatoa?

I'd like to know the math behind the light effect in krakatoa (click here for an example). Light source is traveling with particles, but how is shading done? Is it something simple, like Phong ...
4
votes
0answers
209 views

2D Lighing in XNA [duplicate]

Possible Duplicate: How is 2D lighting implemented? I'm attempting to create a 2D game in 3/4th perspective (like Pokemon and the older Zelda games). The time has come for an attempt to ...
4
votes
2answers
738 views

How can I implement shader lookups for my material system?

I have been working on a material system and for the most part everything works just fine, however, I hard code the shader that will be used. Obviously this causes a problem when I want to have the ...
1
vote
1answer
853 views

How do you make a water shader?

I'm working on a minecraft-like world and recently saw this video with a water shader. I searched but couldn't find any good info on how to do something similar. Maybe I'm just googling the wrong ...
2
votes
3answers
205 views

Does radiosity work with skylight?

Does radiosity work with skylight (directional light)? From reading online it sounds like it was intended to work with point lights but I would really like to make it work with skylight if possible. ...
6
votes
1answer
757 views

How many shadow casting lights are in modern games?

I'd like to know how many shadow casting lights are supported in modern games, such as Uncharted 2, Crysis 2, Modern Warfare 2, Halo: Reach, etc. Do they all limit themselves to just a couple of ...
8
votes
2answers
601 views

Can someone explain radiosity lighting to me?

I already have the basics of ambient occlusion down. I have a raycaster and am capable of shooting rays about a hemisphere uniformly. It seems like those are the basics of what are needed for ...
0
votes
2answers
2k views

the difference between diffuse texture and ambient occlusion texture

is there any difference between diffuse texture which used in diffuse lighting and ambient occlusion map, or this is the same texture just different naming, because i see it mostly it looked the same? ...
3
votes
2answers
946 views

What is the difference between ambient lighting and skylight?

What is the difference between ambient and skylight lighting? Please give me a detailed description of the differences.
3
votes
2answers
3k views

My Ambient lighting is not working correctly

I'm having a problem when using ambient lights in my opengl game. When I first started with my program, i had a positioned light, and the code was this: GLfloat AmbientColor[] = ...
6
votes
2answers
748 views

Rendering collections of light sources

I have a small test environment where small point lights are scattered. Players should able to collect them. The collectible lights are rendered using a simple billboard technique where two triangles ...
3
votes
1answer
2k views

Loading textures in OpenGL makes everything look darker

I don't know what I'm doing wrong but I'm having a big a problem with GL_TEXTURE_MIN_FILTER when loading textures for my scene. I'm doing a skybox, but that's irrelevant because the problem exists ...
11
votes
3answers
8k views

Trying to understand light on Opengl, how to simulate a realistic sun light?

I don't know if I'm doing something wrong or missing anything but I want to simulate sun light, like in a sunny day. When the object is facing the directional light, it's well lit and there's no ...
14
votes
1answer
5k views

What does it mean to “bake lights”?

What does it mean to bake lightmap ? I heard this in Unity3d, and again found this LightUp plugin for sketchup that bakes lightmap. From what I observe, the lightmap baked gives the 3d object a much ...
8
votes
4answers
2k views

Any good book on lighting in video games?

Lighting plays a fundamental role into videogames. A videogame without a good ilumination is flat and without life. I'm looking for a book that explains how must be iluminated a scene and what factors ...
18
votes
3answers
2k views

How can I create a lighting effect like this?

This is the most beautiful 2d lighting I have ever seen, and I'd like to perform lighting like this too. How do I do it? I don't care about the physics or how the particles are simulated - I only ...
1
vote
1answer
289 views

Materials when rendering geometry

When specifying the material (ambient/diffuse/specular) for use in lighting calculations, what level of detail is the material specified at? Per vertex, mesh, bone?
3
votes
1answer
487 views

Multiple volumetric lights

I recently read this GPU GEMS 3 article Volumetric Light Scattering as a Post-Process. I like the idea to add volumetric light property to realtime render i'm working on. Question is will it work for ...
6
votes
3answers
1k views

Common light map practices

My scene consists of individual meshes. At the moment each mesh has its associated light map texture, I was able to implement the light mapping using these many small textures. 1) Of course, I want ...