Jump to content

Ambient Occlusion for a Closed Environment?


Recommended Posts

Hello everyone,

Anyone has any idea that what is the best way to get AO from a closed space that lights can't pass trough?

Imagine a room without any windows. If I put a light inside the room the result will be shadows instead of AO. And If I put an ENV light, it will be black unless I un-check the casting shadows which it makes everything white.

Thanks

 

Link to comment
Share on other sites

You could use Occlusion VOP in your surface material. Remember to change max distance from -1 to something close to an interior size (otherwise every ray hit will be treated as an occlusion == black render). Also Background color has to be set to 2.0.

  • Like 1
Link to comment
Share on other sites

7 hours ago, symek said:

You could use Occlusion VOP in your surface material. Remember to change max distance from -1 to something close to an interior size (otherwise every ray hit will be treated as an occlusion == black render). Also Background color has to be set to 2.0.

I am pretty new in Houdini.

Where do I have to connect the Occlusion VOP to? and also how do I get it out in my passes? any special setting do I have change in my render settings?

Link to comment
Share on other sites

2 hours ago, 6ril said:

the answer to all those questions would be writing a part of the software doc !

I suggest you start with the basics, tuts on sidefx etc...

the question might be basic but I can't spend like months to read all the docs now to find the answer. My scene is ready to render so I thought maybe there is an easy and quick method to do it, specially because the situation in my scene is something unusual as the space is a closed space.

I am learning Houdini, and asking a question here doesn't mean I don't google things or I don't look at the Houdini docs.

Thanks anyway

Link to comment
Share on other sites

didn't know you got a scene ready, and re-reading myself now, I sound a little harsh, sorry about that.

are you comfortable with mantra shader building/modifying ? render aovs ?

Can't really help you now, and I haven't used mantra for like a year now, but I'm sure someone will help you, implementing AO shouldn't be a big pb.

 

Link to comment
Share on other sites

5 hours ago, 6ril said:

didn't know you got a scene ready, and re-reading myself now, I sound a little harsh, sorry about that.

are you comfortable with mantra shader building/modifying ? render aovs ?

Can't really help you now, and I haven't used mantra for like a year now, but I'm sure someone will help you, implementing AO shouldn't be a big pb.

 

no problem man, I totally understand you and I know that my question is something that soppose to be simple. but I just can't get it right!

I am ok to modify the shaders but not like a pro, cuz I came from 3ds max and Maya background.

I can get the AO right for any objects. but when I have the objects inside another objects, everything will be black.

Link to comment
Share on other sites

3 hours ago, f1480187 said:

In Houdini 16 set material flag on the Occlusion node placed inside /mat context and use it as the material. To make the same in SHOPs, drop Material Shader Builder and connect Occlusion to Cf.

occlusion.hipnc

Thank you for your help, I don't have access to Houdini 16 and I am working with houdini 15.5. I have opened your file and it is not giving me the AO.

I have actually tried this way and couldn't get an AO from it. I have tried many methods from yesterday and non of them works for me. specially when I have an objects inside a closed object. (I know your example is like that also but it doesn't work for me :| )

Link to comment
Share on other sites

@soroush it does work, but I guess since it comes from H16, you loose the material tab on the box object. So get inside box1, add a material node at the end, and select the /shop/vopmaterial1. Don't forget to put the display flag on that new node ;)

that's it, just hit render and see the occlusion, you can then play with the param of the occlusion node in Shop

max ray distance : the spreading of the occlusion

background color : intensity of the "light"

 

Link to comment
Share on other sites

2 hours ago, 6ril said:

@soroush it does work, but I guess since it comes from H16, you loose the material tab on the box object. So get inside box1, add a material node at the end, and select the /shop/vopmaterial1. Don't forget to put the display flag on that new node ;)

that's it, just hit render and see the occlusion, you can then play with the param of the occlusion node in Shop

max ray distance : the spreading of the occlusion

background color : intensity of the "light"

 

It is working now! I do remember I have tried it before and was not working!

I have created a new scene with a new shader yesterday, same as what you did and was nor working!

gonna try it in my scene now. Thanks a lot Cyril!

Link to comment
Share on other sites

1 hour ago, anim said:

what do you mean? Diffuse shader and env light, then tweak the distance to be small enough, that should work

I am not sure, cuz when I tried with ENV light it does give me a black result because it is a closed environment,  so there is not any place for the ENV light to pass trough my space.

Link to comment
Share on other sites

2 hours ago, anim said:

you are misunderstanding what Env Light in AO Mode does, just try what I said, or just look at this file

AO_light_inside.hip

OH! I got it now!

I think the problem that I was keep getting black result was that the number of Max RA Distance was too high by defult.

Thanks Man! That is working now!

Cyril Method works also!

Link to comment
Share on other sites

6 hours ago, 6ril said:

@soroush it does work, but I guess since it comes from H16, you loose the material tab on the box object. So get inside box1, add a material node at the end, and select the /shop/vopmaterial1. Don't forget to put the display flag on that new node ;)

that's it, just hit render and see the occlusion, you can then play with the param of the occlusion node in Shop

max ray distance : the spreading of the occlusion

background color : intensity of the "light"

 

I know it is stupid! the problem that I was always getting the black result was that I didn't change the background color and it was always Black so it was not generating any lights!

Thanks man. Everything works great now!

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...