Questions tagged [lighting]

Related to computer games' engines and 3d graphics software. For the use of both shadow and light in GUIs and for the use of lighting with respect to programs using hardware such as cameras, that requires code to control the lighting. Must be used with other relevant tags distinguishing the programming language and framework being used. e.g. unity 3d Not to be used with light, as is used in physics having wave and particle characteristics.

Related to the computation of reflection models like the Phong Model or Blinn-Phong Model and the per-vertex (Gouraud) and per-pixel shading models (Phong).

719 questions
-1
votes
1 answer

Unity Baked Global Illumination Dyamic Objects Are Dark (even with light probes) (URP)

I use URP and baked directional light.enter image description here Edit: I of course already baked a lightmap. The problem is dynamic objects aren't enlighten by directional light(on baked mode).
-1
votes
1 answer

Why do my lights keep flickering in my unity 2d game?

I placed 9 Point Lights within my 2D game on unity, however they keep flickering and not showing when I run the game and in editor, I don't know what's happening, I've tried changing the z value but that doesn't work. Here is a video as I am…
-1
votes
1 answer

How to get lighting information on a 2D Sprite's front-side?

I'm using 2D Sprites for NPCs in a 3D game. My problem is when a sprite NPC turns away from the light source (eg. Directional Light) it becomes completely dark. So for almost 180 degrees when not facing the light source the sprite is all black. I…
Vern Rowan
  • 11
  • 3
-1
votes
1 answer

OpenGL: Lighting without shaders

How can I make phong lighting without using a shader (university task). Can I manually calculate ambient, diffuse, specular and transfer their sum to glColor? UPD: I have a good display of the sum from ambient and diffuse. But the specular doesn't…
-1
votes
1 answer

Two sides of unity object are black

I'm new to unity and I started with something simple but all of my objects are black from the side where light doesn't shine. I googled but other people have older unity version and mine is 2019.3.7f1 and I can't find ambient light settings like…
-1
votes
1 answer

3D Lighting (OpenGl)

Hello I want to create a nice 3D scene to show some 3D models. How I should manage the lighting to made models appear quite 3D! Some thing like Solidworks! How many light source I need? Directional or position? Where? What kind of material for…
mrbm
  • 1,022
  • 1
  • 11
  • 36
-1
votes
2 answers

How to enable different GL_POSITION of two objects

I want to create two objects with different light position. But the light position of second object (Gold sphere) is always the same as the first object (Silver sphere) even I have set different position parameter. I have enable both light one…
Pirun Seng
  • 373
  • 2
  • 14
-1
votes
1 answer

Kivy FBO access Z Buffer

When creating an fbo in kivy, it accepts "with_depthbuffer" as an argument. In the documentation, it says that this will cause the fbo to be allocated with a z buffer. I would like to try using this for lighting effects. My question is, where can I…
Ivan Hoffmann
  • 129
  • 1
  • 7
-1
votes
1 answer

How do I use the Phong Shader in WebGL?

I am trying to illuminate a lighting to a earth based scene using Phong shading. I am currently using Gouraud shading, which doesn't result in the realism of the sphere as intended. In addition to this I am displayed with a highlight which happens…
HeadsR'Us
  • 1
  • 4
-1
votes
1 answer

Lighting not working in opengl

I am having trouble getting the lighting to work on just the decline portion of my ground. Below is my code for the ground and the decline (making it a ditch): static void ground(double x, double y, double z, double dx, double dy, double dz){ …
Ryan Fasching
  • 379
  • 1
  • 6
  • 21
-1
votes
1 answer

Why are my lighting calculations wrong?

I'm using the Blinn-Phong algorithm to calculate the lighting in a scene, and I'm not factoring in distance yet. I've also disabled my HDR and Specular calculations until I get this first issue fixed. I'm somewhere on the order of 95% sure that it's…
Xirema
  • 18,577
  • 4
  • 26
  • 60
-1
votes
2 answers

How to improve performance for lighting calculations in a phong lighting model

I've successfully implemented a phong lighting model doing all the lighting calculations in a fragment shader - it looks smooth, but that's causes some performance issues if having a lot of objects in a scene. One solution is to do all the…
ampawd
  • 853
  • 6
  • 20
-1
votes
1 answer

Simulating lighting function of fixed pipeline, which role plays the material emission?

So, I am trying to port this sample to jogl. Kind of ironic because he is using compute shaders with deprecated opengl, but anyway, I'd like to emulate that. He sets light: ambient diffuse specular cut-off…
elect
  • 5,677
  • 9
  • 44
  • 97
-1
votes
1 answer

Spotlight issue OpenGL

I have a problem with spotlight in OpenGL library. A scene is black, light is unseen if the GL_SPOT_CUTOFF is less than 125. I supposed that issue concerns direction of the light source but I have tried plenty of options both for position and…
james
  • 1
  • 3
-1
votes
2 answers

Why is my floor polygon not affected by specular and diffuse light?

I'm trying to light a scene with a few simple objects. I have two lights, one spot light and one point light and the lighting seems to work fine on the objects in the scene, but when it comes to the textured floor its only affected by ambient and I…
Amit Ofer
  • 271
  • 1
  • 5
  • 25
1 2 3
47
48