Questions tagged [lighting]

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.

135 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
10
votes
0answers
388 views

Spherical Area Lights do not match reference

So I'm adding spherical area lights to my application, and comparing my results with mitsuba, I am getting some differences (left is my approach, right is mitsuba - a pathtraced reference): What I am ...
8
votes
0answers
1k views

How do I reconstruct depth in deferred rendering using an orthographic projection?

I've been trying to get my world space position of my pixel but I'm missing something. I'm using a orthographic view for a 2.5d game. My depth is linear and this is my code. ...
6
votes
2answers
314 views

How to generate a multiplier map for radiosity

I am following this tutorial: here I am at the part where you are creating a hemicube. I have got the code to render the scene into a texture and therfore an array. Now how can I generate a so-called ...
6
votes
0answers
619 views

Irradiance Map ( Irradiance environment map)?

As irradiance map is generated for every possible normal for all the texels in environment map (as every texel act as a light source) so that we can look up irradiance map, based on normal of fragment ...
5
votes
0answers
396 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 ...
5
votes
0answers
474 views

Compute directional light frustum from view furstum points and light direction

I'm working on a friends engine project and my task is to construct a new frustum from the light direction that overlaps the view frustum and possible shadow casters. The project already has a ...
4
votes
2answers
436 views

2.5D platformer how to darken building edges?

I was wondering how I could go about creating a vignette type effect / some sort of volumetric shadow for the 'cross section' parts of a 2.5D level. The effect I'm going for can be seen in 'This war ...
4
votes
0answers
206 views

Moving directional light cause huge fps drop: why?

I've implemented a simple script to simulate Sun Rotation (day/night cycle). In my "Update" i Rotate main Directional Light (the sun). What i've noticed is that my FPS dropped from 60 to 20-25 fps. ...
4
votes
2answers
232 views

Fine tuning light shader mechanics

I'm currently trying to implement the lighting technique described in this article. I've done pretty much exactly what is done in the article. My technique is the same, and my shader is the same. ...
4
votes
0answers
954 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 ...
4
votes
1answer
493 views

Java Slick2d lighting using Raycasting

I am trying to make a top down view game in java using the Slick2d library, for lighting I wanted to do something like this : http://www.redblobgames.com/articles/visibility/. I was wondering if there ...
3
votes
0answers
48 views

Help in understanding atmospheric scattering shading

I have a made a planet and wanted to make an atmosphere around it. So I was referring to this site: Click to visit site I don't understand this: As with the lookup table proposed in Nishita et al. ...
3
votes
0answers
44 views

Resolution problems with global illumination in Unity

I am pretty new to Unity and after hours of searching I have finally figured out how to set everything up for (baked) global illumination to work for my model. However the model is an export from a ...
3
votes
0answers
33 views

Blending Lights Into An Image Pulled From Memory (2d)

The circumstances to why I am forced to do things this way are a bit weird, without going into them, I have the following situation: I have a pointer that points to image data arranged in the form ...
3
votes
0answers
149 views

Creating “Run over by car” effect in unity using spotlights only

I'm doing a project where I need to simulate a car running the character over. It's happening in a completely dark space, so I want to create it using spotlights moving towards the camera until the ...
3
votes
0answers
339 views

Unity emission lighting

I have created a scene with a blue sphere inside of a white room of planes. The room is being lit by a point light above the roof, and the sphere is emitting a blue light. How do I get the emission ...
3
votes
0answers
476 views

Enabling OpenGL lighting seems to disable blending

I have the following code to set up for some 2D drawing using OpenTK. I originally wrote it without any lighting considerations, but later added the lighting block. This version of the code uses ...
3
votes
0answers
72 views

Light bounding geometry for deferred rendering

What is the best bounding geometry to use in a deferred renderer for each one of the following light types? Sphere area light (obviously a sphere) Disk area light (obviously a cone) Rectangular area ...
2
votes
0answers
28 views

Lighting not working in a 2D JavaFX game when using subtracting shapes?

So im trying to add lighting into my game. I'm using shape subtracting and unions to subtract circles (the lights) from a dark rectangle that covers the whole world. I think that its a problem with ...
2
votes
0answers
215 views

Direct3D11: Directional Shadow Maps

I've recently implemented shadow maps on my project. However, I'd like to add a feature that allows the light direction to be dynamically changed, so that the terrain can be viewed using different ...
2
votes
0answers
85 views

Problem with baked lights

I'm working on a 3D gallery experience and I'm having some difficulties regarding directional and point baked lights. When I build it for web with webgl, only global lights are rendered, but when my ...
2
votes
0answers
145 views

Instancing meshes messing up scene lighting

I've been rendering a scene (some objects over a large field of grass) to test shadow mapping which is working fine. But when I use instancing to "gain" performance, I not only get a decrease in ...
2
votes
0answers
661 views

Monogame working with Krypton

I am trying to make a simple 2D game engine using Monogame and the Krypton 2.0 lighting engine. So far I have succeeded in rendering a light but I am unable to generate any shadows from any hull's. ...
2
votes
0answers
786 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 ...
2
votes
0answers
148 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: ...
2
votes
1answer
867 views

Emissive material not casting light on itself in Unreal

I have a static mesh that has an emissive material applied to part of the mesh. The emissive material successfully cast light to surrounding objects. However, the face of the mesh with the emissive ...
2
votes
1answer
1k 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 ...
2
votes
2answers
144 views

Why are 2D game tiles often lit from the top left?

