Questions tagged [shading]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
389 views

What is the algorithm used for phong shading normal interpolation?

Let's suppose we have an object consisting of only 3d points, and triangle faces that each take a subset of these 3d points. How can I interpolate the normal vectors to get that Phong smooth shading? ...
0
votes
1answer
49 views

Phong model: why no multiplication by N dot L in specular term?

Classical Phong reflection model, as described on wikipedia, computes diffuse and specular light as follows: ...
2
votes
1answer
254 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 coordinates (...
4
votes
2answers
663 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: ...
0
votes
1answer
25 views

OpenGL Render front and back faces with different shading for 3d modeller

I'm working on a simple 3d modeller and I would like to render the back facing triangles a bit darker, to easier differentiate between front and back faces. Like you can see in most modelling ...
1
vote
1answer
35 views

Do we have OpenGL shaders write out the intermediate *.o-esque file on first compile so that we can skip compiling them in run-time every single time?

Shaders get compiled during runtime every single time an app starts. I understand the reasoning for this is that there are so many GPU architectures out there that it does not make sense to ship pre-...
0
votes
0answers
48 views

How to read illum value from mtl file using Assimp library?

I am loading an OBJ file using the ASSIMP library. Following is the MTL file associated with the obj file. ...
2
votes
1answer
55 views

Point light illuminating only half of a scene

A point light is illuminating only a half of a scene in my small 3D renderer. It happens on every scene I've tried (conference room, cornell box, etc). How do I go about debugging this? What could ...
0
votes
0answers
79 views

Compute normal based on Voronoi pattern

I am applying a 3D Voronoi pattern on a mesh. Using those loops, I am able to compute the cell position, an id and the distance. But I would like to compute a normal based on the generated pattern. ...
3
votes
0answers
102 views

Irradiance field approximation with black probes

I'm posting here after some time searching the Internet and reading presentations and papers, to find out the best options to solve the problem I have. I'm implementing irradiance field with ...
0
votes
1answer
223 views

Difference betwen Rendering Equation, Lighting model, Ray Tracing, Global Illumination and Shadows?

What is the difference between all these techniques? I know what a lightning model does, eg Phong, Flat, Gouraud. As far as I know both Ray Tracing and Global Illumination are just lighting models ...
3
votes
1answer
70 views

What's the justification of multiplying colors together?

In Phong shading model (and other shading models as well), the light color is multiplied together with the surface color component-wise. I want to know the justification for this. Is this some what ...
0
votes
0answers
547 views

Color shading and light calculation for ray tracing

I am currently building a ray tracer and I came across a problem and confusion regarding the light calculations. For lighting, I am using the following mathematical model: Where ...
4
votes
1answer
77 views

How to approximate the heightmap of processed wood?

In the above image, you can see that there is some slight variation of the height of each wood plank. These variations do NOT come from the wood texture itself, but from the way it was cut, i.e if a ...
1
vote
2answers
286 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 ...
2
votes
2answers
899 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 ...
5
votes
0answers
161 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
217 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 ...
3
votes
1answer
717 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 ...
3
votes
1answer
209 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: ...
5
votes
1answer
154 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 ...
0
votes
1answer
168 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?
1
vote
1answer
358 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
1k 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
304 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
66 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 ...
3
votes
1answer
422 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 ...
3
votes
1answer
359 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 ...
1
vote
0answers
255 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.
4
votes
1answer
1k 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
1answer
492 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
79 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 ...
6
votes
1answer
1k 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
2answers
226 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. ...
2
votes
1answer
84 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
0answers
65 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
70 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 ...
6
votes
1answer
1k 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 ...
41
votes
4answers
25k 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 "...
1
vote
1answer
613 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
213 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
533 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
440 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
166 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 ?
16
votes
3answers
8k 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 ...
11
votes
1answer
10k 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 ...
1
vote
1answer
78 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
2k 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
282 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 ...
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 ...