Questions tagged [light]

Questions related to drawing or setting light on an object, for use in GUI, or programming questions on controlling light values within a program e.g. controlling light within a program that uses a camera. Not to be used with light, as is used in physics having wave and particle characteristics. Must be used with other relevant tags distinguishing the programming language and framework being used. e.g. unity 3d

Questions related to drawing or setting light on an object, or programming questions on controlling light values within a program e.g. controlling light within a program that uses a camera.

Not to be used with light, as is used in physics having wave and particle characteristics.

The use of the light tag here is as light is exposed within a graphical user interface and how to alter the settings and angles of the light. e.g. unity3d

For use of programming in e.g. Android where a program may be written that utilizes the camera and programming filters affecting the selection of light through the camera.

648 questions
22
votes
3 answers

What is a normal in OpenGL?

I heard that I should use normals instead of colors, because colors are deprecated. (Is that true?) Normals have something to do with the reflection of light, but I can't find a clear and intuitive explanation. What is a normal?
mk.
  • 11,360
  • 6
  • 40
  • 54
15
votes
2 answers

Can you add a light source in blender using python

Alright, I'm totally new to Blender and am just looking for some good tutorials on how to use python to control it. I want to be able to add/remove/edit light sources via python methods... can this be done? Thanks for any advice.
innov83r
  • 443
  • 1
  • 4
  • 12
14
votes
2 answers

Accessing the ambient light sensor in iOS

I'm working on a project in which it is really necessary to access the ambient light sensor. I searched a lot in Google and Stackoverflow, but couldn't find any useful information. Is it even possible to do so? I also tried to calculate the ambient…
Lukas
  • 1,346
  • 7
  • 24
  • 49
13
votes
3 answers

Three.js - sphere that glows

I have a problem. I want to make a sphere which works like a source of light (sun). I found out that meshPhongMaterial has an option like emissive: color and shininess: intensity but I did not manage to code the sun. Does anyone know how to do it?…
karlosss
  • 2,816
  • 7
  • 26
  • 42
13
votes
2 answers

Measuring Light Intensities from Android Camera

So I want to know how you would measure different light intensities when a finger is pressed on the android device's camera with flash on. I have read throughout the internet about exposure, light sensors, etc., but I don't know where to start off…
Navio53
  • 591
  • 1
  • 6
  • 20
11
votes
3 answers

CSS "realistic" shadows (light source)

Have a look at the picture below: The blue boxes are divs. Now what I am trying to do is to implement a sort of 2.5D functionality: I would like the grey shadows to be somewhat 3D-ish. At first I was thinking to assign to the box-shadow value the…
user1130217
9
votes
3 answers

Enable Disable save button during Validation using IDataErrorInfo

How to disable/enable a button while doing validation using IDataErrorInfo? I am using MVVM using GalaSoft light Framework. In my Model class I have implemented IDataErrorInfo to display the error messages. public string this[string columnName] { …
Tarun
  • 221
  • 1
  • 6
  • 14
9
votes
3 answers

Unity - 2D shader / lighting like Terraria or Starbound

I have a map with a lot of sprites. I could add a material to the sprite with diffuse shading and than add lots of lights. But that won't give me the result I want. And is performance heavy. Examples In the first image you can see that light is…
Derk Jan Speelman
  • 11,291
  • 4
  • 29
  • 45
7
votes
2 answers

Normal map lighting is different depending on the direction

I am trying to use a normal map instead of the vertex normals and I can't figure out which step I'm doing wrong. I want to transform the light direction into tangent space and do the calculation from there. First, I transform the vector normals and…
Sogomn
  • 304
  • 3
  • 16
7
votes
1 answer

Why is my Monte Carlo Raytracing so noisy?

I have implemented global illumination using the Monte Carlo method, using the scratch a pixel tutorial as a guide. My final image renders very noisy! The example below is at 64 samples, I have previously used as high as 512 and its still very…
Arthur
  • 347
  • 1
  • 4
  • 14
7
votes
1 answer

OpenGL stencil buffer OR operation?

I'm not sure if this is possible to do, but it's worth a shot. I'm using the stencil buffer to reduce overdraw for light volumes in a deferred renderer using this algorithm (when the camera is outside the volume): Using a cheap shader, draw back…
Gumgo
  • 526
  • 4
  • 16
7
votes
1 answer

Calculate expected color temperature of daylight

I have a location (latitude/longitude) and a timestamp (year/month/day/hour/minute). Assuming clear skies, is there an algorithm to loosely estimate the color temperature of sunlight at that time and place? If I know what the weather was at that…
Dean J
  • 39,360
  • 16
  • 67
  • 93
7
votes
1 answer

how can I set the size of a directional light in Three.JS?

I've added a directional light to my scene, but it doesn't show all the shadow. The shadow gets cut off, just like when the FOV of a spotlight is too small. When I enable the shadowCameraVisible, i see that my light is like a big box which shows the…
Giel Berkers
  • 2,852
  • 3
  • 39
  • 58
6
votes
1 answer

how to find out screen status on an android device?

Is there any way to find out that the android device screen is on or not without broadcast receivers? I want to make minute interval updates on device via service that is invoked by alarm manager. I also want to preserve battery life. So the update…
mozer
  • 319
  • 5
  • 13
6
votes
1 answer

Object in loop won't cast shadow over whole lopop with Three.js

Why is not every cube in my loop casting a shadow? I work with a directional light all of the cubes should cast shadows. But for some reason, it stops after 5 or so columns. let dirLight = new THREE.DirectionalLight(0xFFFFFF,…
Marthy_Mc_Fly
  • 93
  • 1
  • 7
1
2 3
43 44