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
vote
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? ...
1
vote
2answers
715 views

Getting a black scene with XNA, what am I doing wrong?

I'm new to XNA (ver 4) and I'm obviously doing something wrong but I don't know what. So far I have managed to model my scene (quite simple, just a bunch of squares which are calculated--there are no ...
1
vote
2answers
118 views

2D Lighting Glitch

I've been working on a game in Java, and recently I decided to try out my game on a netbook just to see how it would run. While I do get a constant and decent FPS, it appears that my lighting ...
1
vote
2answers
494 views

Voxel Lighting in Unity3D

I'm working on a Voxel project in Unity3D for fun and learning. I've been reading up on how this is done and have implemented a simple Voxel map in my project. My question is about the lighting. I've ...
1
vote
2answers
110 views

pre-rendering light on texture based on bump map

Using a gray-scale bump-map and N sources of colored light, what is the algorithm to render the light on the textured surface, assuming I have the angle(s) and distance of each light source? (I am ...
1
vote
1answer
61 views

Spot lights - making narrow/broad spot lights give more/less intense light

When I use "normal" spot lights as presented in tutorials such as this (with the exception that I use inverse square fall-off and then gamma correction), the spot light doesn't behave like a real ...
1
vote
1answer
184 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 ...
1
vote
2answers
2k views

why specular light is not running?

i'm on JOGL this is my method for lighting: private void lights(GL gl) { float[] LightPos = {0.0f, 0.0f, -1.0f, 1.0f}; float[] LightAmb = {0.2f, 0.2f, 0.2f, 1.0f}; float[] LightDif = ...
1
vote
1answer
76 views

Night cycle on a globe

I am working on a tile based game on a globe. I am trying to implement a simple day night cycle on my hex globe something similar to the image below Here is the picture of my globe inside Unity ...
1
vote
3answers
107 views

Mathematics behind Phong shading and additive blending

I'm confused about the mathematics behind additive blending used in conjunction with Phong shading. Intuitively, it seems like you would need to use a floating-point framebuffer and some sort of ...
1
vote
1answer
202 views

Why is the light following my camera around?

I have implemented a simple Phong shader without specular highlights for now (just ambient + diffuse components) The problem however, is that the calculations seem to be done in camera space; as I ...
1
vote
2answers
382 views

Technique for multiple shadow casting lights in 2D

I'm trying to create shadows in a 2D game in such a way that I can have an arbitrary number of lights in a scene, all of which can cast shadows. To do this I think I have to generate a mesh for each ...
1
vote
1answer
224 views

Flashing candle light

What is a simple way to simulate flashing candle / torch / fire light? I'm not asking about animating the flames, I'm only interested in the light surrounding the fire, similar to what this device ...
1
vote
1answer
210 views

HLSL What you get when you subtract world position from InvertViewProjection.Translation?

In one of NVIDIA's Vertex shaders (the metal one) I found the following code: // transform object normals, tangents, & binormals to world-space: float4x4 WorldITXf : WorldInverseTranspose < ...
1
vote
1answer
77 views

Programmatically set brightness of a PointLight

I'm a beginner, so there is definitely something I'm missing here. I'm trying to set brightness of my PointLight object from the in-game command line. Here is what I tried, but it doesn't work: ...
1
vote
2answers
1k views

2-d lighting day/night cycle

Off the back of this post in which I asked two questions and received one answer, which I accepted as a valid answer. I have decided to re-ask the outstanding question. I have implemented light ...
1
vote
1answer
263 views

multipass shadow mapping renderer in XNA

I am wanting to implement a multipass renderer in XNA (additive blending combines the contributions from each light). I have the renderer working without any shadows, but when I try to add shadow ...
1
vote
1answer
127 views

Where does the light come from, using Maya/Panda3D?

Total noob to Maya. Total noob to Panda3D. Planning on becoming really good at both as soon as I have free time to do so, but right now I have an assignment due in a few hours which requires this: ...
1
vote
2answers
368 views

Techniques for lighting a texture (no shadows)

I'm trying to learn about dynamic shadows for 2D graphics. While I understand the basic ideas behind determining what areas should be lit and which should be in shadow, I don't know how I would ...
1
vote
1answer
292 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 ...
1
vote
1answer
301 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?
1
vote
1answer
102 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 ...
1
vote
1answer
61 views

how to define a field of view for the entire map for shadow?

I recently added "Shadow Mapping" in my XNA games to include shadows. I followed the nice and famous tutorial from "Riemers" : http://www.riemers.net/eng/Tutorials/XNA/Csharp/Series3/Shadow_map.php . ...
1
vote
1answer
93 views

Box2DLights - the center of sprites are always 100% unlit (black) unless Xray is on

I'm using a ConeLight at 180 degrees, with this setup: pl = new ConeLight(rayHandler, 256, new Color(0.5f, 0.5f, 0.5f, 1f), 280f, 400 - x, 300 - y, 0, 180); And the object I'm casting a shadow on ...
1
vote
1answer
75 views

How can I perform a masked erase in SDL2?

I'm trying to implement some shadow/lighting effects in my 2D-project, and I've concluded that if there is an easy way to perform a masked erase on an SDL_Texture, it would make the drawing operations ...
1
vote
1answer
135 views

Brighter pixels around area (OpenGL ES 2)

I'm trying to achieve an effect like in the image bellow. Basically I will have a 2D texture and I want a small area around a point (let's call it "light source") to be slightly better lit (i.e. be ...
1
vote
1answer
141 views

XNA Diffuse Shader Issue. Edge lighting problem. Image Attached

As you can see in this image the diffuse shading is working correctly in some places but in other places such as the the bottom of the sphere you can see the squares/triangles of the mesh. Any ...
1
vote
1answer
81 views

Correcting Lighting in Stencil Reflections

I'm just playing around with OpenGL seeing how different methods of making shadows and reflections work. I've been following this tutorial which describes using GLUT_STENCIL's and MASK's to create a ...
1
vote
1answer
301 views

How to create a sun billboard with Ogre3d

I've been working with a few different engines alongside trying to code my own project. Rather than rewrite an entire renderer, etc I am using Ogre3d. To begin with I am trying to implement a very ...
1
vote
1answer
253 views

Lighting Covering Up Sky ( XNA / C# )

I have a 2D tile-based lighting system which is drawn onto a Render Target. I am also drawing a background which involves mountains, sun/moon, and clouds. There is also the unlit game; blocks, ...
1
vote
1answer
267 views

Spot and area lights inconsistent

Im having problems with area light and spotlight. When adjusting parameters the change is not consistent and sometimes the light grows tstronger and then dissapears and then reappears very strong, ...
1
vote
1answer
546 views

Grid-Based 2D Lighting Problems

I am aware this question has been asked before, but unfortunately I am new to the language, so the complicated explanations I've found do not help me in the least. I need a lighting engine for my ...
1
vote
1answer
370 views

XNA effect lighting like basic effect lighting

Is it possible to make lighting in a normal effect work like the lighting in the basic effect? With a basic effect it's really easy: BasicEffect effect; effect.EnableDefaultLighting();
1
vote
1answer
841 views

Speed up lighting in deferred shading

I implemented a simple deferred shading renderer. I use 3 G-Buffer for storing position (R32F), normal (G16R16F) and albedo (ARGB8). I use sphere map algorithm to store normals in world space. ...
1
vote
1answer
126 views

How do I get my polygons to be lighted by either side?

Okay, I am using Ogre3D and Gorilla(2D library for ogre3D) and I am making Gorilla::Screenrenderables in the open scene. The problem that I am having is that when I make a light and have my ...
1
vote
1answer
332 views

Why isn't my lighting working properly? Are my normals messed up?

I'm relatively new to OpenGL and I am trying to draw a 3D model (loaded from a 3ds file using lib3ds) using OpenGL with lighting, but about half of it is drawn in black. I set up the light as such: ...
1
vote
2answers
558 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, ...
1
vote
1answer
913 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 ...
1
vote
0answers
51 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 ...
1
vote
1answer
80 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 ...
1
vote
0answers
142 views

implementing shadows into my 2D GLSL-based lighting system

I'm writing a lighting system in OPENGL using GLSL shaders, and I'm pretty happy with the light casting I have so far, but I'm totally stuck on casting shadows. Everything I've found online on this ...
1
vote
2answers
142 views

Implementing directional lighting in voxel based polygon-engine

I'm having trouble implementing directional lighting. (I'm not that familiar with 3D.) The problem is that the lighting does not "follow/flow with" the other blocks next to them. How should I fix ...
1
vote
0answers
27 views

Trouble with Lightmaps When Meshes Intersect

I've been working on making lightmaps for a game on mobile devices (meaning that individual texture sizes cannot exceed 2048 and that file size needs to be as small as possible), but I'm running into ...
1
vote
0answers
49 views

Normal map lighting bug in bottom right quadrant [closed]

I am currently working on getting normal maps working in my project, and have run into a problem with lighting. As you can see, the normals in the bottom right quadrant of the lighting isn't ...
1
vote
0answers
82 views

SpotLight in ForwardBase pass using forward rendering

Is there anyway I can force Unity to allow me using a custom shader to render spotlights in a ForwardBase pass (using Forward Rendering Path)? For what I could see since now: Unity use and ...
1
vote
0answers
297 views

Unity : shader that uses mesh.uv to tile texture atlas and mesh.uv2 to tile light atlas

I'm using a texture atlas and a light atlas to tile a mesh. I have the texture atlas working fine. I can apply textures and create a sort of tile map on my coded mesh. At the moment I'm using the ...
1
vote
1answer
94 views

Can you export lighting models directly from 3D application to a real time renderer?

is it possible for example to insert lighting in a 3D Model software like 3DSMAX and export an animated model like md5,..etc. and export the lighting too ?
1
vote
1answer
108 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 ...
1
vote
0answers
39 views

Implementing Light Volume Front Faces

I recently read an article about light indexed deferred rendering from here: http://code.google.com/p/lightindexed-deferredrender/ It explains its ideas in a clear way, but there was one point that ...
1
vote
0answers
150 views

What's the best engine for a procedural game that doesn't compromise on graphics? [closed]

We have a very interesting idea for a new game mechanic that would allow us to make our game procedural and entertaining. To bring this game to life, we need the ability to generate the game world on ...