Quick Howto: Making Mesh Lights Invisible to the Camera

ToborTobor Posts: 2,300
edited September 2015 in The Commons

This has come up from time to time, and I responded in another thread about lighting problems in general. But I thought I'd repeat some of the techniques for hiding mesh lights from the camera during rendering. The light is still emitted, but the camera won't see the mesh.

I'm aware of three methods, and there may be others. Each has its pros and cons, so pick the one that works best for your scene.

Method 1: Refraction Weight/Index. After applying the Emissive shader, dial both the Refraction Index and Refraction Weight to 1.0. 

Method 2: Barely Visible Opacity. After applying the Emissive shader to the mesh, dial the Cutout Opacity to 0.0001. This makes the mesh invisible in most renders.

Method 3: Iray Matte. This requires first applying the Emissive shader, then going to My Library/Scripts/Utilities/. Double click on the Create Advanced Iray Node Properties icon. In Display/Properties for the mesh object, turn Enable Iray Matte to On. Depending on the positioning of the mesh, you may also need to set refraction index/weight as in Method 1. 

The three methods do not behave the same way. A quick recap of what to expect:

1. Mesh lights don't cast shadows onto the Iray virtual ground. This is sometimes desirable, and sometimes not. If you do not need or want ground shadows, use methods 1 or 2. If you'd like to have ground shadows  -- for example, they're useful when post-compositing onto backplates, to add realism -- opt for method 3.

2. Highlights and reflections from the mesh are diminished when using methods 2 and 3. If you need to preserve the strength of the light in a reflection or highlight, opt for Method 1.

3. Method 1 works when the camera is on the non-emission side. If the camera is on the emitting side, you will see the light.

Whatever methods you use, be sure to apply the Emissive shader from the Iray DAZ Uber collection. Don't try to use another type of shader, then manually "dial in" the Emissive property. This can leave the shader with conflicting settings that could affect the results. The special-purpose Emissive shader has all the options correctly set.

As I (currently) use a machine with <500 cores, I'm always mindful of render efficiency. In my testing, I've found a diminishing rendering efficiency in this order: Method 1, 3, 2. Rendering often takes longer when there are transparencies involved. Of course, YMMV.

For more specific steps on applying the Iray Matte Node to an emissive mesh, see this thread:

http://www.daz3d.com/forums/discussion/62433/photometric-point-spotlights-are-not-rendering-in-iray

 

Post edited by Tobor on

