Page 1 of 1

How to separate Environment and Object Reflection ?

Posted: Fri May 31, 2019 4:43 pm
by fantome
Hi guys,

I need to separate the following pass :
- Scene Object Reflection
- Scene Object Refraction
- Environment Reflection
- Environment Refraction

The goal is to be able to get control over them in compositing, because i need to reduce Object reflection/refraction to 30% but keep 100% of environment reflection/refraction for a retake on a project.

What looks to be a simple problem turn to be a huge chinese puzzle. I have try to play with render passes, object layer map etc ... and i can't solve the problem in an elegant way.

For the moment the best solution i have find is to use object visibility and light linking.
But i need to output 4 additional pass to make it work , and the result is still not perfect.
I would like to know what would be the most elegant way to solve this problem in Octane ?

Here are some test image and a simple test project i use.
reflection.zip
(3.33 MiB) Downloaded 210 times
beauty.png
object_pass_part1.png
object_pass_part2.png
env_pass_part1.png
env_pass_part2.png
Thanks for your Lights !
Cheers
E

Re: How to separate Environment and Object Reflection ?

Posted: Sat Jun 01, 2019 3:31 pm
by fantome
Well after banging my head against the wall, it looks that in that scenario, you just can't break the wall, and accept to live beyond the wall.

There are no way to separate reflection ray in octane, whatever you do an object will be visible in reflection / refraction.
self.PNG
You won't be able to just get environment reflection alone, you will always have self reflection / refraction.

If you need a clean environement pass no choice, you had to compute it in an external render engine, and composite it on top of your octane pass.

Octane is a dream to work with ... until you get client ( biased) request ! Doing biased thing in an unbiased engine can easily start to be a nightmare.
Unbiased is a beautiful logic, shame that clients are biased people ... ;)

Re: How to separate Environment and Object Reflection ?

Posted: Mon Jun 03, 2019 1:58 pm
by paride4331
Hi fantome,
It could help you.
viewtopic.php?f=21&t=71597&p=363054&hilit=osl#p362867
Regards
Paride

Re: How to separate Environment and Object Reflection ?

Posted: Mon Jun 03, 2019 2:24 pm
by fantome
Thanks a lot paride4331 !
This post is extremely interesting, and the test scene looks to illustrate the miracle i was desesperatly expecting.

I will play with this and post an exemple scene if i suceed to achieve what i need.
Just by pure curiosity is there any API or official doc that explains all the feature and functions available in .OSL implementation.

Re: How to separate Environment and Object Reflection ?

Posted: Mon Jun 03, 2019 3:49 pm
by fantome
With your tricks i am able to get a clean environment reflection / refraction pass
reflect.PNG
I have attach the scene
reflection.zip
(2.65 MiB) Downloaded 202 times
what i can't get is a direct object reflection / refraction pass, cause i can't tell to octane
- compute the object reflection and refraction that need the environment to exist
- but don't add the reflection / refraction created by the environment in the final image

Re: How to separate Environment and Object Reflection ?

Posted: Tue Jun 04, 2019 10:15 am
by paride4331
Hello fantone,
check alpha channel option in Kernel panel and specular materials you're using.
Regards
Paride

Re: How to separate Environment and Object Reflection ?

Posted: Tue Jun 04, 2019 4:50 pm
by frankmci
fantome wrote: Just by pure curiosity is there any API or official doc that explains all the feature and functions available in .OSL implementation.
This may be what you are looking for.

https://docs.otoy.com/osl/

Re: How to separate Environment and Object Reflection ?

Posted: Tue Jun 04, 2019 8:11 pm
by fantome
@paride4331 Thank you i will double check that.

@frankmci Thank you i didin't know this documentation looks very interesting.


Well i have a good enough solve thanks to your suggestion.
- you need to output reflection / refraction render passes (scene_reflect, scene_refract)
- you need an environment only reflection / refraction render passes with the help of the OSL shader (env_reflect,env_refract)

then you get output = mix( scene_reflect, env_reflect, % ) + mix( scene_refract, env_refract, % ).

EDIT :
unfortunatly this only works for reflection the ray contribution OSL doesn'' t work with refraction, the env map is inverted and at a different location.