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.

146 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
11
votes
0answers
433 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 ...
9
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
0answers
703 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 ...
6
votes
2answers
350 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 ...
5
votes
0answers
407 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
525 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
515 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
218 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
263 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
983 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
523 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
54 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
65 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
35 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
182 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
345 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
526 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
73 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
18 views

Tweak brightness of widget in UE4

I would like to make an interactable monitor in Unreal Engine 4.26. I am using the default material for widgets as you can see in the image below: The texture I would like to show is: When I drive ...
2
votes
2answers
100 views

How can I create a shader which makes an object transparent in bright light and opaque in low light?

I'm trying to set up a shader that, as the title says, functions similarly to the effect appearing in the "Lights Out" horror short film. Cut down to the very basics, I'm looking for advice ...
2
votes
0answers
34 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
246 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
162 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
672 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
825 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
1k 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 ...
1
vote
0answers
24 views

Best practices for treating Light Volumes in Deferred Lighting pipeline

This topic is about ways to handle light volumes in a deferred lighting pipeline. I currently have a deferred lighting pipeline where spheres are sent to an openGL GLSL lighting shader. The sphere ...
1
vote
0answers
91 views

Unreal 4 - Static mesh has strange, glitchy shadows?

The first image below shows my mesh in Blender with the Blender lighting, and the second image from inside UE4 has this weird shading on it. Is there any way to help it look like the first image? I've ...
1
vote
0answers
25 views

Perspective of a Point Light

I'm trying to calculate shadows by projecting the silhouette of each object seen by the light source. (The shadows are just going to go on planes.) To get each silhouette I take a snapshot from the ...
1
vote
0answers
231 views

Baked lightmap: Parts of scene appear too dark

I'm having trouble setting up global illumination in my Unity 2021.1.1 URP project Parts of my scene are appearing completely dark, I'm only using directional light and area light on the windows, here'...
1
vote
0answers
44 views

What is the best way to bake my own environment maps?

My engine has support for IBL by using pre-obtained HDRIs. It looks fine, but... I want the environment map to match the scene that is currently being rendered I want the environment map to take the ...
1
vote
0answers
25 views

Trouble with Normal Matrix and Point Lighting

I'm having issues with lighting in my game. For some reason, no matter what I try, point lights appear to cut off halfway through the center of the light. I'm trying to render this light on a quad. ...
1
vote
0answers
131 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
335 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
56 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
47 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
1k views

Unity - Load Lightmaps at Runtime

I'm a bit of a novice to lighting, but I think what I want to do is possible, so please bear with me. Due to the nature of my game, I've taken an approach where a singular scene ...
1
vote
0answers
269 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
147 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
195 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
544 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
139 views

Is Realtime Lighting calculated every frame, including lights that aren't 'visible'?

I'm working with a big scene, with a lot of realtime lights. I experienced a big drop in FPS after adding lights, so I suppose that too many realtime lights are a 'bad practice'. But my question is: ...
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
78 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
72 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
690 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 ...