I have been in to game programming for some time now, and recently ventured out in to trying to create my own pixel art. So I have learned the basics of lighting and shading etc. and noticed that ...
1
vote
0answers
37 views

LibGDX Lights and Shadows for my 2D TiledMap Game (like Terraria/Starbound)

Im currently working on my Terraria-Clone. After I have finished generating the world, I would like to add light and shadow to my game. For example, it would be light in the Upperworld during the day, ...
1
vote
1answer
174 views

Performing image based lighting in an open world game

I finally have a PBR implementation in an engine that I'm writing for a game I'm developing but I'm stuck on how to use IBL in real situations. Most IBL tutorials use it just to show a single mesh or ...
1
vote
0answers
41 views

How to get interior uniform lightning?

I'm trying to reach uniform lighting as in this image. This scene i've bought is rendered with 3ds and v-ray (i suppose). This is the same scene i've imported in Unity. I've put a "big" point ...
1
vote
0answers
43 views

How do I ensure my Android build is not darker than in Editor?

My scene on the Android Build looks much darker. Based on my research about the topic, and from the texture of the light on the spheres, I assume it is because the light uses per vertex render mode ...
1
vote
0answers
105 views

How to have a point light with no falloff in Unity 3D?

Does anyone know of a good strategy to make point lights with no falloff, eg. anything in the radius of the light will be 100% illumination while anything outside the radius will be 0% illumination. ...
1
vote
0answers
119 views

Spherical harmonics

I'm currently trying to implement a GI system for diffuse lighting and wanted to do so in spherical harmonics. Now i have read what else i could find and i know the general idea of how to get from ...
1
vote
0answers
62 views

Self-illumination vs luminance

I'm using a graphics format reading library which has an enum called "MaterialLuminanceMode". There are three luminance modes for materials available: Self-illumination, which I interpret to mean "...
1
vote
1answer
99 views

How to add lighting to a 2D Tile-based game in JavaFX?

I'm making a 2D roguelike tile-based game with Java and JavaFX. I'm currently working on adding lighting and darkness to the dungeon, but whenever I try running it, it takes a very long time to load, ...
1
vote
0answers
335 views

2D Shader for affecting lights based on y-distance

I've been struggling with this problem for a few weeks (mostly because I'm so new to shaders), but I have an angled camera for my 2D game that uses lights. I saw this link about the '3D light ...
1
vote
1answer
94 views

Are realtime lightning calculated every frame , also the ones not 'visible'?

I've a big scene, with a lot of realtime light. I noticed a big drop in FPS after finished to add lights, so I suppose that too many realtime light are a 'bad practice'. But my question is: are all ...
1
vote
0answers
51 views

Shadows are not showing up

I am fairly new to graphics programming, and I am working on a rudimentary game engine in C++. I had some old graphics code written in Java that I translated, but for some reason the shadows are not ...
1
vote
0answers
74 views

How to lower the cost of realtime lights?

Besides Deferred rendering, what can I do to make realtime lights cheaper to render? I don't really need them but I could make good use of them in my game. BTW I thought Deferred render would give me ...
1
vote
0answers
69 views

Alpha is not working in diffuse light shader

I am following this tutorials series on rastertek.com and I got a bit stuck on the Diffuse Lighting Tutorial. Particulary, the part that does not work for me is alpha channel of the light color. Here ...
1
vote
0answers
452 views

Realistic intensity of a sun in Unity to match the outside world

I am creating an ARCore application in Unity where I want to make lighting shadows that match the real lighting outside. For this, I have made a rotational directional light that simulations the ...
1
vote
0answers
48 views

When load my unity scene on vmware windows virtual machine, the color/lightening of the scene randomly changes? It turns pink

Hi I have a unity scene doing all it is suppose to on mac but I had to load that scene on vmware windows virtual machine and when I did that, the color or the lighting of the scene was randomly ...
1
vote
0answers
788 views

SFML - How to implement a simple 2D lighting system

Lately, I've been reading a lot about 2D lighting systems in a game, and have observed just how much lighting can add to a game's graphics appeal. However, as for implementing one of these in SFML, I ...
1
vote
0answers
274 views

Why a point light not cast shadow on my moving object, but only on static?

In my Unity3d scene i've two light: a directional (sun, outside the window) and a point light. In my scene, I can see shadow correctly, also if i "play" with settings like Intensity or Range. But in ...
1
vote
0answers
56 views

Export baked lightmaps from Unity to Monogame

I'm trying to bake lightmaps in Unity, export as textures and apply the textures in Monogame. Is this the right path to go? If so, how it should be done? Thank you.
1
vote
0answers
28 views

Unity - What changes to a game object trigger baked lights to need a rebake?

I've noticed that sometimes when I make changes to game objects in scenes that have baked lights that the baked shadows will no longer be in effect and dynamic lights will instead be showing. ...
1
vote
0answers
321 views

Lighting, shader and GI is messing up the materials in Unity3D

Hello Guys I am not very sound with Unity3D Lightmapping. Currently I have a set of low poly items in my scene. Textures on my models are getting washed out. They totally look absurd. here is a ...
1
vote
0answers
953 views

Unity Lighting in 2D, block light source

I'm making a 2D game in Unity, and I want to have characters walking around with flashlights. I've set the 2D sprites to a a Sprites/Diffuse material so they can using unity's lighting system. I want ...
1
vote
0answers
78 views

How to mitigate this strange pattern shown in Phong lighting?

I am creating an entire lighting scene in OpenGL. The entire scene consist of only one point light. I noticed some strange z-fighting like pattern. This flickers when I move the camera. Can anyone ...