Page 1 of 1

Falloff angle of incidence between light source and surface

PostPosted: Mon Jul 22, 2019 8:33 pm
by scooternva
I'm experimenting with the Octane Falloff Texture, but there does not seem to be an option to base falloff on the angle between a specified light source, the surface normal of the object, and the camera.

The angle between the camera and the surface normal is the "Normal vs. Eye Ray" mode, and the angle between the surface normal and a couple of different vectors is available with the other two nodes, but that's it. And looking around the OctaneRender 2018.1.3 node system for the LightWave plugin, there doesn't seem to be a way to specify that the falloff should be based on the current angle between a specific light source, the surface normal, and the camera.

Or is there, and I'm just missing something blazingly obvious!? (Hey, it's been known to happen. :) ) My spidey sense tells me that the answer is to plug in... something into the blue "Direction" input node of the Octane Falloff Texture, but I'm stumped what that would be. There doesn't seem to be a node that gives you the coordinates of the light source that's half of the angle equation. So, after fooling around with this for an hour I've come here to let the experts turn me from my foolish ways.

Any idears? Thanks...

EDITED TO ADD: Basically, I'm in search of an alternative to the film settings that can be applied to OctaneRender materials. I'd like to be able to specify exactly what colors I want to see during specular reflection from various angles, instead of endlessly fiddling with film width and IOR to get the colors I'm looking for. Thanks...

Re: Falloff angle of incidence between light source and surface

PostPosted: Tue Jul 23, 2019 11:25 am
by juanjgon
Hi,

You could try to use the light info node direction output to see if it helps ...

Thanks,
-Juanjo

Re: Falloff angle of incidence between light source and surface

PostPosted: Tue Jul 23, 2019 5:40 pm
by scooternva
I was under the (apparently mistaken) impression that using non-Octane nodes was verboten. Would it be correct to say that this only applies to LightWave materials, but the other nodes (e.g., the Light Info node you just pointed out) are fair game? If so, this opens up all kinds of interesting possibilities. Will do some tinkering and report my results. Thanks!

Re: Falloff angle of incidence between light source and surface

PostPosted: Thu Jul 25, 2019 8:39 am
by scooternva
Well, after fiddling with it for an hour or two I still couldn’t figure it out, so I’m just going to fake it by enveloping the specular color changes. Thanks anyway...

Re: Falloff angle of incidence between light source and surface

PostPosted: Wed Aug 07, 2019 1:35 pm
by baltort
It is possible, as always, to do this using an OSL node.

Firstly, can I clarify what you're trying to achieve? There are lots of different possible options since you've actually mentioned 3 vectors rather than 2:

Let's call the vector from a fixed point in space (your light in this example) to a point being sampled on a surface L.
Let's call the normal vector at that point N.
Let's call the ray that goes from the camera to the surface point V.

1) Calculating the angle between L and N tells you how directly the surface is pointing at the light source, but doesn't change with viewing angle.
2) Calculating the angle between L and V tells you how 'on-axis' the light is with the viewing angle, but doesn't take into account the surface normal.
3) Calculating the angle between N and V tells you how directly the surface is pointing at the viewer, but this doesn't take into account your light position.

I can't think of a meaningful sum that involves all 3!

J.

Re: Falloff angle of incidence between light source and surface

PostPosted: Thu Aug 08, 2019 11:34 pm
by scooternva
Hi,

Not really pursuing this since I went in a different direction, but to answer your question: I was trying to fake a polychromatic effect on my model--I wanted the metallic surface to have a specific reflected color that changed to a different color as the vector between the camera, the surface normal, and the main light source changed. Maybe you're right and I don't need to take the light source vector into account, but I still wasn't able to figure out the math for even getting the single vector (between camera and surface) to work the way I wanted.

It's OK though; I did some experimenting with the IOR of the thin film and got a look that I'm satisfied with. If you have any suggestions for achieving what I'm describing, though, I'm all ears!!