Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
1answer
31 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
90 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}...
0
votes
0answers
32 views

Problem with simple realtime SSS shader - Combining light depth map distance with traditional lighting models

The article Chapter 16. Real-Time Approximations to Subsurface Scattering explains on point 16.3 how you can simulate the absorption of translucent materials from a depth map created from a point ...
6
votes
2answers
156 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
45 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
9 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 ...
0
votes
0answers
53 views

Thickness on flat surfaces

Does anyone have good suggestion for how to achieve “thickness” on flat polygons at render time? It would be the same as extruding a flat polygon just slightly. For sprites with opacity masks, this ...
1
vote
0answers
106 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
81 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) ...
3
votes
0answers
75 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 ...
4
votes
2answers
138 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
226 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
405 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 ...
3
votes
1answer
69 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
95 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
527 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
54 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
45 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
472 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
243 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
222 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
293 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
161 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
261 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.
7
votes
2answers
180 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
124 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
3k 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 ...
14
votes
3answers
6k 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
68 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$?
7
votes
2answers
877 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
228 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
301 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?: ... ...
6
votes
1answer
8k 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
1k 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
267 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 ...
33
votes
4answers
14k 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
510 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. ...