Jump to content

Talk:Rendering equation

Page contents not supported in other languages.
From Wikipedia, the free encyclopedia

Unit normal?

[edit]

I should be stated explicitly that 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)[reply]

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)[reply]
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)[reply]

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)[reply]

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)[reply]

Hemisphere?

[edit]

So if the equation only considers , 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)[reply]

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)[reply]

Image incorrect

[edit]

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

Do you have any references for this? 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)[reply]
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:
  • Nicodemus, Fred (1965). "Directional reflectance and emissivity of an opaque surface" (abstract). Applied Optics. 4 (7): 767–775. Bibcode:1965ApOpt...4..767N. doi:10.1364/AO.4.000767.
I don't understand what you mean by putting an absolute value there; the absolute value of would just be 1. —Kri (talk) 17:01, 1 December 2012 (UTC)[reply]
I meant the cosine term (dot product), sorry for the confusion. 115.188.233.168 (talk) 02:15, 2 December 2012 (UTC)[reply]
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)[reply]

Pseudocode?

[edit]

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)[reply]