Talk:Rendering equation

Unit normal?
I should be stated explicitly that $$ \mathbf n$$ is the unit normal to the surface. If no one objects then I'll make that change soon.

Good heavens... could this article be any more obtuse? It looks like it's written in Greek instead of English. Or is that 'Geek'?

We're not all genius mathematicians you know.

Wondering why fluorescence and phosphorescence are included in the limitations? If the brdf is a function of wavelength and time, these phenomenon are able to be expressed/calculated with the rendering equation. — Preceding unsigned comment added by 132.170.114.75 (talk) 22:27, 14 November 2011 (UTC)
 * I have to agree with this statement. Typically those effects are not included in professional renderers. I believe the main reason is beacause in practice we do not use wavelengths, but rather an rgb scale. The article makes mention of this ("may be sampled at or integrated over sections of the visible spectrum to obtain, for example, a trichromatic color sample"), but perhaps its usefull to state the consequences of this approximation. — Preceding unsigned comment added by 93.186.190.158 (talk) 11:40, 13 June 2012 (UTC)
 * I found a nice link demonstrating the untruth: http://www.glassner.com/andrew/cg/research/fluphos/fluphos.htm. — Preceding unsigned comment added by 93.186.190.158 (talk) 12:09, 15 June 2012 (UTC)

The standard rendering equation, with a standard BRDF, does not support fluorescence or phosphorescence, even when using continuous spectra (rather than discrete RGB). This is because these phenomena allow for energy absorbed via one wavelength or time to be emitted at a different wavelength or time. To formally support them, two additional integrals wound be required: one over input wavelengths (as distinct from output wavelengths), and another integral over input times (as distinct from output times). The standard rendering equation only has a single wavelength (lambda) and a single time (t), and no integrals over these variables. MatthewJ 86.145.131.12 (talk) 22:42, 12 November 2012 (UTC)


 * Yes, two new integrals would be required. And the BRDF would have to take input wavelength, output wavelength, input time and output time as arguments, instead of just one wavelength argument and one time argument. —Kri (talk) 19:58, 21 September 2013 (UTC)

Hemisphere?
So if the equation only considers $$\Omega$$, which is a hemisphere, how can it then be used to render surfaces of transmissive materials, such as glass, water or a sheet of paper? —Kri (talk) 15:56, 21 November 2012 (UTC)
 * The extension to the full sphere of directions is straightforward and is usually omitted in the standard literature for the sake of clarity. KeymasterCZ (talk) 19:16, 18 September 2013 (UTC)

Image incorrect
The image has specified an incorrect direction for $$\omega'$$; it is in fact directed against the direction of the incoming light. —Kri (talk) 18:48, 22 November 2012 (UTC)


 * Do you have any references for this? $$\omega_i$$ is called incoming light, it makes more sense for the vector to be incident to the surface. Though I personally like to put an absolute value there, as it generalizes nicely when you consider a sphere instead of just a hemisphere (e.g. for transmission) 115.188.233.168 (talk) 11:35, 29 November 2012 (UTC)


 * See bidirectional reflectance distribution function (BRDF), this is the way it is defined. It can be seen in the following article where the BRDF was first defined:




 * I don't understand what you mean by putting an absolute value there; the absolute value of $$\omega_i$$ would just be 1. —Kri (talk) 17:01, 1 December 2012 (UTC)


 * I meant the cosine term (dot product), sorry for the confusion. 115.188.233.168 (talk) 02:15, 2 December 2012 (UTC)


 * Why would you like to put a cosine term in the image? I guess the other vector in the dot product would be the surface normal? —Kri (talk) 11:07, 8 December 2012 (UTC)

Pseudocode?
Not sure how useful this is to anyone, but I thought it'd be nice to have all that math as pseudocode... so here it is. Sorry if this isn't appropiate/the right place for this!

// The rendering equation, as pseudocode, with related math symbols. // // Note: The 'wavelength of light λ' is left out for simplicity. function outgoing_radiance(	scene: Scene, // The scene the surface exists in.	surface: Material, // The material of the surface at Χ.	//	surface_pos: vec3, // The location in space: Χ	surface_dir: vec3, // The surface normal at Χ: Ν	outgoing_dir: vec3, // The direction of outgoing light: ωₒ	time // The current time: t ) -> Lₒ { // The emittance of the surface: Lₑ(Χ, ωₒ, t)	let emitted = surface.emittance(		surface_pos,		outgoing_dir,		time	) // Accumulated radiance for Lᵣ	let radiance = zero; // The unit-hemisphere centered around Ν: Ω let hemisphere = hemisphere(surface_dir) // Iterate over all directions covering the hemisphere: Lᵣ = ∫…dωᵢ for incoming_dir in hemisphere { // Find incoming light at Χ from the current direction ωᵢ: //  Lᵢ(Χ, ωᵢ, t)		let incoming_light = scene.light(			surface_pos,			incoming_dir		) // Calculate/solve the BRDF for this surface, // at the given incoming and outgoing directions: //  ƒᵣ(Χ, ωᵢ, ωₒ, t)		let brdf_value = surface.brdf(			surface_pos,			incoming_dir,			outgoing_dir,			time		) // Calculate the dot-product between the surface normal // and the incoming direction: //  ωᵢ ∙ Ν let normal_dot_dir = max(0,			dot(surface_dir, incoming_dir)		) // Acccumulate the radiance from/for direction ωᵢ radiance += brdf_value * incoming_light * normal_dot_dir }	// Sum of emitted light and accumulated reflected light: //  Lₒ = Lₑ + Lᵣ	return emitted + radiance } Longor1996 (talk) 13:09, 2 July 2024 (UTC)