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.

Filter by
Sorted by
Tagged with
0
votes
0answers
19 views

Implementing DirectX 7 light attenuation in Unity's Universal Render Pipeline

I am create a modern Unity based client of an old MMO from 2000, and I am working on implementing their lighting system. Based on the data I have reverse engineered, it looks like they used a custom ...
0
votes
0answers
28 views

Update shadow caster 2d points in script

Using the Universal Rendering Pipeline, how do I update the points of a ShadowCaster2D through script? I presume I could have a singleton manager that would contain ...
0
votes
1answer
44 views

Why should every light source have its own ambient light?

I'm currently learning how to use OpenGl, and I'm following a tutorial on learnOpenGL. I'm at the lightning chapter, and it has introduced basic lightning, ambient and diffuse with specular highlight. ...
0
votes
1answer
17 views

Unity Unable to blend 2D Light renderers

I've followed the documentation on Unity regarding 2D lighting. It said to turn on Alpha blending in the options. But this is how it turns out: If Alpha blending is off: If Alpha blending is on: I'm ...
1
vote
1answer
43 views

Using a mesh stencil with 2D lighting in the Universal Render Pipeline

I've followed the CodeMonkey tutorial on using a dynamic mesh as a stencil for a field of view or visibility polygon effect, and have got it working using the latest version of Unity and its Universal ...
0
votes
0answers
24 views

Is it appropriate approach to simulate shadowing via occlusion culling of lights?

I have own deferred renderer and a scene with both closed and open spaces. I want to prevent light passing though solid objects. For example, there can be a house with a lot of point lights inside. I ...
0
votes
0answers
29 views

Current state of the art for rendering large numbers of dynamic lights?

This is intended as a platform-agnostic question, but I currently use OpenGL (with sights on Vulkan) if it is relevant. The last time I dealt with creating lots of dynamic lights (~10 years ago), the ...
0
votes
1answer
87 views

After baking my lights again in Unity, my character is black?

I had to re-bake my scene several times before getting the look that I wanted. This last time, the scene looks great, but my characters are now very dark and the playable character is completely black....
1
vote
1answer
80 views

Why does my game look different on my mobile device than in the editor?

I am new to Unreal Engine. My game in mobile looks totally different than in Unreal Engine editor. In Editor: In Mobile: Is this a symptom of something obvious? How can I make it so that what I'll see ...
0
votes
0answers
21 views

Baked Lightmaps never finish baking in Unity - what is a minimum “test bake” light setting?

Tried a number of different configurations. It seems lightmaps never finish baking? How does one get the light maps to bake? What is a minimum "test bake" light setting?
0
votes
0answers
13 views

Set up Blob shadow projector

My game completely uses baked lighting in URP and because of URP's forward renderer, point and spot lights can't cast realtime shadows on moving characters if I set their types to mixed lighting, and ...
0
votes
0answers
10 views

Light point buggy on old device after migrating to URP

Light point is very buggy on Samsung A5 after migrating to URP, it works well on PC and Samsung A7. Altought it has light points, these are really few and using lowest settings by default, all other ...
0
votes
0answers
58 views

How real time volumetric light beam effect could be achieved in opengl?

Here is 1.5 mins long video to give you an example of what I meant. From research that I did , regarding lighting effect, usually it is done offline (post-processing) using algorithms like "god ...
0
votes
0answers
46 views

3D Object in 2D Unity Project

Is there a way to bring 3D objects into a 2D project that is using the 2D Universal pipeline for rendering light? I have some 3D objects I want to bring in to the project I'm working on, but they just ...
4
votes
1answer
44 views

Issue with specular light at highly oblique angles with Blinn-Phong

I'm having an issue with my basic Blinn-Phong renderer, when looking at objects at very oblique angles: I don't think this is an issue with my code, although I'll post my fragment's GLSL below. ...
0
votes
0answers
6 views

Unity Applying Global Light Settings fog to a non-main camera

Is it possible to apply fog to a non-main camera?
0
votes
1answer
43 views

My lighting stays the same when I go indoors?

My problem can be seen here notice how the shadows don't change intensity or color when moving indoors to the cave. The only thing that changes is the highlights when I move under the directional ...
1
vote
0answers
36 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, ...
0
votes
0answers
20 views

What are good ways to model environment radiance (not irradiance)?

I'm trying to compile a list with relevant techniques in game development to model scene radiance. The (probably obvious) candidates I have so far is: Discreet light source objects in the scene (...
0
votes
1answer
44 views

Sprites don't become lit when installing Universal RP package

I want to implement 2D lights in Unity. So, I downloaded the Universal RP package from the Package Manager. I created renderers as shown here, then I created a light object (Point Light 2D) in a new ...
2
votes
1answer
77 views

Forward Shading with multiple shadow-casting lights

I am currently thinking about how to organize shadowing and lighting. We use forward rendering and currently, our algorithm looks like this: collect all items that are visible in the view for each ...
0
votes
0answers
51 views

Using Unitys URP how to make sprites lit by 3D Lights again?

I'm working on 3D game and I converted my project to URP. Everything works fine expect sprites that previously were 'Sprite/Diffuse' so they were lit by 3D lights (kind of Doom style, 2D elements in ...
1
vote
1answer
48 views

Sending light data from Vertex Shader to Pixel Shader?

We have a pixel shader constant buffer that contains the light data for the item that is currently rendered. To implement tangent space normal mapping, i would need to transform each light into ...
0
votes
0answers
39 views

Help with unity cel shader not work when turning away from the main light?

So i'm using this really good toon shader I found, that works with multiple directional and point lights. Only problem is, it acts weirdly when turning away from the main light seen here, ( sorry for ...
0
votes
0answers
61 views

