Skip to main content
Filter by
Sorted by
Tagged with
1 vote
0 answers
52 views

I'm trying to render two spheres in Three.js with custom Phong shading using GLSL shaders. I want the right sphere to have a high specular highlight, similar to the one in this reference image, where ...
peachi's user avatar
  • 21
0 votes
1 answer
71 views

I've added a "table" to my scene using Drake's MultiBodyPlant. plant.RegisterVisualGeometry( plant.world_body(), RigidTransform(p=table_position), table, "TableVisualGeometry&...
Mark's user avatar
  • 5,543
1 vote
1 answer
99 views

I implemented lighting in my engine. But there is some problem the object does not lights up properly The specular lighting does not work at all Here is the vertex shader : #version 330 layout (...
Ajinkya Sanas's user avatar
1 vote
1 answer
509 views

Recently, I implemented the PBR lighting following the LearnOpenGL tutorial. But I found that the light color the tutorial use is very large (e.g. 20~300, https://learnopengl.com/PBR/Lighting), which ...
tigertang's user avatar
  • 477
1 vote
0 answers
195 views

Recently, I tried to implement Phong shading with only NumPy and PIL using python. But there is some black-and-white noise in the rendered image. Can you point out what I should do to improve my code ...
George yang's user avatar
2 votes
1 answer
665 views

I wrote a simple demo-program that applies directional lighting to a scene. Right now I'm getting this image: The problem is that I can't figure out how can I set object's material reflection ...
Temax's user avatar
  • 97
0 votes
1 answer
173 views

First incorrect result Hello guys, I've been studying OpenGL on learnopengl.com and I found the result weird when I finished learning the basic lighting chapter. The result is I found specular light ...
RiverFlows's user avatar
0 votes
0 answers
150 views

Let's say we have a black and white Shader on a sphere. Is it possible to use it as an alphaMap on a MeshPhongMaterial for another sphere? Can we use a ShaderMaterial as an alphaMap of a ...
VΛVΛV's user avatar
  • 93
0 votes
1 answer
694 views

I have a project that basically displays 3 cubes and if i press A i alternate the material of the cubes between a MeshLambertMaterial and a MeshPhongMaterial. The problem is whenever i create the ...
Martimc.'s user avatar
0 votes
1 answer
736 views

I am loading a BM3 file which contains definitions of (geometry and) material information as below: { type: "Phong", opacity: 1, name: "", diffuseMap: 0, color: [ 0....
ali's user avatar
  • 579
1 vote
0 answers
959 views

Recently, I have been trying to add lighting to a simple OpenGL scene using the Blinn-Phong shading model as described in this website. I tried to follow the tutorial as closely as possible. However, ...
doix's user avatar
  • 11
0 votes
1 answer
368 views

I am writing a raytracer and shading using the Phong illumination model. In this example, my material does not have any ambient term. When I render, I get the following image: As you can see, there ...
Paul Hübner's user avatar
0 votes
1 answer
607 views

The Phong shading technique interpolates normals at vertices to achieve a smooth shading effect. It is usually combined with the Phong illumination model, and it can be implemented in modern OpenGL. ...
Aldan Creo's user avatar
1 vote
1 answer
3k views

I need your help. Using python, I have to implement the lighting of my three-dimensional shape by the phong model. My figure is a deltoidal icositetrahedron. I was able to build this shape, found the ...
YURIY USYNIN's user avatar
-1 votes
1 answer
108 views

I know that specular lighting is also based on the view direction. But I can't find what the default view direction is in old OpenGL function glLight(.. GL_SPECULAR..). How does it determine the ...
user avatar
6 votes
1 answer
15k views

As I understand it, Gouraud shading calculates light color for each vertex and does interpolation on that color, whereas Phong shading interpolates the normal for each pixel and calculates light color ...
v4vendeta's user avatar
1 vote
0 answers
567 views

I am writing a ray tracer, so far with only spheres, in C++ and after implementing Phong's reflection model, shadows and reflections, everything seemed to work fine. When I implemented refractions and ...
Rasmus H's user avatar
0 votes
1 answer
1k views

How can I make phong lighting without using a shader (university task). Can I manually calculate ambient, diffuse, specular and transfer their sum to glColor? UPD: I have a good display of the sum ...
Stepan_Radchenko's user avatar
1 vote
0 answers
491 views

Point light specular reflections in phong shading displayed incorrectly, assume some shader issues? Specular highlights displayed rotated and skewed to the center of the render target Done it before ...
yuris89's user avatar
  • 63
4 votes
1 answer
2k views

There seems to be an odd problem with my Phong lighting shader in OpenGL. The specular highlight appears on the wrong side of the object. The problem at hand: As you can see, the specular highlight ...
Christoffer's user avatar
1 vote
0 answers
166 views

I want to create a PhongMaterial with a uniform glow. The effect is, I have a small Earth model and I would like to surround it with a cheap imitation of the aurora. https://i1.wp.com/trendintech.com/...
Frank Harris's user avatar
1 vote
1 answer
651 views

I've been trying to produce a glossy shading using the Phong model but for some reason instead of glossy appearance, all I get is big white blotch on the front of the sphere. Initially the model ...
JerSci's user avatar
  • 197
7 votes
3 answers
863 views

I'm trying to make a cube, which is irregularly triangulated, but virtually coplanar, shade correctly. Here is the current result I have: With wireframe: Normals calculated in my program: Normals ...
Alexandre Severino's user avatar
6 votes
1 answer
315 views

I'm trying to understand the Cook-Torrance Microfacet Model and am currently stuck on the Normal Distribution function D (being either Beckmann, Blinn-Phong or GGX). Several online resources claim ...
Clutterhead's user avatar
1 vote
0 answers
889 views

I'm writing a simple ray-tracer with lighting using Phong illumination model. But the problem is that there's part of the sphere display a whole different color. For example, the sphere should be only ...
dcvdk's user avatar
  • 11
2 votes
2 answers
690 views

I'm trying to implement the Phong shading model, but I come across something quite strange. When I change the viewing position, it looks like the light behaves differently, as if it was dependent from ...
memememe's user avatar
  • 713
1 vote
0 answers
4k views

I'm studying the Phong shading model and it looks like materials have these properties: Ambient, diffuse and specular coefficients (which show how they react to those properties of a light) Shininess ...
memememe's user avatar
  • 713
0 votes
0 answers
260 views

I'm using a scene graph for my scene. It contains lights and meshes. Meshes have local transforms, and if a node is the child of a mesh node, its own local transform gets composed with the transform ...
The Coding Wombat's user avatar
3 votes
2 answers
907 views

I am currently experimenting different artifacts when implementing phong shading on my ray-tracer. The first case case happens when I implement the specular lighting calculation the way I suppose to ...
user2752471's user avatar
0 votes
2 answers
1k views

I am having some trouble with my Phong shading algorithm. It seems like the normals are off and I always get a flat shaded surface. I am implementing deferred rendering, so in my geometry pass I ...
Miso_Soup's user avatar
0 votes
0 answers
66 views

In the 8th pack of slides of the Angel Shreiner book "Interactive Computer Graphics" (slides available here) the suggested code for calculating lighting starts like this: vec3 pos = -(...
memememe's user avatar
  • 713
0 votes
1 answer
882 views

I implemented phong shading on my raytracer. Unfortunatelly I am receiving a segmentation fault when running it. The likely cause is related to the "specular_color" Vec3f variable (with is an object ...
user2752471's user avatar
0 votes
0 answers
260 views

I am implementing a specular highlight in OpenGL as part of the phong model. Currently, the highlight moves when my camera moves rather that getting brighter or dimmer which obviously isn't the ...
Callum Perks's user avatar
3 votes
1 answer
2k views

I am trying to implement blinn-phong shading in numpy for educational purposes. However I am stuck at debugging what parameters are doing for several days now. My general idea was the following. ...
Kaan E.'s user avatar
  • 515
0 votes
1 answer
563 views

I am trying to implement the Phong shading model and I am unsure of how to pick a light source. More specifically, I do not understand what the light source should look like. Should it be a vec3? Or ...
ffblord's user avatar
  • 413
3 votes
1 answer
1k views

I'm working on a project in Unity that uses AR to place products in the real world. These products (geometry & material) are downloaded from a http server and converted into a gameobject in Unity. ...
Tostifrosti's user avatar
0 votes
1 answer
491 views

I'm having trouble with the Phong Model specifically the diffuse component and using the right normal vector and direction to light vector. The best I do was get half of the larger sphere to shade but ...
J Rat's user avatar
  • 9
2 votes
1 answer
1k views

Before this is tagged as a duplicate, I am having the exact same problem as the individual who asked this question. Unfortunately, it doesn't have an answer that helped at all, so hopefully this will ...
assistantToTheRegionalMngr's user avatar
1 vote
1 answer
654 views

I wrote a Phong shader for WebGL. My Scene supports camera rotation using Euler Angles. The light should be fixed in the scene. As soon as I rotate the camera the specular effects on objects move as ...
SuperTasche's user avatar
4 votes
0 answers
938 views

I am writing a Blinn Phong (LearnOpenGL tutorial) lighting and trying to get gamma corrected colors as final result. Before i start digging about gamma correction, my lighting looks like this: Then i ...
yuris89's user avatar
  • 63
2 votes
1 answer
2k views

Using Triangle_Strips and heightmaps I made a mountainous terrain, and used 3D planar projection for texturing. For 3D planar projection, I followed section 1.5 of the following link. https://...
Peter's user avatar
  • 508
1 vote
1 answer
181 views

I would like to render by using phong shading. I use OpenGl ES 3.0 and I implemented gouraud shading and it worked. But when I render objects by using phong shading, it didn't work. I think there are ...
alryosha's user avatar
  • 753
4 votes
0 answers
245 views

My goal is to reproduce a gif in JavaFX. Everything is great, except for when changing so many box heights at once, it slows the machine down. I have decided to remedy this by scaling by the y axis ...
Michael Coppola's user avatar
0 votes
0 answers
247 views

I'd like to render object to see the inside of the box. I used Phong Shading. When I draw object with glPolygonMode(GL_FRONT_AND_BACK, GL_LINE), an image looks like this: But When I used ...
alryosha's user avatar
  • 753
0 votes
1 answer
634 views

I'm trying to implement a simple Phong shader that supports non-physically-based materials and textures. Even though the material has a texture for each light component I still want the respective ...
Daniel Marques's user avatar
1 vote
0 answers
75 views

i.e., MeshPhongMaterial, MeshStandardMaterial. These materials now render as black. Examples: https://threejs.org/examples/#webgl_animation_skinning_blending https://threejs.org/examples/#...
Chris R's user avatar
  • 11
2 votes
2 answers
2k views

I am trying to implement Phong lighting. In some tutorials specular lighting is added to ambient and diffuse lighting and then total lighting is multiplied by texture color. I also saw a tutorial ...
Saik's user avatar
  • 1,093
0 votes
0 answers
127 views

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 ...
Ditscheridou's user avatar
0 votes
1 answer
812 views

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 ...
Phil's user avatar
  • 3
3 votes
1 answer
3k views

I am making a dungeon crawler type game using three.js. I was using MeshBasicMaterial to make everything "truebright" to make the dungeon consistently visible throughout. However, I wanted to add "...
Kerma's user avatar
  • 79