Both an area light and an emissive polygon can be used to create lights. What is the difference between the two?
4 Answers
Matt's answer covers the theory of it, but to provide a visual comparison:
Area lamp, 100 samples, 11.08 seconds. MIS (Multiple Importance Sample) on
Plane, 100 samples, 12.10 seconds. MIS on
So the plane is slightly slower, but it has slightly less noise as well.
But now lets try with three lamps instead of only one:
Area lamps, 100 samples, 11.31 seconds, MIS off for all lamps (turning MIS on gave the same result with an extra 2 seconds on the render time)
Planes, 100 samples, 12.83 seconds, MIS on for all planes
Planes, 150 samples, 11.19 seconds, MIS off for all planes
Planes, 100 samples, 12.46 seconds, MIS on for two smaller planes, off for large one
So it appears that when you have multiple lights and manage which emission planes have MIS turned on, the result can me similar to area lamps, although still a bit slower and slightly more noisy. It's the other way around when you have only one emission plane, but the difference is subtle. MIS for area lamps doesn't seem to make any difference to the diffuse, except increase the render time a bit.
This only compares noise level of shadows and diffuse shading, for Glossy shaders you usually want to keep MIS on for the lamps you wish to create specular highlights. (See page 5 of this paper):
(From the above mentioned paper)
Now for arguement's sake, lets take a look at a point lamp vs a spherical mesh:
Point Lamp, 100 samples, 12.30 seconds, MIS on
Sphere, 100 samples, 13.86 seconds, MIS on
The sphere is clearly the loser here, very noisy and slightly slower. Turning MIS off makes it much worse.
To conclude - it all depends on your situation. Mesh lights are more flexible and probably more accurate, but require some understanding of importance sampling and playing around.
All these tests were done with the Path Tracing integrator. Using the Branched Path Tracing integrator, Area and Point lamp renders were much cleaner, and mesh lamp renders were much noisier (for various samples but the same render time).
Download this .blend file if you'd like to play with it.
-
$\begingroup$ how are mesh lights more accurate? $\endgroup$– VaderCommented Mar 27, 2014 at 11:11
-
2$\begingroup$ @Vader you can texture mesh lamps, and real light sources have real geometry, and not under any circumstance produce 100% constant quantities of light from every square unit of measure. again my example is a light bulb... you cant really render a light-bulb realistically with a lamp, you need an emission material on the filament of the bulb... ie: accurate = realistic $\endgroup$ Commented Mar 27, 2014 at 17:58
In Cycles, the differences are negligible.
Cycles determines the softness of a shadow by shooting a ray in a random direction and seeing if it hits a light source, and which part.
For an emissive polygon (mesh light), a hit "counts" if it intersects the mesh.
For an area lamp, a hit "counts" if it passes through the rectangular area around the lamp's center. This area is configurable, in Blender.
Incidentally, point lamps work the same way, except that the area around the lamp's center is spherical. This area is also configurable in Blender (it's the size setting, IIRC).
As the other answer points out, polygons require resources. IMO, those resources are usually negligible. Most lights are small and require few polygons, in which case it's hardly even worth thinking about.
If your light source requires lots of polygons in a complex shape, then a conventional lamp probably won't do the job anyway. Furthermore, if you want to see the light source without using a mesh light, the model is going to negate the benefit of not using a mesh light.
The only case I can think of where that might matter is if you have LOTS of lights. If each of those lights has 6 polygons, that might add up to a lot, which you might be able to avoid by using a conventional lamp.
That being said, in BI the differences are astronomical.
You can accomplish a similar effect (as in Cycles) with an emissive material on a mesh and using global illumination, but BI makes that extremely expensive to render. Area lamps (in BI) are orders of magnitude faster than global illumination, and probably just as accurate (if ray-traced).
Hope that helps!
-
$\begingroup$ I think this answer is incorrect, as Cycles doesn't just shoot rays in random directions, it uses shadow rays as optimization, to sample the lights directly - that's why you can separate direct lighting from the indirect one in the render passes. $\endgroup$ Commented Nov 25, 2016 at 1:44
Lamps have no geometry. which means that they cannot be transformed, have no solidity, and cannot be rendered... this obviously would mean that a lamp is less resource intensive than a polygon, which can be useful when lighting something that doesn't require the resource hit.
Take for example, a distant building with a lit window doesn't need the bells and whistles of a geometric light, it just needs the light. An urban scene might be a good example of this. With many windows that may not need geometric lights to achieve the needed effect, it would be best to not simulate the shape and size of the actual light source.
In contrast, a scene with say, a light-bulb in it, would need a polygon light. For one because the light source would need to be rendered, and not just the light it produces, and two because lights don't come from a single point in space...
(I'm not sure but I don't think they can interact with physics simulations either, as they have no attributes such as mass, volume, etc...)
Long story short
use a lamp when you want to light your scene
use a polygon when you want a light IN your scene
EDIT #2: Matts answer appears to be more informed, i would go with his answer....
-
$\begingroup$ btw... by my experience, lamps dont really work well in cycles... there may be a workaround for it but i never use lamps for that reason $\endgroup$ Commented Mar 25, 2014 at 13:47
-
2$\begingroup$ What about them doesn't work well? I use them all the time just fine $\endgroup$ Commented Mar 26, 2014 at 10:13
-
$\begingroup$ I never see any difference (in term of render quality) between an emission plane and an area lamp with same dimensions. Why do you say lamps doesn't work well?? $\endgroup$– PolossonCommented Mar 26, 2014 at 10:44
-
2$\begingroup$ Lamps CAN be transformed, just not in the same ways as a mesh. An area lamp can be given any rectangular dimensions you like, and a so-called point lamp can be given any spherical dimensions you like. $\endgroup$– MattCommented Mar 26, 2014 at 16:09
-
1$\begingroup$ @Matt see i didnt know that =) $\endgroup$ Commented Mar 26, 2014 at 23:51
Another one is that you can not use textures with lamps at all, because you can not unwrap them. It become main problem in my project.