Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [shading]

The tag has no usage guidance.

1
vote
2answers
272 views

How are colors really mixed?

I'm kind of stuck on this one. When following a conventional, high-level shading tutorial, you'll come across these images that are like ambient + diffuse + specular = result, but I can tell that it's ...
5
votes
0answers
108 views

Why is Forward Rendering/Shading named this way?

Forward rendering is the 'classic' approach to the rendering pipeline. Nowadays it is mostly replaced by a more flexible, deferred rendering approach. I did some research and had trouble finding ...
2
votes
2answers
167 views

Physically Based Shading for Diffuse surfaces

So I am currently in the process of implementing Physically based Shading in my pathtracer using microfacet models and I'm quite stuck at comprehending light interaction with diffuse surfaces. First ...
1
vote
1answer
152 views

How is lighting done in Rasterization based pipeline?

So I wanted to know how do Game Engines like Unity3D and Unreal do lighting. I'm familiar with Ray-tracing, pathtracing based renderers etc. But not much with rasterization based engines. I do know a ...
2
votes
2answers
143 views

3ds max: Z-fighting when working with Large Objects

I had a z-fighting/z-clipping issue with a scene containing some very large objects yesterday in 3ds max. It can be seen in the image below: For some reason downscaling the scene significantly (a ...
3
votes
1answer
119 views

Smooth shading on sphere approximation

In what way is a "cheat" when using smooth shading on a sphere approximation? I'm not understanding how it's a cheat to use smooth shading on this? Other questions that are lead after this may be: ...
1
vote
1answer
93 views

How are normals assigned to vertices in different types of shading?

I'm new to this forum and topic but wanted to figure out specifically how are normals assigned to vertices in flat shading, gouraud shading, and phong shading? Is there a difference between any?
6
votes
1answer
109 views

“Artist Friendly Metallic Fresnel” reversible?

While implementing the "Artist Friendly Metallic Fresnel" paper by Ole Gulbrandsen (http://jcgt.org/published/0003/04/03/paper.pdf), I read that it is fully reversible: (section 2.3.2): for all r,g ...
2
votes
1answer
140 views

Project vertex onto plane

What I have: a plane given by its normal$\ n $ and a point on the plane$\ p $. a 3D-point$\ v $. a direction$\ d$. What I need: the projection of$\ v$ along$\ d$ onto the plane. How can I ...
3
votes
1answer
243 views

How to compute normal of surface from implicit equation for ray-marching?

I want to represent ovaloids with ray-marching. I have ovaloids defined with an implicit equation. For instance, we can consider the equation of an ellipsoid given as: $$ \frac{x^2}{a^2} + \frac{y^2}...
6
votes
2answers
212 views

PBR missing rim darkening on non metallic rough surfaces

If you have a dielectric (non metallic) sphere with a large roughness value (say, 0.95), and put it in a lighting environment that has a constant onmidirectional lighting value (such as 0.5) Cook-...
1
vote
1answer
48 views

What does “region to be shaded” mean in the PCF paper?

I am reading the percentage closer filtering (PCF) paper by Reeves, W. et al. (https://graphics.pixar.com/library/ShadowMaps/paper.pdf). At at section 3.2, it mentioned that "each shading calculation ...
0
votes
0answers
14 views

Where on the .obj or .mtl files is the information needed to find the texture associated with a wavefront file?

I've downloaded the sponza scene, and I will use it to develop multi object rendeirng on my engine. I can load the mesh just fine. But the mesh is currently monochromatic (looks 3D thanks to blinn ...
1
vote
0answers
194 views

Fast phong shading [closed]

I do have theoretical knowledge on fast phong shading method. But don't know from where to start codding. Is there specific algorithm for that, which i can follow for my basics.
1
vote
1answer
295 views

How to use shadow mapping and deferred rendering to create a large amount of lights?

Ok so I am trying to understand how to combine these 2 techniques and I am failing. The main goal is to reach the O(lights+fragments) complexity of deferred rendering, instead of O(lights*fragments) ...
2
votes
0answers
77 views

How can you efficiently get the last element occluding light when rendering shadows?

A long time ago I made an application that used volumetric rendering and I developed some shadowing equations that I felt very happy with, since they have pretty good results. For these equations to ...
3
votes
2answers
169 views

Inconsistent shading in pathtraced image

I am currently building a pathtracer, which has support for vertex normals and face normals. There seems to be an issue when it comes to rendering objects with triangles exported from Blender. ...
3
votes
1answer
351 views

Combine material coefficients and textures in Phong Shading

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 ...
5
votes
1answer
617 views

Microfacet shading for diffuse materials

I recently replaced the Lambertian BRDF in my path-tracer with Oren-Nayar, under the assumption that I could adjust it to use the GGX distribution model with appropriate masking/shadowing. PBR ...
2
votes
1answer
75 views

Paper for the approximation formula provided by Brian Karis

In these slides, specifically page 11, the following formula is reported: $$ \frac{1}{N} \sum_{k=1}^N \frac{L_i(l_k)f(l_k,v)\cos(\theta_{l_k})}{p(l_k,v)} \approx \left( \frac{1}{N} \sum_{k=1}^N L_i(...
1
vote
1answer
137 views

Light coordinate in Phong shading and Normal interpolation

I'm currently making a small 3D renderer and I got stuck in Phong shading. My questions are: Into which space should the light coordinate be converted? I have my light position at world ...
4
votes
1answer
909 views

How to dynamically calculate texture coordinates in a vertex shader with OpenGL?

I modified my code, and tried to pass a set of integers specifying the face of a cube (top, bottom left...) to the vertex shader in order to draw multiple instances of a cube face. I did this by ...
1
vote
0answers
59 views

General interpolation practices

Say my animation scenario contains one mesh interpolating into another (possibly approximating over other meshes), using Bezier curves. I know that for smooth surfaces, where normals can be ...
2
votes
0answers
51 views

Interpolating normals during animation

I'm doing linear tweening of a cyllinder to a cone of equal radius and height in OpenGL. I know parametric equations of both of them, so I derived vertex normals accordingly. Now, I know, that proper ...
4
votes
1answer
673 views

What's the difference between geometric surface normal and shading surface normal?

In my opinion, geometric surface normal is the cross product of triangle edge vectors, and shading surface normal is the interpolation of the predefined normals at the three vertexes. I used Mitsuba ...
3
votes
1answer
307 views

Does smooth lighting work with Gouraud shading on single triangles?

I'm currently working on a project where a 3D model gets computed through an isosurface algorithm. This algorithm outputs single triangles with vertices and normals, but without indices. So therefore ...
4
votes
1answer
321 views

Phong: Real-time rendering of Metal and Plastic Materials

Using a shader that works like Phong, what would be the difference between painted Metal and plastic? I seem to remember reading in books years ago, that I no longer have access to, the following: ...
1
vote
1answer
398 views

Energy Conservation in Lighting Equation

I am currently making a Ray-tracer as a personal project. My lighting equation looks like this ...
1
vote
1answer
182 views

Specular exponent spectrum

I read the MTL specification for materials and noticed that the specular exponent Ns must be a scalar value instead of a spectrum. Would a specular exponent with three color channels (i.e. RGB, XYZ, .....
1
vote
1answer
386 views

How can i make my ray tracing algorithm fast in terms of intersection testing?

I am working on a ray tracer. But i want to put more than 10 objects in the scene. How can i make the intersection fast so that it can give me reasonable FPS. Its a cpu-based ray tracer.
6
votes
2answers
289 views

Sampling against geometry normals

I am writing a basic raytracer and have implemented normal maps. However, when using normal maps, sometimes the rays generated are opposite to the surface's geometry normal, so that the rays are ...
2
votes
2answers
141 views

Lambertian Shading of a cube

In theory I can't use a lambertian shader on a cube, because there aren't surface normals on the edges. Is this correct ? Why is this always possible in software applications ?
8
votes
1answer
5k views

Programmatically generating vertex normals

I'm working with Kinect face api, it provides an array of vertices and indices for triangles which is to be rendered to make the face image. The no of vertices and their order in array as well as the ...
15
votes
3answers
7k views

Physically based shading - ambient/indirect lighting

I implemented a physically based path tracer after studying PBRT by M. Pharr and G. Humphreys. Now I'm trying to apply physically based rendering to real time graphics using OpenGL ES (in an iPhone ...
1
vote
1answer
75 views

What does $E_L$ mean in the context of shading equations from the book “Real time rendering”?

We will use $E_L$ for irradiance perpendicular to $l$ Where $l$ is the light vector. What does this mean? How do I calculate $E_L$?
6
votes
2answers
1k views

What is the difference between shading and shadowing?

Shading and shadowing are often mentioned in how to create realistic 3D graphics, but the distinction is not clear. Are both responsible for the generation of shadows, or do they refer to the same ...
4
votes
3answers
240 views

Surface shading on an triangle

Let's assume that in a triangle we have computed the brightness on the vertices of a triangle and we have found that it is maximum. Can any other point which lies on that triangle have more ...
8
votes
2answers
349 views

What is ambient occlusion?

Ambient occlusion "is a shading and rendering technique used to calculate how exposed each point in a scene is to ambient lighting. Ambient lighting is regarding to What is ambient lighting?: ... ...
7
votes
1answer
11k views

Shading: Phong vs Gouraud vs Flat

How do they work and what are the differences between them? In what scenario should you use which one?
11
votes
2answers
2k views

How is screen space ambient occlusion implemented?

I do not understand the explanation from wikipedia. For every pixel on the screen, the pixel shader samples the depth values around the current pixel and tries to compute the amount of occlusion ...
11
votes
3answers
285 views

Is a Lambertian reflector illuminated by a smaller fraction of the incident radiation when it's tilted?

In reading about Lambertian reflectance on Wikipedia I found the following phrase (in bold) which doesn't sound right to me: In computer graphics, Lambertian reflection is often used as a model for ...
35
votes
4answers
18k views

Albedo vs Diffuse

Every time I think I understand the relationship between the two terms, I get more information that confuses me. I thought they were synonymous, but now I'm not sure. What is the difference between "...
15
votes
1answer
1k views

How does state of the art real time hair rendering work?

It is common knowledge that hair simulation and rendering is particularly challenging and in fact rare are the examples in games that propose believable hairs. It is pretty easy to imagine how hard it ...
9
votes
1answer
593 views

Trying to implement Microfacet BRDF but my result images are wrong

I am trying to implement microfacet BRDF model. I am reading Sebastien Lagarde's slides. I implemented formulas to my code but i think result image is wrong. Yellow is base color of material. ...