Lightflow and Lights?

Does anyone know how Blender lights attenuate (inverse square, linear, etc), and which settings affect attenuation (Quad, Distance, etc.) ? My exported scenes in Lightflow are always much too dim, and I have about zero time to compare how lights work in Blender and Lightflow. If I could duplicate Blender’s attenuation in Lightflow, I would at least have a quick fix for a scene I need to complete by Friday.

Thanks in advance for any help.

Matt

Use ‘sphere’ mode for your Blender lights, if the scene looks ok with that in Blender, the Lightflow scene will look reasonable too.
…again, it was in lfreadme.txt…

g I managed to read the small lines g

Are you getting depressed about that???

Hope not!

Stefano

Eeshlo,
Please don’t write me off as some lazy dude who does not read documentation. I read lfreadme.txt in full, and I noticed that sphere was designated as the recommended light mode. However, this does not answer my question. My question was:

Does anyone know how Blender lights attenuate (inverse square, linear, etc), and which settings affect attenuation (Quad, Distance, etc.) ?

Furthermore, my scene is washed out with specular highlights in Blender, yet it is barely visible in Lightflow. I have four lights as primary illumination, two of which are spots (the other two are point lights). The two point lights are more than sufficient lighting in Blender, yet they do practically nothing in Lightflow (and yes, they are on sphere mode). Thus, the information in LFREADME.TXT does not apply to my scene.

In the future, realize that your documentation may not cover all situations; your project is a work in progress (a very good work in progress!) Please answer any questions accordingly.

Lights, anyone?

Matt

Of course I understand that not everybody neglects to read it, I just put it there as a general comment on all the questions I get, so please don’t take it personally. Anyway, as for your question: the parameters that affect attentuation are sphere mode (probably distance squared), the distance setting and the Energy. The energy slider is probably just a value multiplier, the distance settting I could imagine to be something like the value being the distance at which point the lighting is at the maximum Energy, but I wouldn’t know that for sure. I would like to now about Quad settings too, I actually asked theeth about that, and surprisingly with all his knowledge, he didn’t seem to know for sure either…

As for the specular highlights, Lightflow works differrently from Blender in that diffuse lighting is mixed in a certain way with the amount of specular lighting. You can’t really control them separately. The ‘spec’ slider function is interpreted as the amount of mix between the diffuse lighting and the specular lighting in the following way: The amount of diffuse light is one minus a half times the value of the spec slider. So to have both specular and diffuse mixed equally you would set the spec slider to 1.0. I f it is set to 0.0 it would be all diffuse, and when it set to 2.0, it is all specular.

And yes, I understand that the readme.txt is not adequate at all. I wouldn’t even go so far as actually calling it ‘documentation’. I just had put that hastily together expecting people to be familiar with the old script by Montz. And I’m sure I forgot things here and there too…

Awesome. Some free time appeared suddenly, so I dug around on the topics of Quad and Distance, and found out the following from www.ee.oulu.fi/~kapu/cg_course/blenderkeys.txt :

When a lamp is not of type quad, the falloff works like this:

Intensity = Dist / ( Dist value + d)

where d is the actual distance from the light to the point being lit, and Distance is the value in the Dist field. I am sure the the intensity gets multiplied by the light energy.

When a lamp is a quad lamp, it goes like this:

Intensity = Dist / (Dist + Quad1 * d + Quad2 * d^2)

If Quad1 and Quad2 are zero, there is no distance falloff. However, using Quad lamps alone, it is not possible to duplicate the physically correct inverse square lighting that Lightflow uses. Instead of X / D^2, you end up with something like X / (X + D + D^2).

Sphere? I have no clue what that does. It looks like the lights MIGHT obey the inverse square law when Sphere and Quad are on and both Quad1 and Quad2 are equal to zero.

Does anyone know the nitty gritty math behind Sphere?

Later,
Matt

Thanks for the info, I find it useful too. (edited here to remove embarrasing mistake…) As for Lightflow, you might find it useful to know that you can control the fallof exponent. Most lamps have a ‘decay’ parameter, which by default is set to 2.0. Maybe I actually will change the script to make use of this…

I did know about that, and I tried for a linear decay, but it failed miserably – 20 minutes to render a white scene (I would have checked the output picture, but I was eating dinner at the time). In about a week I’ll have enough time to go through and test Lightflow lighting versus Blender lighting, so I’ll update you then.