IES-Like Lights in Cycles / Architectural Lighting

Just fantastic!

Wow this is an amazing, at least for me it is.
I am 27 years old self-learn generalist and i am trying to understand this, but it became a bit confusing for me to understand, i probably need a math background for this
And here is my question, what mathematical area should y learn in order to understand this?, i know that probably may take more than a year to reach to understand but i would like to know were should i start and were should i aim??
thanks for the examples!

In general, you need to have a grasp on coordinate transforms, look for spherical coordinates. And some vector math: Dot product (projection onto a vector, usefull to get the first tangent direction) and crossproduct (calculate a second tangent vector perpendicular to the first and the normal). Wikipedia has some nice directions on those, the atan2 nodegroup for example is the formula found on the spherical coordinate page. Keep at it, math can be realy fun and usefull :slight_smile:

I added in some nodes to convert the spread of the light into degrees. It took a little head scratching and tweaking of constants (note the 0.636 on the bottom) but it is fairly accurate.


Here are some examples of the angle control node group at work. Note the additional color ramp after the nodegroup.




so, to any math-guru here :slight_smile:
how can I project a texture with a spot lamp?
I couldn’t figure what math/texture coords are the right ones.

Make a slide projector with a transparent textured plane in front of the light? Not really a node based solution, but a fun way to use a physically based renderer.

:slight_smile:
I’ve used that solution too. but a single lamp is handier

you could try taking the node setup from post #29 and adjust it (add a mapping node and stick it before the texture), this would make a radial emitter, not sure how well it would behave on the borders of the image, probably needs some adjustment so that it clips to black outside of the image dimensions. for a planar projector (would behave like the lamp with transparent plane with image on it) you would have to change it quite drasticly, keeping only the projection part at the beginning without the part that converts it to spherical coordinates, if i have time i’ll upload some examples later, no promises though :slight_smile:

The trick keeps failing with GPU, it renders just a quarter of the lamp. Any thoughts? It’s a pity for such a useful trick.

Cheers

thanks for posting this! I am so stealing it :slight_smile:

it sure is. I tried to figure out why this is happening, but there’s only so much i can do without nvidia gpu to render. I hoped someone here may be able to point out more, but maybe it simply is a bug, maybe CUDA can’t handle the negative numbers on the coordinate transforms or something like that…

I hope that a good coder will fix this soon.
The ability to handle .ies lights correctly is very important for a render engine like cycles.

Here is the blend file I was using for the cone angle controls, as requested by RickyBlender

Attachments

cone angle test.blend (797 KB)

This is really cool!

I never heard of IES lighting before today so I did a bit of research and stumbled across this really cool lighting analysis suite:

http://www.visual-3d.com/

Your view on lighting will change forever after playing around with their tools for a bit…

I can imagine that implementing true IES lighting with all of the correct user adjustable functions into cycles will bring Blender worlds beyond other physical renderers.

I think you are right, i really appreciate your words.

I reported the issue yesterday, after hesitating because of the big node setup. Seems the power function used on the gpu was not able to handle negative numbers on the first argument.

Brecht committed a fix today (http://lists.blender.org/pipermail/bf-blender-cvs/2012-November/051692.html).
I can’t test it myself, so if anyone wants to test it out on gpu use revision 52519 or higher :slight_smile:

Great, will try as soon as BuildBot provides a higher build.

Thanks again

I fixed the setup to work even without the mathfix in 52519 (just changed some x^2 to x*x), wish i new it was those then i could have done that earlier. On top i packed the nodes into a new group so it’s easier to use. example below how to use it, also easy to change the color for those who wondered, Area Light and Emission Mesh Examples:


EDIT: i noticed there’s some wonky Stuff going on if you try to rotate the lights, i’ll investigate that next :slight_smile:

Attachments

ies-2d3_fix.blend (1.84 MB)

great news Lockal, i’ll check your plugin out tomorrow :slight_smile: