View Full Version : mib_ambient_occlusion light shader
hi guyz
unfortunately since a week I dont get any reaction from the admins of lamrug concerning my registration... so I try to ask here.
I checked the occlusion tutorial from their site
http://www.lamrug.org/resources/doc/occlusion_tutorial.pdf
and I guess that theres a missing shader graph about the issue mentioned in title on page 4.
could someone enlight me about the "noobs" details like:
what kind of light is a "user type light"?
where shall I connect the mib_amb_occlusion shader in?
thank u very much for the information.
| |
victor
07-17-2006, 01:20 PM
That's interesting. You can plug the AO texture into the light shader slot in the mental ray attributes for the light. I've actually tried that before, but the problem is that normally, it only shades the side facing the light.
The "user" setting sort of fixes that. It's in the mental ray area light settings.
One problem remains though, and that's that it seems to use both sides of the surface, so for example, a single surface plane renders differently than a flattened box. I'd love to know if you find a way around that.
Below, the left side is a plane, and the right is a box...
http://img56.imageshack.us/img56/1345/aolightor5.png
first of all: reproduced your effect...
the standard maya lambert is assigned to the box and the plane.
ok lets check it out.
EDIT: changed the maya lambert to mib_illum_lambert and the issue disappeared (sure, the lights where properly linked first). I used a directional light for shadows only and a point light as AO carrier. :shrug:
victor
07-17-2006, 07:45 PM
Now try sticking a sphere or something below that plane, and you'll see that it's being occluded from both sides. The reason the other objects are working is their other sides are fully occluded (which might not be the case if you use a max distance).
I can't imagine why it should behave this way. Maybe one of the MR experts could explain why it would do this? It seems like a bug.
Now try sticking a sphere or something below that plane, and you'll see that it's being occluded from both sides. The reason the other objects are working is their other sides are fully occluded (which might not be the case if you use a max distance).
I guess - this is not a bug. AO is not a matter of light but the distance of objects in the scene to each other (am I right???) so the plane actually does not cause a shadow on the sphere while somehow cutting the sphere. so u should get the effect above and under the plane. and it doesn't matter where the light is placed in the scene... unless u have turned the shadows of that light on... what is not really recommanded... its somewhere in the manual (i guess).
victor
07-17-2006, 09:29 PM
so u should get the effect above and under the plane.OK, but my point was that I can't see any reason why this would work differently than when using the AO as a texture in a material.
When used in a material, I get samples taken only on the sides of surfaces that I can see. When used in a light, I get samples taken even on the back sides of surfaces, which I'd only expect if I were using translucent materials.
BTW, I should have mentioned that the solution I came up with previously is to attach the AO texture to the color slot of a light, and then attach the light to the camera, so that its position means that you never see the part of the object that isn't affected. Of course, the drawback is when you can see those parts in reflections.
http://img464.imageshack.us/img464/5679/wirels5.png
http://img464.imageshack.us/img464/8021/shadeot3.png
http://img69.imageshack.us/img69/8061/persptl1.png
Edit: Sorry, I didn't notice your edit...
changed the maya lambert to mib_illum_lambert and the issue disappeared (sure, the lights where properly linked first).See, that's exactly why I suggested it's a bug. Why should it work differently with Maya and mental ray's lambert shaders? The MR version works as I'd expect. When the camera sees a surface, it evaluates the AO at that point and uses the color for an ambient light. What's on the other side should be irrelevant.
OK, but my point was that I can't see any reason why this would work differently than when using the AO as a texture in a material.
When used in a material, I get samples taken only on the sides of surfaces that I can see. When used in a light, I get samples taken even on the back sides of surfaces, which I'd only expect if I were using translucent materials.
well I'm afraid, but i dont get u in all parts... the picts u'r showing are about light as a "carrier" of the AO shader, right?... the strange thing is u dont have any "samples" on the back side.... but u say - "u take the samples even on the back sides"... which otherway I would expect.... so hmmm - i'm a little confused...
actually I dont really understand why maya lambert behaves differently than the mr shader... may be - MASTA ZAP!! mayday, mayday.
secondly... my logic says that there must be a difference between AO via Light an AO as an ambient shader on an object... using light AO is sampled from the whole scene, from every object, from any "whistle and bell". so if a camera sees a reflection of the backside, it should be visible in the mirror. as a material shader its sampled only from the material applied - ehrm... but it should be visible in reflections too... however.
my light settings are (except for the mr part): illuminate by default and diffuse on. speculars off, no shadows... and I dont lock it to a camera.. just place it somewhere in the scene... where I can easily catch it for tweaks if needed... and sure default lights are off in the render settings
otherway (i didnt concern it in the statement above) turning the area light on - area "soft" shadows are sampled... well the whole issue is still a white spot (ok its getting greysh...) on my road map... but i still dont understand why u have no diffuse on the backside of the ball with such a hard transition...
another challenge is to get the "light" shading network working useing the "bent_normals shader".
but - I'll check your issue about the AO in reflections... there is something about that in the tutorial pdf.
I still dont undrstand why lamrug is so lame or restrictive to give access to their forums...
Ash-Man
07-18-2006, 05:20 PM
this issue seems very close to something I had before
when backing AO , it didn't bake the faces in the oppsite dir of the camera
then i found the magic button ...orthographic ON
I know it's not an answer but might be a lead
CGTalk Moderation
07-18-2006, 05:20 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2009, Jelsoft Enterprises Ltd.