Questions tagged [lighting]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
2
votes
1answer
122 views

Rendering equation for spherical lights

I am currently implementing spherical lights in my DirectX game engine. I decided to build the shading formula from the classical rendering equation. Here is what I get: The simplifications show that ...
3
votes
0answers
87 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
81 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 ...
0
votes
0answers
150 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 ...
1
vote
1answer
54 views

Roughness Value of (Close to) Zero in Physically Based Rendering

In my Direct Light Physically Based Renderer, when I set the roughness too low (ie. 0.0 or close) the specular reflection doesn't show, not even at high resolutions and at perfect angle with the ...
1
vote
2answers
79 views

Do I need a normal matrix if I calculate lighting in an objects space?

As a quick reminder, here is what normal matrix is and why do we need it. Now the question - if I take the light position and transform it into an object space than I don't need the normal matrix at ...
0
votes
1answer
75 views

Pseudo rounded cube in OpenGL

If I have a cube in OpenGL, how can I have it appear like rounded? I think it's too complicated to really have the cube rounded so is there any "light trick" to have something like this: The cubes ...
0
votes
1answer
50 views

Physically realistic received irradiance values given some BRDF?

I am trying to simulate the actual response of a camera given some object that is reflecting light. I've written a ray tracer, and have a BRDF that I need to use, and I have a camera sensitivity in ...
0
votes
0answers
32 views

Clarification about Phong lighting model

I've read some tutorials about Phong and Blinn lighting models and tried to implement a rendered myself. To my knowledge, the basic approach consists of the following steps: calculate the vector from ...
1
vote
1answer
117 views

Tone Mapping in a physically based rendering ray tracer

I'm implementing a pbr ray tracer. Let's say that I'm at the end of the process: for each pixel pi, I accumulated the radiance value in vector pi = (radR, radG, radB). At this point, these values are ...
4
votes
0answers
150 views

Pre-filtered environment map, deriving the equation

I'm reading through this article, and more specifically I'm trying to derive the equation that would explain the implementation the following shader (still in the same article): ...
0
votes
0answers
29 views

gradual transition of light intensity formula

Imagine I have an x value that ranges from 1-100. The light source is pointed at x=50. From points 35 to 65 I want intensity to be 1 At the ends (ie 1 and 100), intensity should be 0 What formula ...
2
votes
1answer
65 views

How does Next Event Estimation work with transformed lights?

I am relatively new to path tracing, and I am trying to implement next event estimation. I am following the Monte Carlo integral used to compute the direct illumination from an area light: $$\frac{1}{...
2
votes
1answer
86 views

how many watts are in the SPD of the color white?

Please help. I'm trying to implement a ray tracer, going by the PBRT book and got stuck on an issue that I fail to find the answer to. My scenes are made from objects and light sources. From that, I ...
2
votes
1answer
73 views

Why is cos(𝜃) in the denominator in the reflectance equation and in the numerator in the shading equation?

Background: I'm reading https://learnopengl.com/PBR to learn about PBR. In the theory slide (https://learnopengl.com/PBR/Theory), the author has the reflectant equation as The theta (the angle ...
0
votes
1answer
121 views

How to simulate a line laser diode?

I'm interested in simulating the way a laser line deforms when it strikes an object and runs along the surface of it. Which concepts would be involved? Is there any 3D modeling software out there that ...
4
votes
0answers
106 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
0answers
82 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
236 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
187 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
305 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
794 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
2answers
158 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
106 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
102 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?
13
votes
4answers
1k 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, ...
11
votes
2answers
4k views

Why are normal maps blue and purple in color?

I am learning about normal mapping. I understood that RGB values are converted into XYZ, but my question is how is it converted and why is the normal map blue and purple in color?
6
votes
2answers
238 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
215 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
260 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
57 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
154 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
344 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
105 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
66 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
343 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
247 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
238 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
98 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
660 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
47 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
200 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
87 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
1k 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
246 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
61 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
480 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
2k 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
44 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
912 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 ...