Questions tagged [specular]

44 questions
0
votes
1 answer

How to handle lightning (ambient, diffuse, specular) for point spheres in openGL

Initial situation I want to visualize simulation data in openGL. My data consists of particle positions (x, y, z) where each particle has some properties (like density, temperature, ...) which will be used for coloring. Those (SPH) particles (100k…
Matt
  • 435
  • 4
  • 17
0
votes
1 answer

Phong - Half Vector Specular both sides

When implementing PhongModel shading. The Specular term appears on both sides of the geometry. The specular term is being computed using the Half Vector. In the front output image it seems that it's computed correctly. The light is behind the camera…
Eder
  • 78
  • 8
0
votes
0 answers

Three.js Completely transparent material with specular map fully visible

I need to render a food tray with meat inside to showcase some packaging designs for a client. I am stuck at the material for the plastic film which encloses the tray's contents. I was planning to use a specular map or a normal map to obtain the…
Adrian Moisa
  • 3,923
  • 7
  • 41
  • 66
0
votes
2 answers

How do I send information to an HLSL effect in DirectX 10?

I'd like to send my view vector to an ID3D10Effect variable in order to calculate specular lighting. How do I send a vector or even just scalar values to the HLSL from the running DirectX program? I want to do something like render() { //do…
pypmannetjies
  • 25,734
  • 7
  • 39
  • 49
0
votes
1 answer

Trouble with Specular Lighting in OpenGL

I'm having some issues with my specular lighting, I have ambient and diffuse but I am now looking at specular to try make a nice looking model. I have the following in my vertexShader: #version 330 layout (location = 0) in vec3 Position; layout…
user2757842
  • 651
  • 1
  • 11
  • 24
0
votes
2 answers

Specular highlights depend on camera distance

I just tried implementing specular highlights. The issue is that when moving far away from the surface, the highlight becomes stronger and stronger and the edge of the highlight becomes very harsh. When moving too near to the surface, the highlight…
danijar
  • 32,406
  • 45
  • 166
  • 297
0
votes
0 answers

Does specular light takes point or direction?

Does specular ligh takes a point or direction as light? If direction, theb should it be calculated such as LightPosition - VertexPosition ? Or just as manualy specified LightDirection ?
tvoloshyn
  • 407
  • 8
  • 22
0
votes
0 answers

threejs specColor with alpha channel

i need to import some geometries in my scene with three.js and each one specifies an RGBA color and an RGBA specular color. In threejs there is a problem, because it seems that it handles just RGB colors, with an alpha property for the whole object.…
rastafermo
  • 408
  • 1
  • 5
  • 13
0
votes
1 answer

Specular Light appears on both sides

I have a very strange behaviour of specular(phong light model) light. It seems to be appering on both sides of all objects. Does anyone know what could be the issue ? The actual calculation seems to be alright, as I can see that the light changes…
tvoloshyn
  • 407
  • 8
  • 22
0
votes
1 answer

Logic of reflecting light for 3D specular reflections

I'm trying to add specular reflections to a Stage3D game and it is ALMOST working, but I don't think I have a good enough grasp of the maths happening at the actual reflection stage. I have an incoming light vector and I have the face normal; I know…
moosefetcher
  • 1,841
  • 2
  • 23
  • 39
0
votes
1 answer

opengl shader directional lights specular reflection increasing with distance

the title says it all.. using opengls built in lighting system, specularlight does not increase or decrease with distance from the object, but by shader implementation does. Vertex Shader: #version 330 layout (location = 0) in vec3…
Anthony Raimondo
  • 1,621
  • 2
  • 24
  • 40
0
votes
1 answer

opengl es 2.0 specular lighting

this is my very first post here but I'm banging my head against a wall trying to figure out this problem. The code below is my fragment shader for an incredibly simple Opengl es 2.0 app. The vertex shader is doing all the usual business. The…
0
votes
4 answers

Increasing specular shininess decreases lighting in OpenGL

I've got an issue with changing the specular power component in my opengl 4.3 shader. What happens is the specular is working fine when I use a shininess value of between 0-10, however, as the value is increased to make the material more shiny, the…
0
votes
1 answer

Removing lines with crossed info of columns from data frame comparing two colums

This is one of my particular nightmares when I'm trying to merge different gene expression results according with pair genes conditions, here is my merged data frame: knowngene1 Logfold1 Gene1 knowngene2 Logfold2 Gene2 uc001ezv.3…
user976991
  • 411
  • 1
  • 6
  • 17
1 2
3