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 [lighting]

The tag has no usage guidance.

2
votes
0answers
45 views

How to use Photometric Units with Rendering Equation?

So I was just reading up on how to create more Physically Based Lights and wandered into the realm of photometry. I read the paper "Moving FrostBite to PBR" and in it the author claims he decided to ...
1
vote
1answer
58 views

Specular/Diffuse light on an icosahedron opengl

I'm having a problem with my model here. I draw an icosahedron using GLUT, and the radius is set to 0.8. The info of the coordinates are listed below: (X and Z are calculated since our radius is 0.8) ...
3
votes
1answer
127 views

Iridescence/Thin-film interference integration as a layer

I'm trying to integrate the thin-film interference effect described in the paper "Belcour, L., & Barla, P. (2017). A practical extension to microfacet theory for the modeling of varying ...
2
votes
2answers
143 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
67 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
3answers
760 views

Why Diffuse Light use max(N · H, 0) instead of just letting it be negative?

In Cg tuts, Diffuse Section Surfaces that face away from the light will produce negative dot-product values, so the max(N · L, 0) in the equation ensures that these surfaces show no diffuse ...
1
vote
1answer
74 views

Ghosting in volumetric lighting

Does anyone know any method to remove ghosting in volumetric lighting? When light move it leaves trail behind, i would like to remove it. Volumetrics are Bart Wronski style (in frustum) with ...
0
votes
1answer
37 views

How does the Modified Phong Lighting Model from the Phong Lighting Model?

How does the Modified Phong lighting model also known as the Blinn-Phong differ from the Phong Lighting Model? How can I distinguish the two?
-2
votes
1answer
47 views

What are the 3 types of light reflection from surfaces in the Phong Lighting Model?

Can someone please explain what are the 3 types of light reflection from surfaces in the Phong Lighting Model? Maybe possibly using a diagram to help me understand it better?
11
votes
4answers
520 views

For shader math, why should linear RGB keep the gamut of sRGB?

sRGB is often contrasted with "linear RGB." Images are stored on disk and passed to displays in sRGB, which is approximately perceptually uniform in intensity. Shader math is done in linear RGB, ...
6
votes
2answers
176 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-...
3
votes
1answer
144 views

How to deal with light leaks?

I'm struggling with light leaking through meshes (especially thin ones) due to interpolation between probes located on the opposite sides of those. First approach I took was mapping all static ...
3
votes
4answers
153 views

How to access several textures from huge amount of textures in a shader?

I'm developing a light probe based GI solution and currently dealing with light leaks due to interpolation between probes located on opposite sides of the walls. I want to tackle the problem by ...
1
vote
1answer
45 views

Non-point lights

Is there a technique for implementing non-point lights (i.e. light that has actual physical dimensions)? I can't think of anything except than making a light source out of multiple point lights, but ...
2
votes
0answers
107 views

Not understanding the lighting equation for volumetric cloud rendering

I've been looking The Real-time Volumetric Cloudscapes of Horizon-Zero Dawn, but I'm very confused by a few terms. The presentation mentions "The Henyey-Greenstein phase function" on page 54, ...
2
votes
1answer
215 views

Radiosity normal map light baking

I'm trying to implement radiosity normal maps from the old Valve paper: Half-Life® 2 / Valve Source™ Shading.pdf | valvesoftware.com I've tried generating the light maps using Vray and 3dStudio max, ...
1
vote
1answer
87 views

Light Falloff through a grid

I'm playing with a grid-based lighting system, where light is transported and accumulated through a grid. I initially tried attenuation based on ...
1
vote
0answers
59 views

Omnidirectional Faded Soft Shadows

I'm doing research to implement a shadow algorithm for omnidirectional soft shadows in a real-time 3D renderer. I've read about PCF but to me it doesn't look very realistic since it doesn't "fade" ...
1
vote
1answer
209 views

How to interpolate vertex normals for Phong lighting when barycentric coordinates are negative?

I'm interpolating normals for Phong lighting models. Since I am calculating in the light of each pixel, I'm doing the interpolating after the viewport transform has been applied. So I save a version ...
4
votes
1answer
186 views

Experimental real-time shadowing techniques?

The three most popular shadowing techniques for real time applications are: Shadow maps Advantages: Fast "Simple" Disadvantages: Numerical limitations lead to artifacts and jaggy shadows You ...
3
votes
1answer
132 views

How does opengl fixed function pipeline determine specular lighting with an orthographic projection

I have a scene set up with an orthographic projection with the near / far set from -5000 to 5000. The model view is centered at 0 in the z-axis. I am rendering a sphere centered at z=0 with lighting,...
1
vote
1answer
81 views

Ringlike artifacts produced by rays bouncing off a light source

I recently set up a (very basic) ray-marched path-tracer, and I'm getting strange surface patterns on my area light [link]. I'm using known-valid analytical normals for the light's surface, and the ...
3
votes
1answer
297 views

Directional Light ViewSpace Calculation

I am a bit confused in terms of directional light calculation in OpenGL. Generally we care about the direction of the directional light and we use it with the normal and view (toCamera) vector to ...
1
vote
1answer
44 views

What program can bake transparent light maps?

So I have this racing game I'm trying to modify that uses lightmaps that fade to transparency for light sources. An example from the game: I've been trying to produce a similar effect but with no ...
5
votes
1answer
141 views

Roughness Remapping

