Questions tagged [shadows]
Dark spaces cast by the presence of a solid object blocking the flow of light. Often helpful for telling where your character is going to land.
243 questions
1
vote
1
answer
94
views
Can we avoid PCF shadow blur in area where it is full shadow or no shadow
I cast shadows in either opened or closed environment for a directional light whose lookat position follows the player position. So the shadowmap is refreshed regularly so that I cannot store a fixed ...
0
votes
1
answer
46
views
Difficulties with matrices settings for cascaded shadows
I have added cascaded shadows to my pipeline. The whole process seems to works fine as shown in the picture. But I should obtain a progressive “zoom” from the first cascade (red) to the last (blue) ...
0
votes
0
answers
56
views
Unknown light source in viewport when camera projection is orthogonal
I'm using Godot/Redot for my game development but so far this happens when camera projection is orthogonal, there's unknown light following the viewport when the camera is moving.
Here's the example
...
0
votes
0
answers
80
views
What is the best lighting & shadow setup for mininal draw calls and triangles?
I have been testing out various lighting and shadow settings in Unity since during play mode the stats are showing a much higher set pass call and triangle count to what I know my model has. I have ...
1
vote
0
answers
214
views
Terrain detail grass not receiving shadow
The grass painted onto my terrain is in the shadow area of the house wall, but they're not receiving shadows. Why does this happen?
1
vote
1
answer
379
views
How does planar shadow projection interact with perspective projection?
This question is about planar shadows as explained in Frank Luna's DX11 book. The author presents the 4x4 shadow matrix, whose bottom right element is n\$\cdot\$L (where n is the plane's normal and L ...
1
vote
0
answers
113
views
How to transform correctly shadow cascades?
I think I got the main idea of shadow cascades but I have misunderstanding of transforming shadow cascades using matrices for getting correct a result. I understand it this so
Define shadow cascade ...
0
votes
1
answer
137
views
Issues with implementing shadow mapping produces weird results
This is my first attempt in implementing shadow mapping. I am using right hand coordinate system and my projection matrices are producing z values from 0 to 1.
I've decided first to use orthogonal ...
3
votes
0
answers
117
views
Smooth self shadow on dense foliage
I don't know how to achieve or research smooth lighting on foliage, like in this screenshot of theHunter: Call of the Wild.
The grass is translucent, but blocks light smoothly when it's tall and ...
2
votes
1
answer
463
views
Making Unity shadows work at a small scale
I'm trying to cast shadows from a small (3cm) sphere onto a table surface.
If I place a large object, I get shadows as expected, but below a certain size, I get nothing.
I appreciate that under ...
0
votes
1
answer
654
views
How can I remove dither effect on player's shadow?
I am trying to make a dithering effect on the player so that when the camera comes below or very close to the player he will be dotted or transparent like in Genshin Impact. So, I followed a tutorial ...
0
votes
0
answers
342
views
How to stop light from seeping through meshes?
I'm trying to make a giant minecraft world but light keeps seeping through everything, as every block is paper-thin. Is there a way to increase its thickness?
Notice the edges of the meshes. Light is ...
0
votes
0
answers
270
views
Gaps in shadows even with zero bias set Unity
I have a problem with gaps in shadows in Unity. I know that there are many questions about that, but all of the answers are usually about setting bias property to 0. But this didn't help me. I use ...
0
votes
0
answers
279
views
Per pixel shadows with depth / displacement map
I am looking to draw 2D sprites that cast artificial 3D shadows onto a flat terrain using an additional depth-texture when rendering the sprites. A black/white depth texture is used to
add a height-...
0
votes
0
answers
219
views
What's the solution to this kind of shadow acne?
I'm working with a OpenGL ES/GLSL homebrew engine my company developed, in C++. Below is a screenshot of it rendering shadow acne. The light's direction is too perpendicular to the face of the curve ...
0
votes
0
answers
45
views
How to calculate if a complex shadow matches a Texture?
Unreal 4.27, newbie and experimenting, will switch to 5 if supporting features are not available in 4.
I have a light on the left side of the room pointed toward the right side. In the middle of the ...
0
votes
0
answers
203
views
Thin gaps in shadows of FBX models imported into Unity
I recently have started making my game in Unity and making models to go alongside it. However, I export my models as an FBX and am able to successfully get them into the game, but unfortunately it ...
0
votes
1
answer
252
views
How not to multiply real time and bake shadows? (Unity)
I have one Light Source ( Directional Light ) with Mixed Mode.
Lighting Mode in Lighting Window I seted to Subtractive.
What the problem looks like
How I would like the shadows to blend. How to ...
1
vote
1
answer
1k
views
Deriving shadow position from a 2D heightmap
I have a 2D heightmap with discrete values. Based on these values they should cast a fixed position shadow (constant angle respective to the "sun"). I can figure out how to cast it on a flat ...
0
votes
1
answer
442
views
Cascaded Shadow Maps - Handling shadows that cast into different cascades
For example I have 3 shadow cascades. A shadow is cast by a hill in my 2nd cascade, but the shadow itself is cast into not only the 2nd cascade but also the 1st. In the shader program, in order to ...
0
votes
1
answer
1k
views
Unity 3d when camera is closer the shadows getting clipped weirdly
When in distance the shadows are appearing correctly but when getting near to the shadows it is getting clipped in a weird way. I was not able to fix it. Any help would be appreciated.
0
votes
1
answer
988
views
How to calculate the shadow bounding box with a directional light
I'm trying to implement a directional light in my C++ / OpenGL engine, but I struggle to calculate the shadow bounding box (i.e the shadow frustum).
The bounding box has to encompass the main frustum ...
0
votes
0
answers
200
views
Shadows issue in Unity
I am using Unity Built-in render pipeline 2020.3.5
I have a weird shadow projection when pointing at game objects with my flashlight (spotlight). It looks like the shadow is floating or is another ...
0
votes
1
answer
2k
views
How to make a shadow-casting day/night system in 2D URP?
I am trying to achieve a day/night lighting system similar to the game RimWorld.
Short preview of what I want can be seen here: https://giphy.com/gifs/VgzcwtjueP7BrYSrXe
Instead of using Global Light ...
1
vote
0
answers
38
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 ...
0
votes
0
answers
131
views
Unity Light Bug
I saw this while testing my game.
I have a light situated behind the Main Camera.
All is working perfect, until I get a Game Over, and changes to the Game Over scene. From then, all lights have no ...
3
votes
1
answer
713
views
Matrix math in cascade shadow mapping
I am implementing cascade shadow mapping algorithm and currently stuck with matrix transformations - my AABBs, when projected in light space are pointing in the direction opposite to the light:
I was ...
0
votes
1
answer
588
views
Unity - jagged shadows when export as apk?
Alright, I found this question with the same problem but it's out of date Jagged shadows with default settings
My problem is a discrepancy between shadow quality settings in editor vs apk built to ...
0
votes
0
answers
105
views
Issues with percentage closer filtering
I'm trying to code a simple game via OpenGL C++.
I've implemented a point light, parallax effect with textures, objects from blender etc. but I seem to have an issue with my percentage closer ...
1
vote
1
answer
2k
views
How to get light level (brightness) of a particular location?
I'm making a 2D top-down survival game similar to Rimworld, I'm trying to emulate a day-night system.
Many features depend on whether any tile is light (or dark) ...
1
vote
1
answer
243
views
2D shadow from polar coordinates has hard cut-off at a certain radius
I'm trying to cast shadows from a 1D texture that goes from white to back according to the distance given by an occlusion map. That part I think I got it right. The problem lies on the algorithm to ...
0
votes
0
answers
1k
views
How to make a point light cast shadows in realtime?
I have a solar system...
The central star has a point light attached to it.
However, objects don't cast shadows on each other...
Planets are < 20 units from the star, so it's not a light falloff ...
0
votes
1
answer
184
views
Stride: Can't see shadows in programmatically created scene
As a learning exercise I'm trying to recreate the 'new game' scene with the sphere on a plane.
Mostly working but two issues:
Shadows are not working.
Skybox light (reflected on the sphere) is
not ...
0
votes
1
answer
749
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 ...
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
2
answers
233
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
1
answer
785
views
How can I fix the artifacts near the shadow edges in my variance shadow map?
I'm trying to implement variance shadow mapping in my engine. I'm using WebGL 2 and now I have only one directional light source. It's working, but it has a serious issue near the shadow edges and I ...
0
votes
0
answers
72
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 ...
2
votes
1
answer
265
views
How to make shadows softer as distance increases?
I'm trying to make shadows become more blurry as the distance between the caster and receiver, so they look a little more realistic.
What method can I use to achieve this?
0
votes
0
answers
76
views
SMR shadow fade by script?
I want to make fade for my player shadow. I don't know if it's possible or not. In my skinned mesh render there is "Cast shadows" with four options "Off, On, Two sides, and Shadows Only". How to do it ...
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 ...
27
votes
2
answers
9k
views
Why do some games show lights shine through walls?
In some games, I see lights shining through walls, even if I set video quality on high levels.
A couple of examples of games I recently played are Borderlands 2 (missile explosions) and Call of ...
0
votes
0
answers
93
views
Unity: How to fix shadows with several meshes in different objects?
I'm creating many GameObjects and each one has a single mesh, created in a script. The problem is that I would like to draw them so that they behave like a single mesh. Is it possible? Or I must ...
1
vote
1
answer
3k
views
LWRP Custom Shader Graph material casts no shadow
I created an empty Shader Graph by clicking Create -> Shaders -> PBR Graph.
I created the material for this shader and assigned it to my game object, but the object does not cast a shadow.
If I ...
0
votes
0
answers
102
views
Unity : Casting shadows of anima2d characters
I want to cast shadows of animated 2d character on a level like this :
The only thing here I want is dynamic shadows for anima2d character as animation progresses.Is there a way of achieving shadows ...
1
vote
0
answers
110
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 ...
0
votes
1
answer
124
views
How can spotlights be implemented with a perspective projection?
I was reading Shadow Mapping with Directional Lights
and noted that spotlights are implemented by rendering with the perspective projection, stating that the spotlight worked just like the camera. ...
0
votes
0
answers
1k
views
Unity Soft Shadows
I'm building a puzzle level in Unity. I have a ball with cracks on it and a point light inside it. The goal is to project the light coming through the cracks into the walls.
I've managed to do that ...
1
vote
1
answer
414
views
Shadow artifacts/acne on block intersections
This is using the default shader and depth shader from LibGdx. It creates lines at the blocks intersections.
This is what I use to create the blocks models for now:
...
0
votes
1
answer
660
views
LibGDX Box2dlights - Body Shadow Problem
While playing around with the box2dlights with libGDX, I have managed to get it all up and running, but have a problem with the shadow rendering.
This is what I currently have atm:
With the lighting ...