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).

812 questions
3
votes
1 answer

OpenGL Lighting Quads

just a quick question. I have a quad in 3D OpenGL scene. I define a normal to the plane counter clockwise. So that the normal points out one side of the plane. In the direction of my light source. The quad is light but on both sides. Should it not…
Ciarán
  • 773
  • 2
  • 7
  • 20
3
votes
1 answer

ThreeJS FBO Particle Lighting and Shadows

Update: I decided to implement a simple lighting solution from this link, http://blog.edankwan.com/post/three-js-advanced-tips-shadow, suggested by ScieCode. It's the first part of the linked page. The result can be seen in the picture at the…
M1ke
  • 239
  • 2
  • 11
3
votes
1 answer

How to smoothly transition between colors in python?

I'm continuously storing outputs in a CSV file. I'm able to read this data and trigger a change in lighting with the code below. The transition in lighting is sudden but, ideally, I'd like to attempt a smooth transition from one color to another in…
3
votes
1 answer

Lighting in Unity2D looking different on phone than in editor

I am working on a little mobile game in Unity in 2D. I want the player to be a light source and everything else to be dark, so I gave "everything else" the sprites/diffuse material. This works extremely well in the editor/Game view in Unity, but…
Ricardo Frederiks
  • 127
  • 1
  • 3
  • 13
3
votes
2 answers

Unity baked lighting blotchy and cubic

I've set every object in my scene to 'static' and the bake runs automatically, but the result is unusable: blotchy, blurred cubic lighting... Here are my lighting settings: What am I doing wrong? I've tried changing the atlas size, the 'scale in…
moosefetcher
  • 1,841
  • 2
  • 23
  • 39
3
votes
1 answer

How to make natural lighting in ARKit?

I want lighting of added projects in my ARKit project to be similar to real-world objects. Please explain how to achieve this? Thank you
Lavrin Pristazh
  • 132
  • 2
  • 11
3
votes
1 answer

How I can change lightmaps at runtime in unity?

How to change the backed light maps for different layouts ? Here I am using two architecture models Each architecture models has different objects when try to switch the layouts the light maps are not get changing so how to change the light maps…
Chuva
  • 57
  • 2
  • 10
3
votes
0 answers

Lighting in 3D matplotlib scatterplot

I have a point cloud that looks like ...a cloud. It has bulging features in some places, and "creases" in other places. To illustrate my issue, I've attached a sample image below (the script used to create the first point cloud is at the…
AaronJPung
  • 1,105
  • 1
  • 19
  • 35
3
votes
0 answers

Gamma function in shaders

Using spherical harmonics for lighting I faced a problem for a big enough bandwidths. The correctness of an approximation by first n^2 terms became worse and worse starting from n=7. I look into associated Legendre polynomials definition and found…
Tomilov Anatoliy
  • 15,657
  • 10
  • 64
  • 169
3
votes
1 answer

OpenGL: Lighting Inside of Cube

I am creating a scene where I use a box to represent a room and different models within that box. When I enable lighting, my models light up fine but the room itself (the inside of the box) does not light up, or rather it is darker than it should…
sudo
  • 329
  • 7
  • 14
3
votes
1 answer

opengl 1D texture: fill with arbitrary float values

So, I'm struggling with 1D textures. What I'm trying to achieve is passing 3 float values to a fragment shader as a uniform. They represent a light's color, in an attempt to reuse the same shader for n lights, with all their info -color and…
Carlos Romero
  • 698
  • 8
  • 18
3
votes
2 answers

Open GL Lighting Problem

I've been working on a game engine for a month now, and I've finished the basic OpenGL stuff. However, the one thing that I can't get to work like I expect it to is the lighting. (Note: This is the first time I seriously worked with OpenGL) What I…
user434565
  • 909
  • 1
  • 10
  • 21
3
votes
0 answers

How to keep the default light while adding another?

When creating a 3D scene (or subscene) a default light is added: A default headlight will be added to a scene that contains one or more Shape3D nodes, but no light nodes. This light source is a Color.WHITE PointLight placed at the camera…
Mark
  • 2,167
  • 4
  • 32
  • 64
3
votes
2 answers

Useful lighting of a single-colored 3D object in a WPF Viewport3D

I have a 3D Modell of a house, where the roof is invisible so that the rooms can be seen (like here) But (for now) I have no textures and each surface has the same color, e.g., var myMaterial = new DiffuseMaterial (new SolidColorBrush(myColor)) If…
Janko R
  • 137
  • 1
  • 9
3
votes
1 answer

GLSL lighting- Attenuation based on a light radius

So ive been working on lighting, and for the purpose of shadow mapping i did light attenuation based on radius instead of the three attenuation factors (Constant, Linear and quadratic) and, well... It doesn't look very nice near the…
James Pae
  • 51
  • 6