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.
3
votes
0answers
51 views
Combining Effects
To be able to work efficiently with effects, isn't there a "good" way to combine multiple effects so that one effect handles stuff like "Multi texturing" and another controls the value like Ambient ...
1
vote
1answer
57 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();
0
votes
1answer
46 views
How to get pixels affected by a light in deferred shading?
I implemented deferred rendering in my little engine using framebuffers but there is no dynamic lighting for now. The g-buffer contains positions and normals in view space and albedo.
To implement ...
1
vote
1answer
145 views
Isn't it redundant to implement both lights and shadows?
Most games come up with their lighting implementation and their shadow implementation. Due to deferred shading, we are able to simulate lights independent from the scene geometry. But realistic ...
2
votes
1answer
113 views
How to solve artifacts caused by vertex lighting in my voxel engine?
My current lighting system bakes the light amount based on ray-tracing from the light source to the 8 corners of the block (so per-vertex) and the distance to the light on the blocks. It works ...
0
votes
1answer
56 views
Shouldn't fragment lighting have the same effect as vertex lighting with only ambient and diffuse lights?
With infinite light source and only ambient and diffuse lights — no specular light, it seems the rendering results of vertex lighting and fragment lighting should be the same, because all the lighting ...
0
votes
0answers
27 views
Interpolation of surface normals on the face of a triangle and Goroud shading
My question is detailed at this link.
I linked it instead of copy paste because here I can't seem to get the fancy math symbols to show properly here.
Thoughts?
2
votes
1answer
80 views
2D Software Lighting Issues in Java
I'm creating a 2D top-down tiled game in pure Java and by now I'm trying to implement a way to do lighting.
First, some details on how I render: there is a screen class which handles all the ...
3
votes
1answer
43 views
independent lighting per mesh in blender
In Blender, is it possible to assign lighting objects/effects exclusively to a single mesh? For instance, if I place two meshes next to each other, and two lights (one shining on each mesh), I would ...
0
votes
1answer
79 views
Tutorials for shadow mapping with multiple point lights in XNA
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 ...
8
votes
1answer
187 views
What is Ramp Shading or Lighting?
What is ramp shading or lighting and how does it work? Is it different than toon shading or is it the same concept? How is specularity calculated differently for ramp shading versus blinn-phong or ...
2
votes
0answers
57 views
How to occlude lights in Unity3D?
First off, I own Unity Pro.
I've been looking in to occluding lights when they aren't being viewed for a while now to improve performance. The main methods I ran in to were using BecameVisible() and ...
5
votes
2answers
277 views
A big light with shadows
To have better texture2D quality in my 2D game, I had to recreate every textures with 300% of their original size.
But the lights have to bright 3 times more.
For lights, I'm using this : Catalin's ...
0
votes
4answers
182 views
Opengl lighting not working
I have rendered a spinning model in LWJGL. I have calculated normals and enabled lighting. Now I make a light:
float lightpos[] = {0, 0, 0, 0};
FloatBuffer lightposb = ...
9
votes
1answer
266 views
How to achieve light that changes color mid-way?
I thought of creating light sources, and some colored windows. Now, the windows are semi-transparent. How could I make it so that when the light (say, pure white) hits the glass and continues through ...
1
vote
1answer
142 views
Cook Torrance model implementation : black specular light
I am trying to implement the Cook-Torrance model, and this is how I calculate the parameter Rs:
float Rs(float m,float F,vec3 N, vec3 L,vec3 V, vec3 H)
{
float result;
float NdotV= ...
10
votes
1answer
267 views
How do I create multiple 2D spotlights?
I'm looking to create a 2D "spotlight" effect that allows a spotlight on multiple entities. I.e., as if several sprites were holding torches. For a single entity (one spotlight), I use a technique ...
2
votes
0answers
47 views
Fragments never falling into spot light's cone
I am using GLSL version 1.20 with OpenGL 2.1 .
I am trying to compute when a fragment falls into the area of a spot light. I have already set all the light values with glLightfv and glLightf, also ...
0
votes
1answer
76 views
vec4 for vec3 multiplication while calculating the specular value
I'm following this tutorial to calculate the specular color of a vertex.
I use OpenGL 2.1 with GLSL version 120.
This is the formula that I apply:
spec= (R*eye)^s * Ls * Lm
With:
...
5
votes
1answer
202 views
Detecting Light Intensity Around Characters
Later Edit
Since there seemed to be a bit of confusion: I am asking this for purely didactic reasons, I'm not searching for the most efficient solution. Reformulated question: I'm working under ...
3
votes
1answer
108 views
Can't get normals to work correctly with lighting in OpenGL [closed]
I'm trying to light up a simple 2d triangle with my cursor as a diffuse light source but can't seem to set the normal correctly for the lighting to look right. The function that calculates the normal ...
2
votes
1answer
224 views
Has anyone got the Krypton Lighting Engine working in MonoGame for Windows 8?
I've converted the core of the Krypton Lighting Engine so that it's compatible with Windows 8.
The trouble I'm having when actually using it is that it can't load the KryptonEffect.xnb file. I'm ...
1
vote
2answers
109 views
Diffuse light direction
I'm learning a tutorial from Rastertek about diffuse light with DX 11, here's the shader code:
float4 LightPixelShader(PixelInputType input) : SV_TARGET
{
float4 textureColor;
float3 ...
2
votes
0answers
95 views
How does pixel shading work for ambient occlusion volumes?
I'm trying to understand the ambient occlusion technique described here, but I've trouble comprehending what exactly is the pixel shader doing.
Is the pixel shader invoked on points that belong to ...
3
votes
0answers
150 views
Changing Ogre3D terrain lighting in real time
I'm looking at the Ogre 3D library and I'm browsing through some examples / tutorials. My question is about terrain. There are a few examples showing how great the terrain system is, but I think that ...
4
votes
2answers
253 views
Lights shining through walls
I'm currently having a problem with lights in Unity. They shine through walls for some reason.
Point, directional, etc. If a light is next to a wall on one side, you can see it on the floor on the ...
4
votes
1answer
91 views
Gamma-Correct rendering without floating-point rendertargets
When using a gamma-correct pipeline, you have to work with floating-point rendertargets. Otherwise, you will get severe banding due to the insufficient precision of the usual 8-bit-per-channel integer ...
3
votes
1answer
99 views
Blender Object Appearing Gray when all Lights are Off
I have an issue with Blender where, when I turn my only light off (a sun lamp) and render the image my object appears gray rather than black (and thus, not appear to the camera). I can't figure out ...
1
vote
1answer
96 views
Multiply mode in SpriteBatch
I have a "lighting" texture (black background with white or colours for lights) that I want to draw as a multiplcation operation. SpriteBatch.Begin can specify BlendState.Additive, but there's no ...
5
votes
1answer
257 views
Performance of pixel shaders vs. SpriteBatch: XNA
Precondition: I read this question/answer about using shaders, or spritebatch, to render and mark a sprite.
I need to do something like that. I also have a 2D lighting PoC which I need to write. The ...
1
vote
0answers
127 views
Per fragment lighting with OpenGL 4.x tessellated model
I'm experienced with OpenGL 3+. I'm dabbling with tessellation shaders and have now got to a point where I have a nicely tessellated teapot/plane demo (quick look here)
As can be seen from the ...
-1
votes
1answer
130 views
OpenGl / C++ and some strange light problem on half board [closed]
I have some problem with lights in my opengl "game". I have board with is square (-50,50), (50, 50), (50, -50), (-50,-50) x and z since y doesn't matter at all.
I tried to make something like ...
2
votes
2answers
242 views
How to create realistic 2d lighting using colour temperature
I'm looking for a lighting algorithm that produces realistic lights expressed in kelvins, from about 2500k to 6500k. What I'm confused about is how to make the lights properly interact with the colors ...
3
votes
1answer
303 views
GLSL per pixel lighting with custom light type
Ok, I am having a big problem here. I just got into GLSL yesterday, so the code will be terrible, I'm sure.
Basically, I am attempting to make a light that can be passed into the fragment shader (for ...
0
votes
1answer
220 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.
...
4
votes
1answer
219 views
How do I autogenerate gradient lighting?
I am trying to think of a way to generate a gradient like this picture:
Something like this GetGradientTexture(360f,100(width),100(height)), or if i want a directional light (like a flashlight) ...
0
votes
1answer
86 views
What is a fast way to darken the vertices I'm rendering?
To make a lighting system for a voxel game, I need to specify a darkness value per vertex. I'm using GL_COLOR_MATERIAL and specifying a color per vertex, like this:
glEnable(GL_COLOR_MATERIAL);
...
0
votes
2answers
154 views
Why does my model render differently than its preview?
I've been importing .fbx files that I made with 3DS Max 2012 into Unity, and it's quite neat to see my models running around in game. However, I can't help but notice that the models, as they're ...
3
votes
1answer
167 views
forward rendering and multiple shadow maps
I have two light sources on my scene. I created two fbo's which store depth textures for these lights. A render loop looks like this:
bind fbo1
save depth values for first light
unbind fbo1
bind ...
8
votes
1answer
249 views
OpenGL: Light at end of tunnel effect
Anyone knows any implementation of the "light at the end of tunnel" effect? where the outside is entirely bright and gradually becomes more visible?
The reverse could also be true, where the inside ...
5
votes
2answers
535 views
How can I acheive a smooth 2D lighting effect?
I'm making a tile based game in XNA.
So currently my lightning looks like this:
How can I get it to look like this?
Instead of each block having its own tint, it has a smooth overlay.
I'm assuming ...
1
vote
2answers
334 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 ...
0
votes
0answers
74 views
How to move a directional light according to the camera movement?
Given a light direction, how can I move it according to the camera movement, in a shader?
Think that an artist has setup a scene (e.g., in 3DSMax) with a mesh in center of that and a directional ...
3
votes
2answers
364 views
2D lighting theory: day-and-night cycle, spot lights at night
I am writing a rogue-like 'zombie' management game. The game map will be similar to Prison Architect. A top-down 50 X 50 grid.
I want to implemented a day night cycle and during the night I would ...
0
votes
1answer
320 views
How can I achieve this lighting with OpenGL?
I'm currently trying to implement a type of "smooth" lighting. How can I achieve lighting which looks like this:
http://dl.dropbox.com/u/1668516/concept/warp3.png
Using OpenGl. I've attempted to use ...
1
vote
0answers
118 views
Light on every model and not in the whole scene
I am using a custom shader and try to pass the effect on my Models like that:
foreach (ModelMesh mesh in Model.Meshes)
{
foreach (ModelMeshPart part in mesh.MeshParts)
{
...
1
vote
1answer
185 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 ...
4
votes
1answer
713 views
How does Minecraft render its sunset and sky?
In Minecraft, the sunset looks really beautiful and I've always wanted to know how they do it.
Do they use several skyboxes rendered over eachother? That is, one for the sky (which can turn dark and ...
8
votes
1answer
286 views
Drawing “Stenciled” Sprites and making them glow
Currently, in my game - I'm not using XNA's SpriteBatch to render anything(I am using Farseer Physic's Debug View), and I was wondering how I would render something like this:
only using XNA. My ...
1
vote
1answer
91 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:
...