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
0 answers
461 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 ...
5 votes
1 answer
636 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
1 answer
98 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
0 answers
43 views

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

Is it possible to apply fog to a non-main camera?
1 vote
0 answers
417 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
0 answers
21 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
1 answer
1k 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 ...
3 votes
1 answer
881 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 ...
1 vote
1 answer
303 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 ...
-1 votes
1 answer
1k views

how to make UI material ignore scene lighting, have same brightness as albedo?

I have a material on a quad surface object that is parented to a canvas for a pause menu. The material is animated (materials on UI elements such as canvases cannot be animated because of [reasons], ...
0 votes
0 answers
161 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
0 answers
742 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 ...
1 vote
1 answer
308 views

Do meshes marked "shadows only" require light maps to block light?

I want to use an .fbx mesh to block light from entering a room (except for holes cut for windows). The mesh itself must stay invisible. I know marking it "shadows only" will hide it from the camera, ...
0 votes
1 answer
654 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 ...
3 votes
0 answers
119 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
0 answers
1k 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
1 answer
66 views

3D title Rendering in Maya For babylon Js Game Engine

I created a 3D title in Maya and applied color through Lambertian shading and rendering with mental ray. The problem is when the title is rendered in the game engine, it is looking very sad. The ...
1 vote
0 answers
672 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
0 answers
36 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
1 answer
269 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
0 answers
50 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
1 answer
53 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
1 answer
729 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 ...
11 votes
4 answers
15k views

How can I create light shafts like Journey's in Unity?

I'd like to create cartoon looking sun / light shafts that look very close (or identical) to the ones in very well known and loved games like Journey: and Ori: How can I accomplish this?
1 vote
0 answers
151 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
0 answers
173 views

Handling metallic roughness maps colour channels

I'm trying to use a metalness/roughness workflow and I'm not sure how to translate the colour channels into the different metalness and roughness attributes. I'm not sure if there's a standard on how ...
1 vote
1 answer
161 views

Why do asymmetric specular highlights appear in a scene with only ambient lighting in Unity?

I have a scene in Unity (2019.3.0f3 Personal) using the High-Definition Render Pipeline. There are no lights in the scene, and Baked Global Illumination is disabled. The skybox is a ...
1 vote
0 answers
285 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 ...
3 votes
1 answer
653 views

Multiple volumetric lights

I recently read this GPU GEMS 3 article Volumetric Light Scattering as a Post-Process. I like the idea to add volumetric light property to realtime render i'm working on. Question is will it work for ...
-1 votes
1 answer
1k views

Volumetric Lighting/Light Shafts in DirectX

So currently I am trying to implement Light Shafts into my DirectX Engine. I read the Nvidia GPU Gems Article (https://developer.nvidia.com/gpugems/gpugems3/part-ii-light-and-shadows/chapter-13-...
1 vote
0 answers
2k 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 ...
2 votes
3 answers
3k views

Lighting large scene with dynamic lights - Unity3D

I am working on a game project where most of the action takes place in a large scene that is built to look like a space station. Because it is all technological and enclosed, I can't use a directional ...
0 votes
1 answer
76 views

ToonRamp Shader + Normal Maps: How to keep strict lighting bands?

I'm trying to achieve a shading similar to the one on this image: Image 1: https://i.stack.imgur.com/iB5nH.jpg To get something similar to this I wrote a toon ramp shader (similar to the one in the ...
0 votes
2 answers
5k views

How to change the intensity of a light

I just want to change the intensity of a light. The script is already in the light object, but I can't turn it up or down to save my life, and wherever I look, no one has the answer. ...
0 votes
1 answer
221 views

Problem with Blender model imported to Unity (Lighting problems)

I made a simple box in blender and imported it to unity. Now I'm facing with this weird lighting problem: I've been messing around with normals, duplicated vertex, lots of things, even lightning ...
0 votes
0 answers
1k views

Unity Light Baking for Best Balance between Performance and Visuals

I'm trying to optimize my Unity game. I have static objects, dynamic objects and (only) static lights. I wish to fully pre-compute lighting and shadows for the static objects while still ...
0 votes
1 answer
109 views

OpenGL object load in reverse

I am trying to load a model and it is loading it in reverse. When I am trying to rotate it 180 degrees it changes the lightning as well. I am not sure what I need to do to change the position that eh ...
0 votes
1 answer
2k views

Why are there weird texture artifacts in baked light which don't appear with realtime light?

This is the comparison of the same scene, realtime light vs baked light. What's am I wrong ? EDIT: In particular, also texture are low quality (see image 2). Why ?
1 vote
0 answers
507 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. ...
0 votes
1 answer
477 views

Unity ceiling light issues

I'm trying to get back into Unity and I've been playing around with lighting. I modelled a simple lightbulb in Maya and have been trying to create a hanging ceiling light but I'm struggling to get it ...
1 vote
0 answers
201 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 ...
0 votes
1 answer
88 views

Spherical harmonics lightprobe problem

I am trying to add spherical harmonics based ambient lighting to my game but have run into some problems and while trying to solve this I have reduced the test scene to the following very basic ...
1 vote
0 answers
65 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 "...
22 votes
5 answers
30k views

How can I make particles glow and cast light on its surroundings?

Im currently attempting to make a firefly effect on a dark forest. The level has very low light and the player is one of the few light sources. To let the player see the level better, I am attempting ...
2 votes
0 answers
64 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 ...
0 votes
0 answers
48 views

Flare fading when moving camera

I have been trying to do a sun in Unity 3D. I have used a sphere with a texture and a flare. The problem is that when I move the camera the flare fades until it disappears when the sun is almost out ...
2 votes
1 answer
817 views

Flat Shading does not work correctly (openGL)

So currently I'm trying to implement flat shading into my engine using glsl's flat qualifier, and I have encounterd a really weird bug. Somehow the lightning on terrain isn't spread correctly, I want ...
1 vote
1 answer
2k views

How do you turn off all scene lighting in the game view like you would with the scene view button?

In the scene view, there's a control bar with a 'lighting' button that lets you toggle scene view lighting. This turns off all shadows and all light sources, i.e. makes it so that all objects are seen ...
0 votes
1 answer
153 views

How to add a flash light to a particle explosion

I've an explosion effect using particle system. Explosion occur on air, so I want to add a "flash" light effect when explosion occur (that light sky and terrain ). Can you suggest me best way to ...
0 votes
0 answers
39 views

How to do Colored Lights in CIE XYZ/LUV-like Space?

I've a 2d background, some sprites, blitted onto it. And over all that in the final pass I draw colored lights, to make projectiles look cooler. Basically I apply a classic lightmap, which is colored ...

1 2 3
4
5
15