Author Topic: How to render object visible in reflections only ?  (Read 505 times)

Offline shadow92

  • Member
  • *
  • Posts: 27
How to render object visible in reflections only ?
« on: June 20, 2017, 08:24:23 PM »
Hi folks,
my question is pretty straightforward - how to render a scene where the object itself is invisible but casts its refelctions (on water surface)?
My scene consists of lake and obj mesh with texture.
I tryed setting my object either to "invisible" or "holdout" with visible to other rays and cast shadows ON. I also tryed to set-up the same thing via render layers, but the result is always reflections being pitch black with no texture.
Any ideas?
And also, just to not start another thread, is there a shader that can display texture flat without the light having impact on it? something like surface shader in maya.
Thanks for any help in advance! :)

Offline Dune

  • Member
  • *
  • Posts: 12712
  • Corkscrew Bird
    • www.ulco-art.nl
Re: How to render object visible in reflections only ?
« Reply #1 on: June 21, 2017, 06:41:43 AM »
It should work, unless there's something wrong with invisible just like there is with holdout in v4. I tested this on an earlier version. I used this method here http://www.planetside.co.uk/forums/index.php/topic,21304.msg214776.html#msg214776 as well (guy on machine).

Flat texture with no sun; I'd say, turn off the sun and use a lot of Global Illumination. There's no specific shader to do that. What's the purpose?
In case you still haven't seen enough of my work: www.ulco-art.nl

Offline shadow92

  • Member
  • *
  • Posts: 27
Re: How to render object visible in reflections only ?
« Reply #2 on: June 21, 2017, 08:27:08 AM »
It should work, unless there's something wrong with invisible just like there is with holdout in v4. I tested this on an earlier version. I used this method here http://www.planetside.co.uk/forums/index.php/topic,21304.msg214776.html#msg214776 as well (guy on machine).

Flat texture with no sun; I'd say, turn off the sun and use a lot of Global Illumination. There's no specific shader to do that. What's the purpose?
Thanks for the link, i will definitely check it out.
The purpose of the shader is that Im using the mesh to project my matte painting on to it, so I can catch it in the water reflections as it is, withou the lights impact (it would create additional highlights/shadows based on mesh shape, that are not needed). Its no really neccesary, as the reflections are looking pretty good as it is, I was just curious, since in Maya has a specific shader for this purpose

Offline Hannes

  • Member
  • *
  • Posts: 3572
Re: How to render object visible in reflections only ?
« Reply #3 on: June 21, 2017, 01:51:47 PM »
Just a thought: if you put your diffuse map into the luminosity slot as well, and increase the luminosity strength to 1, you'll get some sort of a flat shading. Is that what you mean?
As you can see in the image below, the second sphere still gets some shadow from the other sphere. You may increase the luminosity value to get rid of the shadow (not completely), but that of course influences the GI as well. Not perfect, but maybe a step into the right direction...

Offline Hannes

  • Member
  • *
  • Posts: 3572
Re: How to render object visible in reflections only ?
« Reply #4 on: June 21, 2017, 02:03:20 PM »
...and as Ulco said, checking "invisible" does exactly what you want. No idea, why it didn't work for you...  ???

Offline shadow92

  • Member
  • *
  • Posts: 27
Re: How to render object visible in reflections only ?
« Reply #5 on: June 21, 2017, 05:24:38 PM »
Yeah I see. Comparing the latest renders I still see significant difference in the reflections. I guess we coul tell the reflections are there, but they are significantly darker when set to Invisible, check it out:



Offline Matt

  • Planetside Staff
  • *
  • Posts: 2840
  • I'm the crazy one
Re: How to render object visible in reflections only ?
« Reply #6 on: June 22, 2017, 12:41:11 AM »
If it's a diffuse surface, not a self-luminous (emissive) surface then it could be due to GI, or a lack of GI. Sometimes surfaces that are not directly visible to the camera don't catch GI in the GI cache, and then they render darker in reflections. If this is the cause, you can fix it by writing out a GI cache file from a render where the object is visible, and then reading that for the water render.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Offline Matt

  • Planetside Staff
  • *
  • Posts: 2840
  • I'm the crazy one
Re: How to render object visible in reflections only ?
« Reply #7 on: June 22, 2017, 12:50:10 AM »
To your second question, use a Default Shader, set its diffuse colour to 0 and set luminance to 1, then either select an image for the luminosity image or plug a shader into the luminosity function. That will also solve the GI problem because it won't respond to GI at all.

Matt
Just because milk is white doesn't mean that clouds are made of milk.