Questions tagged [phong]

Phong shading is a 3D lighting model and interpolation method used in OpenGL and other 3D APIs.

Phong shading is an interpolation technique.
Phong reflection model s an empirical model of the local illumination of points on a surface.

101 questions
0
votes
0 answers

Phong lightning model illuminate corners

I am trying to implement the phong lightning model in this cpp framework. The Diffusion works fine but the specular seems to lightning the sphere corners...im not really sure why, because the formular seems to be correct. Has someone an idea?…
Ditscheridou
  • 381
  • 1
  • 5
  • 18
0
votes
1 answer

Change values of Phong Shader with sliders

I am trying to implement a 3D scene with WebGL and Javascript. The final scene is supposed to show a cuboid with smaller cuboids, pyramids and spheres on all sides. The smaller spheres have to rotate with the big cuboid. I implemented Phong Shading,…
Phil
  • 3
  • 3
0
votes
1 answer

Phong illumination produces black

I guess I am somehow stuck with a basic question where I just don't get the correct answer. The Phong illumination model contains an ambient, diffuse and specular part. Each part contains a multiplication of the color of light (ambient or source)…
Allwo
  • 225
  • 2
  • 10
0
votes
1 answer

Color of Material in Phong Shading Illumination Model

I'm implementing an illumination model using as reference Phong formulation. It's not quite clear for me yet how to appropriately make possible to render material in different colors. I'm not using textures. The basic equations that I'm using for…
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
1 answer

Blinn-Phong shading with HLSL and D3D11: point light

I am currently trying to implement point lights in my game using Blinn-Phong shading in HLSL. The tutorial I followed is linked here. The code I have now is: struct VS_INPUT { float4 Position : POSITION; float3 Normal : NORMAL; float2…
featherless biped
  • 163
  • 1
  • 5
  • 16
0
votes
1 answer

Errors on phong shading (over texture) implementation in my shaders

I am trying to learn webGL, tried to implemement phong shading following this sample code on the link http://voxelent.com/html/beginners-guide/chapter_3/ch3_Sphere_Phong.html I get two errors on shader compilation, and consequently there is no moon…
struggling
  • 535
  • 1
  • 10
  • 25
0
votes
1 answer

Ambient and Specular lighting not working correctly in GLSL

In my lighting scene, for some reason the ambient lighting isn't working at all. The whole model is the same brightness, no matter which way it is facing. I tried getting rid of the attenuation but it still has the same results. Along with that, the…
andrew3ds
  • 53
  • 1
  • 2
  • 6
0
votes
0 answers

Phong implementation seems dark and also specular not working. Ray tracing

Below is my phong implementation method where I am drawing a sphere. Its parameters are vec3 sphere normal (which is my vec3 hitpoint - vec3 sphereOrigin) and the camera position vec3 (0,0,-5). Using couts I find that the dot product in my…
john stamos
  • 1,054
  • 5
  • 17
  • 36
0
votes
0 answers

OpenGL shader implementing Phong model on voxel image

I have a 3D image just defined by its voxels. This image is a grey-scale image. I need to render it in false colors. The idea is to write shader implementing something like the Phong model. On Internet I found different shaders. But all of them use…
user1235648
0
votes
1 answer

Can I set the ambient property of a MeshPhongMaterial to false in a three.js imported Blender model?

I'm doing a student project and I have a scene with an ambient light and a spotlight. I've imported a Blender model which has the line: "colorAmbient" : [0.6400000190734865, 0.6400000190734865, 0.6400000190734865], in the JSON file. Is there any…
KayM
  • 318
  • 1
  • 2
  • 12
0
votes
1 answer

Bug in WebGl Phong shader

I'm working on a simple phong shader in webgl, and I think I'm getting close but something is still wrong. Dead give away: if I have a billboard and have it roll (so it spins like a wheel), the part of the billboard that is lit up spins with it :(. …
Nick
  • 220
  • 1
  • 2
  • 12
0
votes
1 answer

Understanding small-scale Gouraud Shading with an example

I am in a computer graphics course and have just passed the lecture on Phong and Gouraud shading. I didn't really understand what was being said, so I turned to the textbook for clarification and found a workable example that might help me out. I'd…
0
votes
2 answers

Phong Lighting in Vertex Shader

I'm trying to use OpenGL ES 2.0 for Android to display a simple cube with normals and colors. To do so, I create a shader program, attach my vertex and fragment shaders, and link my program, as follows: // Create empty OpenGL ES Program mProgram =…
Luke
  • 2,187
  • 1
  • 18
  • 29
0
votes
0 answers

Shadow with Phong's lighting model

I am looking for a description of how shadow should be represented in the Phong lighting model. You can take a look at Phong shading here: http://en.wikipedia.org/wiki/Phong_shading I think quite some people are, maybe unknowingly, familiar with…
skiwi
  • 66,971
  • 31
  • 131
  • 216