Comments

  • Oso3DOso3D Posts: 14,878
    edited September 2015

    Is 1 supposed to work in Iray? It doesn't seem to at all. And yes, I'm using the Emissive property. I end up with a 'ghost' effect, which is nice, but... not what I'm after. (as an aside, I'd love a version of PWEffects for Iray!)

    As for 3, at first I thought it wasn't working, but I think it's the lack of highlights that was throwing me off. I'm not sure if the object shape matters that much, but... hey, that's very cool and useful. I'm thinking using a sphere for ambient space lighting might work really nicely, for example.

     

    Oh, and thank you very much for the tips! I had never known about the iray matte thing, and it didn't occur to me that the cutout would work like that.

     

     

     

     

     

     

    Post edited by Oso3D on
  • Oso3DOso3D Posts: 14,878

    And the more I think about it, many many many thanks, Tobor. This is going to make ambient lighting in scenes WAY easier.

     

  • Why use mesh lights? Simply use a spot or point light and change the geometry of the light on the drop down. If you do not want shadows then turn them off for the light. Using mesh lights is counter productive to an unbiased renederor.

  • ToborTobor Posts: 2,300

    Is 1 supposed to work in Iray? It doesn't seem to at all. And yes, I'm using the Emissive property. I end up with a 'ghost' effect, which is nice, but... not what I'm after. (as an aside, I'd love a version of PWEffects for Iray!)

    I amended the post to mention that in Method 1, the camera needs to be on the non-emission side. That would likely be the case if you're wanting to see reflections or highlights from it in the scene. If reflections and highlights are not critical, 2 is better. If you need the ground shadows, Method 3 is the only one that will give those, but then, you have to be careful with placement. The Matte object may show a little "disturbance in the Force" at some angles, because it is catching shadows.

  • ToborTobor Posts: 2,300
    ronmolina said:

    Why use mesh lights? Simply use a spot or point light and change the geometry of the light on the drop down. If you do not want shadows then turn them off for the light. Using mesh lights is counter productive to an unbiased renederor.

    I don't use them much myself, but some people prefer them, so the information is put out there for the collective.

    It's not true that they are counter-productive in an non-biased renderer. In fact some renderers primarily use mesh lights. Renderman, a premier renderer for Hollywood animation, uses them extensively. Iray doesn't strictly require mesh lighting because it has buit-in light point, area, and infinite lights, but meshes do serrve a useful purpose for some tasks not easily reproduced using other techniques. Iray also supports IES profiles for mesh lights (spotlights do not), which improves their use and efficiency. But that's a subject of a future tutorial.

  • Oso3DOso3D Posts: 14,878
    edited September 2015

    Ron: Well, for one thing, I'm now working on a spaceship render where I want an even ambient glow from all directions. The easiest way to do that is make a big sphere around the ship that glows. But that also looks terrible unless I hide it somehow (which the above methods handle)

     

     

     

    Post edited by Oso3D on
  • Oso3DOso3D Posts: 14,878

    So one thing I've discovered is that if you make an ambient sphere, at large scale it will distort anything outside. (So, for example, a sphere or environmental map of stars and then an ambient sphere inside)

     

    However, if you keep the sphere just large enough to contain most of your scene, it should work fine under most circumstances.

     

  • ToborTobor Posts: 2,300

    I dunno about big compound shape meshes. Every polygon in the mesh is like a different light source -- Iray has to calculate each face as a separate plane where light emanates. If you do this, strive for a sphere with relatively coarse geometry.

  • Mr. Willaim why do you need an ambient sphere? You are using a Physically based render engine. This should not be

    necessary.

  • Oso3DOso3D Posts: 14,878

    Because realistic scenes at night and in space don't render very well because of lack of light? Renders way faster to add a bunch of ambient light to keep the engine from going WHERE LIGHT

     

    Plus, just because I use a physically based render engine doesn't mean I always want realistic results. I find Iray much more intuitive to set up than 3DL, but I have plenty of unrealistic things I'd like to do.

     

  • Oso3DOso3D Posts: 14,878

    Oh, and some examples of doing the ambient light thing:

     

    Explorer3.jpg
    2000 x 2000 - 1M
    E45nstars.jpg
    2000 x 2000 - 997K
  • ToborTobor Posts: 2,300

    Hooray! You got that starfield you wanted!

    But, um, you know faster than light travel isn't realistic, so your picture of the spaceliner will have to go.

     

  • Tobor said:

    I dunno about big compound shape meshes. Every polygon in the mesh is like a different light source -- Iray has to calculate each face as a separate plane where light emanates. If you do this, strive for a sphere with relatively coarse geometry.

    this, keep it very simple!

    And I would use an HDR for ambient light...

  • jestmartjestmart Posts: 4,449

    So would a highly subdivided cube work better than a sphere as the polygons would all be the same shape and size?

  • Oso3DOso3D Posts: 14,878
    Lars: doesn't work well with stars. If you make stars bright enough to illuminate, the image blows out.
  • ToborTobor Posts: 2,300
    jestmart said:

    So would a highly subdivided cube work better than a sphere as the polygons would all be the same shape and size?

    You can always try it. However, I'd stand back if I were you. Lesser things have caused a nVidia card to phase into a gravimetric continuum. when that happens, they have to be replaced by one with more CUDA cores. That's the excuse I keep telling me wife, and I'm sticking to it!

     

  • jestmartjestmart Posts: 4,449

    Don't have Nvidia card, just CPU.  Tried your tips with a sphere, had it encapsulate the fire planes from the Around the Camp set, but couldn't get it to work.  Reluctant to do much experimenting with Iray as I fried old Blinky, my other under powered and over worked laptop, when doing an Iray render.

  • @timmins.william - do you have any other tips for night iray renders?

  • Oso3DOso3D Posts: 14,878

    Generally, easier to darken things in post than try to render things very dark. Easier to toss away information.

    The trick is, of course, to make sure shadows make sense.

    Another tip I read somewhere is that to make 'accurate' images with tone mapping: 'burn highlights: Off,' Burn Highlights: 1, Crush Blacks: 0. This will keep bright elements from blowing out, and preserve details in shadow.

     

  • Oso3DOso3D Posts: 14,878

    Also, the best way to use invisible stuff for ambient light I've found was actually to make a squashed sphere clipping just far enough into the ground so that the figures I was working with is surrounded. A regular sphere buried midway produced some weird lighting effects.

    Obviously, large objects will shadow stuff. This ambient idea provides light from the 'outside in.' If you want EVERYTHING evenly lit and then have more intense light on top, you probably need to give everything a low level of emission.

     

  • ToborTobor Posts: 2,300
    jestmart said:

    Reluctant to do much experimenting with Iray as I fried old Blinky, 

    R.I.P. Blinky. She was an oldie, but a goodie.

  • The Blurst of TimesThe Blurst of Times Posts: 2,410
    edited September 2015
    Granville said:

    @timmins.william - do you have any other tips for night iray renders?

    If you want to do it mostly during the render, you can also render towards the blue end of the spectrum, and use darker blues as the color for whatever emitter (point lights, mesh lights, whatever).

    Part of this is also controlling for temperature of the lightsource since higher Kelvin = bluer light. (i.e. do not be fooled by the night environment and move your lightsource temps towards lower Kelvin. You want higher temperature light sources to get towards the blue end of the spectrum.) 

    This one is still way too bright... but it's close enough.  

    I used a Distant Light (for the moon), plus a point light parented to the camera. All the textures have Iray shaders applied to them, or were Iray textures to begin with (like all of the G3F stuff). 100% CPU render, stopped at 45 minutes & 85% convergence. Only post-work was to shrink the dimensions for the anti-aliasing effect. No change to color, brightness, etc.

    The faster I kill this laptop, the sooner I get a new one...indecision

    night render test 2a.jpg
    1005 x 881 - 243K
    Post edited by The Blurst of Times on
  • Oso3DOso3D Posts: 14,878

    Oh, also a little desaturation, since night vision is black and white, so in low light our vision loses a lot of color.

     

  • tl155180tl155180 Posts: 994
    edited November 2015

    Oh my God, Tobor! I think I love you! heart

    I've always loved the soft lighting effect you can get from camera-mounted mesh/plane lights but always found that the reflections it caused in character's eyes or on glass meant that I could never really use it. It never occurred to me for one minute that the light emission would remain unchanged if you lowered the mesh's opacity to 0.0001!

    It is no exaggeration to say that these tips are going to completely revolutionize the way I render in the future and probably save me tonnes of time in the process. I can't thank you enough! laugh

    Just wish I'd seen this thread sooner... it really needs to be stickied or something.

    Post edited by tl155180 on
  • tl155180 said:

    Oh my God, Tobor! I think I love you! heart

    I've always loved the soft lighting effect you can get from camera-mounted mesh/plane lights but always found that the reflections it caused in character's eyes or on glass meant that I could never really use it. It never occurred to me for one minute that the light emission would remain unchanged if you lowered the mesh's opacity to 0.0001!

    It is no exaggeration to say that these tips are going to completely revolutionize the way I render in the future and probably save me tonnes of time in the process. I can't thank you enough! laugh

    Just wish I'd seen this thread sooner... it really needs to be stickied or something.

    Same thing for me ! smiley yes

    Thx Tobor

Sign In or Register to comment.