Hi all, I've been tinkering with the nodes in Octane Editor in an attempt to match the DOF settings of Octane ThinLens, with those of the Lightwave perspective camera and I think I have something which works quite well. I often need object and surface isolation masks and before I bought Octane I'd render these out using ShaderMeister. Along comes the fabulous Octane render, but how to generate isolation masks? I noticed the default diffuse material has a 'matte' button but only the diffuse materal, not glossy or specular. Even if all Octane materials had the matte option it would still be a daunting task to activate/deactivate these individually as required especially in a scene with many objects and materials. The 'material override' feature would be helpfull but only on a per-object basis (good for object masks but not surface masks)
So.. back to shadermeister for my masks & passes but here's the problem: ThinLens DOF needs to match Lightwaves own DOF or the masks won't match the beauty render. This is what I've come up with and so far I've found it to work, but I haven't fully tested it in a variety of different scenes/camera focal lengths etc.
First thing to note is the Focal Depth is controlled in the usual Lightwave way ie: targeted to a null via proximity modifier in the LW Camera DOF panel. Add a null for the DOF Target, parent to camera and disable the null's rotation HPB, scale XYZ and Position XY.. you only want to move this along the Z axis towards and away from the camera. I added a 'shape' custom object to the null so it's easier to see in your scene. Open up the octane editor and drop in the 'Camera' node (Item info-->Camera) double click and select 'Render Camera' Connect the focal distance node output to the focal depth input of thinlens camera. Boom- focal distance now mathches.
The Lens F-Stop (amount of defocus) is also controlled via the LW camera DOF panel. No modifier here though, just enter a number and it ties into Octane later in the Editor. This next step was a bit tricky (for me anyway I'm very much mathematically challenged) Octane's aperture setting works inversely to Lightwave. If both LW F-stop and Octane's aperture settings are set to 1 the defocus matches. A LW F-stop value of 0.5 = Octane Aperture setting of 2. A LW F-stop value of 0.25 = Octane Aperture setting of 4, and so on. Halve the LW F-stop and double the Octane setting to get the same defocus effect. Back to the octane editor drop in a divide node. In the LW camera node added earlier, connect the 'Lens F-stop' output node to both the A & B inputs of the divide node. This divides the LW fstop number by itself, but you need to do this twice. Copy and paste the divide node, connect the 'result' from the first divide node into A of the second divide node, and in the B input, connect the Lens Fstop node from the LW camera. ie: LW fstop number of 0.5 divided by 0.5 = 1 divided by 0.5 = 2.
This seemed to do the trick until I realised the Lens Focal Length (or zoom factor) of the LW camera effected the defocus amount. The next part was trial and error.. connect the LW camera 'zoom factor' output node to the input A of a divide node and in input B put 2.7, run the result into a multiply node and connect the result into the octane aperture node input.
I tested this at focal lengths of 12mm, 18mm, 35mm, 50mm and both the Octane and LW DOF match perfectly. (Best way to check this is rendering out alpha's)
Lightwave Camera & ThinLens DOF Matching for Masks & Passes
Moderator: juanjgon
- UnCommonGrafx
- Posts: 199
- Joined: Wed Mar 13, 2013 9:14 pm
Well,
That's quite helpful!
Thank you.
That's quite helpful!
Thank you.
i7-4770K, 32gb ram, windows 8.1, GTX Titan and gt 620 for display
- marchermitte
- Posts: 283
- Joined: Sat May 29, 2010 9:25 pm
- Location: Geneva
- Contact:
Yeap, congrats, that was one of my issues as well. I'm going to test out.
Thank you!
Thank you!
Marc Hermitte
Intel I7 4.5 Ghz, 24 gig ram, 2x Nvidia GTX 480, win 764bits
Intel I7 4.5 Ghz, 24 gig ram, 2x Nvidia GTX 480, win 764bits
I've yet to test this myself on an actual job and a more complex scene, hopefully this will hold up and wasn't just a per-scene solution- may need some tweaking
Dino Inglese
CG Artist
Melbourne Australia
Intel Core i7-4820K, 3x GTX 980ti
Windows 7 64bit, Modo 12.2v2 for PC
Octane build 4.04.0.145
CG Artist
Melbourne Australia
Intel Core i7-4820K, 3x GTX 980ti
Windows 7 64bit, Modo 12.2v2 for PC
Octane build 4.04.0.145
Hey I'd totally missed the passes option in the Info Kernel.. Unfortunately this is the result I get from a Material ID pass, less than desireable 
This is what I'm trying to achieve:

This is what I'm trying to achieve:
Dino Inglese
CG Artist
Melbourne Australia
Intel Core i7-4820K, 3x GTX 980ti
Windows 7 64bit, Modo 12.2v2 for PC
Octane build 4.04.0.145
CG Artist
Melbourne Australia
Intel Core i7-4820K, 3x GTX 980ti
Windows 7 64bit, Modo 12.2v2 for PC
Octane build 4.04.0.145
Simple workaround could add a background plane for the sake of passes then deactivate when not needed. Still.. I'm not a fan of the the smooshy colour bleeding. wonder if there's some way to use the alpha input of the Info Kernel to isolate an object or material?
Dino Inglese
CG Artist
Melbourne Australia
Intel Core i7-4820K, 3x GTX 980ti
Windows 7 64bit, Modo 12.2v2 for PC
Octane build 4.04.0.145
CG Artist
Melbourne Australia
Intel Core i7-4820K, 3x GTX 980ti
Windows 7 64bit, Modo 12.2v2 for PC
Octane build 4.04.0.145
- FrankPooleFloating
- Posts: 1669
- Joined: Thu Nov 29, 2012 3:48 pm
I do not have time to read entire thread today, but I have made more than a couple separation masks using Override w/ Override Exclusion in object properties... and for separating a certain material, I make two new copies of this object - one with polys of the material I want, and the other without... Do Override as Matte and turn off Override for that material object I wanted...
Win10Pro || GA-X99-SOC-Champion || i7 5820k w/ H60 || 32GB DDR4 || 3x EVGA RTX 2070 Super Hybrid || EVGA Supernova G2 1300W || Tt Core X9 || LightWave Plug (v4 for old gigs) || Blender E-Cycles