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

Lighting for JavaFX pano viewer

I am currently trying to set up a panorama viewer in JavaFX using its 3D features. I think I got the geometry right (3D sub-scene, TriangleMesh, etc.) but I am fighting with the proper lighting. What I need is actually no lighting at all, just the…
mipa
  • 7,332
  • 2
  • 12
  • 29
-1
votes
1 answer

GLSL normal map lighting dark areas and light facing odd direction

I can't seem to figure out why my fragment and vertex shaders aren't working. I think I either have my view/perspective wrong, or maybe my normal map has negative values (since black is showing up lit). Either way, I've been at this for days and I…
justaguy
  • 11
  • 2
-1
votes
1 answer

Point light range in OpenGL

I using Python with OpenGL, but the lighting doesn't work correctly. There is one point light: glLightfv(GL_LIGHT1, GL_POSITION, (-26.5, -17.0, 17.0, 1.0)) glLightfv(GL_LIGHT1, GL_SPOT_DIRECTION, 0.0) glLightfv(GL_LIGHT1, GL_SPOT_CUTOFF,…
Joost Verbraeken
  • 803
  • 2
  • 15
  • 29
-1
votes
1 answer

drawing surface normals in opengl

I have drawn a house with a slanted roof in opengl. I am having problem in defining the normals for the slanted roofs.It wont be parallel to the axes so this is what I have…
-1
votes
2 answers

Some kind of edge lighting?

I'm playing around with lighting a cube. I'm not really sure what I want yet so I'm just throwing this out there. This is what I've got... ...but I don't like the sharp edges. Removing the lighting obviously means you can't see the edges any…
lloyd
  • 1
  • 3
-1
votes
1 answer

GL_POSITION does not work

I want to add a Light source to my OpenGl code. I have added following code to my init function... glEnable(GL_LIGHTING); glEnable(GL_LIGHT0); glLightf(GL_LIGHT0, GL_POSITION,(50.0,0.0,0.0,1.0)); Moreover I have drawn a…
-1
votes
1 answer

Bad lighting behaviour (fixed pipeline)

I'm trying to render an object (say cube) with OpenGL 1.1 (I know that doesn't makes sense nowadays, but I've to use this). Everything works fine until I try some lighting. Here's the problem: The Global variable set are: static GLfloat…
JTulip
  • 55
  • 6
-1
votes
1 answer

OpenGL - GLmaterialfv problems on multiple objects when lighting

Situation: I'm making a lighting example using OpenGL. My goal is that, there will be 20 random colored spheres, a cube and three light source as you see picture below. http://i.stack.imgur.com/b4uwu.png Problem: The cube you see above affected by…
Erdi İzgi
  • 1,082
  • 1
  • 14
  • 29
-2
votes
1 answer

why some triangles are becoming black after I add lighting?

I am trying to add specular lighting to my opengl es program which loads 3d model. Its working normally. But whenever I add lighting this happens: some triangles are becoming black and some are staying white. here is my Vertex and fragment shader…
DevSadik
  • 1
  • 1
-2
votes
1 answer

How avoid light rotating in OpenGL?

In OpenGL I created a simple cube that I rotate. I am rotating the cube, not the camera! Then I added a light source. The light also rotates with the cube. How can I avoid this? Can somebody tell me when to activate which matrix mode and when to…
-2
votes
1 answer

lighting openGL in c++

My code works correctly. I see a ground on the output screen. But I want to light the ground to seem 3-d. So I added some code and function in my code.But output didn't change. What can I do to light the ground? Thanks for answers... My code is…
-3
votes
1 answer

Python Pygame Lighting for Pong

Hey Guys Im writing a little Pong-Game in Pygame and wanted to use a glowing-effect on the Ball and the Bats. But Pygame dosen't support this effects and make solid block's out of it. Is there a way to handle that with lighting? thanks in advance
EnAmiX
  • 1
-3
votes
1 answer

Adding sunlight to a scene

I am rendering some interactive scene in 3D and I am wondering: How do I add sunlight to it? I'll try to explain the best how I have it setup now. What you see right now is that the directional light (the sun) is denoted by the yellow dot, which I…
skiwi
  • 59,273
  • 29
  • 118
  • 198
-3
votes
2 answers

Opengles: Every triangle in model is same brightness

There is very little contrast in my model. The model frankly looks like one big blob, despite its having a complex shape. I can really only see its silhouette shape. The only details that I can see inside of the shape are created by the spot light,…
Friendly
  • 233
  • 1
  • 7
1 2 3
47
48