I have been recently exploring physically-based rendering (PBR), but there is one part that still confuses me. I don't quite get roughness remapping, as described in the PBR section on Learn OpenGL. ...
1
vote
0answers
69 views

Culling point lights with specular

Well, it's easy to cull point lights when you only need to know the diffuse bounds, but what to do when materials around the light have a specular reflections enabled? The method won't work in this ...
2
votes
1answer
998 views

Path tracing with Next event estimation and area lights auto occlusion

I am working my way through my first path tracer and I am currently designing how to deal with area lights. I have two questions: Each object in my scene can have a Light attached to it, this is how ...
1
vote
1answer
176 views

How do you implement perspective correct Gouraud shading across a triangle?

What's the algorithm for doing so? I have flat shading working and I have perspective correct texture mapping working. Is the way your raster Gouraud shading much different from the perspective ...
1
vote
0answers
43 views

Lighting ramps compressed to zonal harmonics

Let's say I have a lighting lobe represented as a ndotl ramp texture, how do I compress it into a zonal harmonic?
4
votes
2answers
264 views

How does UnrealEngine handle depth?

Today I found something really interesting (I've never seen something like that). While debugging the buffers used in lightning, I see that the depth information is stored in what looks like cascades ...
5
votes
2answers
1k views

How to calculate attenuation and radiance in PBR? (point and directional lights)

I would like implement physically based rendering, following this tutorial I was able to find a list of light sources ordered by lumens, but I have no idea how to use it in the calculations. ...
1
vote
0answers
42 views

Emission maps that interact with a bump map

I am trying to create an effect where a bumpy billboarded texture is illuminated by a emission map that is also billboarded but is logically closer to the camera in 3D space. In this way a blue ...
7
votes
1answer
627 views

Constant screen-space-width rim shading

As of lately I've been studying a bit of shaders (in Unity), and am trying to recreate the "light-based inline" that can be observed in the latest Legend of Zelda. But maybe the task is a bit above my ...
6
votes
2answers
322 views

Ambient Lighting

On the Wikipedia page for the Phong model, it says that the ambient term is a constant, and just gets added on to the other terms. But on other pages like LearnOpenGL it says you should take the ...
3
votes
0answers
132 views

Exact Formula for Diffuse Hemisphere Lighting

The OpenGL Programming Guide states the formula for diffuse hemisphere lighting on a surface with normal vector $\vec{n}$ as $L_o(\vec{n}) = L_i(\uparrow) (1-\frac{1}{2}\sin(\theta)) + L_i(\downarrow)...
5
votes
2answers
203 views

What is missing in this image that stops it from looking like a photograph?

Look at this image: This is CG, Saya, a project meant to make as real CG as possible to the point of becoming indistinguishable from reality. I would say that it is pretty believable. But, it still ...
2
votes
2answers
468 views

How to find Light Direction from a Point on a surface to an Area Light

How can I a find the Light Direction/Ray from a Point on a surface to an Area Light? Is there a universal technique to do this for all types of lights (circle, rectangle, sphere & tube)? Although ...
3
votes
1answer
279 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 ...
6
votes
0answers
151 views

Dual paraboloid shadow texture edge seams

I implemented dual paraboloid shadows for point lights. The goal was to reduce the number of shadow passes. Also the target is GLES3.0 so no layered rendering is available. The shadows work, and ...
1
vote
0answers
40 views

What could cause realtime lighting within a viewport to be calculated on the wrong part of the screen?

(I initially posted this in a section that is less suited for the particular issue, oops) I'm having this issue on some of my client's computers (this is for a Unity asset) that I cannot reproduce on ...
6
votes
3answers
518 views

Formula for the ambient light intensity of a scene?

I understand that ambient light is light that occurs a result of light from a given source refecting off an infinite number of points in a scene, thereby illuminating all objects in the scene ...
1
vote
0answers
48 views

Specular Highlight Gray When Behind Model

What would cause this grayscaled backside? When my camera is behind my model I see a grayscale specular highlight. However, in front of it is perfectly fine. Here's my shading code. (Software ...
7
votes
1answer
397 views

Confused about prefiltering environment maps (Manson 16)

I'm working my way through this paper about GGX-filtering environment maps: http://www.ppsloan.org/publications/ggx_filtering.pdf I find myself stuck on the basics. In particular, I am confused by ...
-1
votes
2answers
845 views

Emission of light from texture on WebGL

I have to build a texture of a cube that models the emission of light by the object. Any tips? I really don't know where to start.
1
vote
0answers
327 views

WebGL Spotlight

I have to add a spotlight to my rotating cube so this is my code: HTML ...
5
votes
1answer
251 views

Irradiance Map Equation What is “dω”?

Link to paper : Irradiance and Incoming Radiance | lawrence.edu Using a shader to compute En Computing En as described above is a very compute intensive operation, because we have to compute ...
1
vote
1answer
178 views

How to organize Lights and Models?

I'm interested in how to organize in code (I prefer C++) lighting. Problem is: I have Scene which contains Model where model ...
6
votes
1answer
111 views

Amount of light reaching the sensor of pinhole camera model

Consider hypothetical camera with pinhole (in mathematical sense) lens and is sensor, like in below image. Is it the case that the central region of the sensor will receive more light (pixels will be ...
4
votes
1answer
253 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: ...
3
votes
3answers
197 views

What's the concept of “Ray” really?

I'm learning Ray Tracing using this MIT tutorial. I've heard Ray Tracing only in the context of lighting. I.e. I understand that ray casting is used to light an object that has been already drawn. ...