RGB sequence of day/night cycle

I'd like to simulate a day/night cycle, and am thinking to do this with two components: an underlay to simulate sky color, accompanying either an alternating cloud or star rotation animation ...
0
votes
1answer
73 views

Volumetric lighting not working when building and running game

I have a volumetric lighting system implemented into Unity and when I am making the game and run it in the Unity editor the volumetric lighting shows up. When I build it and run it though it doesn't. ...
0
votes
1answer
492 views

Spotlights and Pointlights not working with Unity Render Pipeline?

I'm experimenting with URP, Render Pipelines, and Shaders for the first time recently and have noticed something odd. In the scene I'm building, Point Lights and Spotlights don't work. No matter what ...
0
votes
1answer
42 views

Generated Mesh Does Not Have Shadows/Shading

Description I'm trying to create a water shader, and at this point in development I'm using a Photoshop-generated cloud texture as a map for vertex displacement. The displacement itself works just ...
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 ...
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. ...
0
votes
0answers
45 views

Making a 'Darkvision' Mechanic for a Unity C# Game, Not Sure Where to Start

I am endeavoring to make a small multiplayer dungeon crawler and would like to introduce a mechanic like 'Darkvision' from table-top RPGs. The desired effect would be that where there is some ...
0
votes
1answer
46 views

Why is there grey haze that appears when game is simulated in viewport, and how do I fix it?

For some reason when the game runs in the regular viewport (not it's own) a grey haze slowly appears. This never used to happen. The level architecture (code) changed recently and then this started ...
0
votes
0answers
291 views

How do you make lights affect 2D sprites in a 3D environment using Unity's URP render pipeline?

I'm using Unity, URP and have 2d sprites characters in a 3D environment. I want 2D sprites to be affected by lights/shadows like the rest of the environment. -I know if I use a 2D renderer I can use ...
0
votes
0answers
11 views

Unity baked emissive light not working

I'm having issues getting the left emissive light in the image to bake. I've tried messing around with all the lighting settings but nothing seems to solve the issue. Can anyone pinpoint where I'm ...
0
votes
1answer
38 views

Unity - Global illumination seems no longer applied to static objects on runtime

First of all I'm newbie with Unity, so please forgive me if the answer of this question is obvious for any experimented developer. So, in one of my project I have this result while I run the project ...
0
votes
1answer
52 views

Multiple directional lights use cases?

I have been building and designing a hobby-tier game engine and I am currently working on supporting any amount of lights of any type. I checked out Unity and it supports multiple directional lights, ...
0
votes
0answers
55 views

Fragment shader for lighting in isometric perspective

What I'm trying to do is to achieve basic lighting in 2D from an isometric perspective. Here I have 2 textures that are used as tiles for the ground: Color: Normal map: I have a fragment ...
0
votes
0answers
14 views

How to make a sun that only illuminates stuff in sunlight?

I set up a scene with Gaia Pro, and it looks really nice so far. It even has a script to add a Sun object and have it circle the scene, which is pretty cool. Problem is, it's implemented as a ...
0
votes
1answer
42 views

The colors of Unity 2019 are different

I currently use Unity 2018 LTS, because of my 2019 Unity colours are not really good. For example, the white is not really white but more like grey and the Shadows are really strong too even if I ...
0
votes
1answer
31 views

Figuring out the exponent in a spotlight equation from the angle of a cone

I followed a tutorial on how to build a spotlight using DirectX. This tutorial uses a point light equation plus a line of code to limit the light to the shape of a cone. I have everything working, but ...
0
votes
0answers
389 views

How to bake reflections and lights in Unity's Universal Render Pipeline?

I just upgraded my project to Universal Render Pipeline (using Unity 2019.4.3.4f1 on Windows 10) and want to bake some HDR reflections and some spotlights into the floor. I placed some light and ...
1
vote
1answer
73 views

Distant objects remain fully lit at sunset, when they should be in the mountain's shadow

I'm trying to make dynamic sunrises and sunsets in my game but I have some problems. My scene is surrounded by mountains and when the sun tint is still hot the sun is not visible but, the trees that ...
0
votes
0answers
38 views

Strange lighting bug in my game

I've been experiencing this lighting bug in my game. As you can see there is a box around the player on the back wall and underneath it. the platform and back wall are 3D objects and the player is a ...
-1
votes
1answer
46 views

Render output difference cause

There are two 3D applications compared side by side: I'm looking for difference cause. These might be the cause, but I'm not sure: Color Lighting Shading code (GLSL) ? Can anybody help me with ...
1
vote
1answer
96 views

Why baked light differ so much from realtime light?

I'm trying to figure why Baked light differ so much from realtime lightning (whose final result I like and prefer!) Left one: baked light, right one: realtime. I've placed a: Directional light 3 ...
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 ...
0
votes
0answers
14 views

How to place a reflection probe in an interior scene?

Perhaps this is a "dumb" question, but I can understand how/where to place correctly a reflection probe in Interior scene (a room) to improove lighting. In particular I can't understand if my Probe "...
1
vote
1answer
65 views

How do 3D rendering pipelines render light effects?

How does 3D software like Blender, Maya, Unity, or Houidini etc. render the effects of lights illuminating a 3D scene?
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 ...
0
votes
0answers
30 views

Calculating PBR Lighting returns weird results at (0, 0, 0) or lower positions

I'm writing a Physically Based Renderer with the help of this tutorial here https://learnopengl.com/PBR/Lighting The vertex shader they use can be found here: https://learnopengl.com/code_viewer_gh....

1
2 3 4 5
13