Falloff angle of incidence between light source and surface

Forums: Falloff angle of incidence between light source and surface
Newtek Lightwave 3D (exporter developed by holocube, Integrated Plugin developed by juanjgon)

Moderator: juanjgon

Falloff angle of incidence between light source and surface

Postby scooternva » Mon Jul 22, 2019 8:33 pm

scooternva Mon Jul 22, 2019 8:33 pm
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...
Octane 2020.2.3.1 | LightWave 2019.1.5 (3134) | Win10 Pro 19041.1052 | 2 x Gigabyte AORUS RTX 2080 Ti Xtreme w/NVLink | Gigabyte AORUS Xtreme X399 | AMD Ryzen 2950X | 64 GB RAM | SSDs: Samsung 970 PRO 512 GB + Seagate FireCuda 510 2 TB | blog.gammans.zone
User avatar
scooternva
Licensed Customer
Licensed Customer
 
Posts: 88
Joined: Thu Jul 04, 2019 6:13 pm
Location: Suburban Washington DC

Re: Falloff angle of incidence between light source and surface

Postby juanjgon » Tue Jul 23, 2019 11:25 am

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

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

Thanks,
-Juanjo
Attachments
2019_07_23-13_25_10.jpg
User avatar
juanjgon
Octane Plugin Developer
Octane Plugin Developer
 
Posts: 8867
Joined: Tue Jan 19, 2010 12:01 pm
Location: Spain

Re: Falloff angle of incidence between light source and surface

Postby scooternva » Tue Jul 23, 2019 5:40 pm

scooternva Tue Jul 23, 2019 5:40 pm
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!
Octane 2020.2.3.1 | LightWave 2019.1.5 (3134) | Win10 Pro 19041.1052 | 2 x Gigabyte AORUS RTX 2080 Ti Xtreme w/NVLink | Gigabyte AORUS Xtreme X399 | AMD Ryzen 2950X | 64 GB RAM | SSDs: Samsung 970 PRO 512 GB + Seagate FireCuda 510 2 TB | blog.gammans.zone
User avatar
scooternva
Licensed Customer
Licensed Customer
 
Posts: 88
Joined: Thu Jul 04, 2019 6:13 pm
Location: Suburban Washington DC

Re: Falloff angle of incidence between light source and surface

Postby scooternva » Thu Jul 25, 2019 8:39 am

scooternva Thu Jul 25, 2019 8:39 am
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...
Octane 2020.2.3.1 | LightWave 2019.1.5 (3134) | Win10 Pro 19041.1052 | 2 x Gigabyte AORUS RTX 2080 Ti Xtreme w/NVLink | Gigabyte AORUS Xtreme X399 | AMD Ryzen 2950X | 64 GB RAM | SSDs: Samsung 970 PRO 512 GB + Seagate FireCuda 510 2 TB | blog.gammans.zone
User avatar
scooternva
Licensed Customer
Licensed Customer
 
Posts: 88
Joined: Thu Jul 04, 2019 6:13 pm
Location: Suburban Washington DC

Re: Falloff angle of incidence between light source and surface

Postby baltort » Wed Aug 07, 2019 1:35 pm

baltort Wed Aug 07, 2019 1:35 pm
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.
baltort
Licensed Customer
Licensed Customer
 
Posts: 72
Joined: Mon Jul 07, 2014 4:00 pm

Re: Falloff angle of incidence between light source and surface

Postby scooternva » Thu Aug 08, 2019 11:34 pm

scooternva Thu Aug 08, 2019 11:34 pm
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!!
Octane 2020.2.3.1 | LightWave 2019.1.5 (3134) | Win10 Pro 19041.1052 | 2 x Gigabyte AORUS RTX 2080 Ti Xtreme w/NVLink | Gigabyte AORUS Xtreme X399 | AMD Ryzen 2950X | 64 GB RAM | SSDs: Samsung 970 PRO 512 GB + Seagate FireCuda 510 2 TB | blog.gammans.zone
User avatar
scooternva
Licensed Customer
Licensed Customer
 
Posts: 88
Joined: Thu Jul 04, 2019 6:13 pm
Location: Suburban Washington DC

Return to Lightwave 3D


Who is online

Users browsing this forum: No registered users and 8 guests

Thu Mar 28, 2024 3:55 pm [ UTC ]