PDA

View Full Version : Ambient occulsion shader that detects transparency


Creator
03-27-2007, 06:05 PM
hey is there a ambient occlusion shader that detects transparency?

nisus
04-04-2007, 02:37 PM
I don't know, but i could use it as well...

nisus

nisus
04-30-2007, 09:37 AM
no one?

nisus

matt
05-01-2007, 03:12 AM
jeremy pronk's toLight shaders do this:

http://www.thereisnoluck.com/plugins_toLight.php#

i was under the impression that the fg-amboc handles this too (i'm sure i saw a screenshot of this somewhere), never got it to work myself. maybe the new mia_architecture shaders work, but i've not had time to test this yet.

matt

mmikee
05-01-2007, 04:42 PM
Just curious as to what this would be used for. Do you just need a clean alpha ?

Regards,
Mike

photons
05-02-2007, 07:11 AM
I hide the transparent material and render...and it works just fine...m i missing something...:D

mmikee
05-02-2007, 06:14 PM
I hide the transparent material and render...and it works just fine...m i missing something...

This is what I do as well.

nisus
05-03-2007, 04:00 AM
I apply a multi-sub material in the material override with an AO and 'nothing' material. In all our projects, all transparant objects always have the same IDs. Pretty convient this way...

nisus

moid
05-14-2007, 05:17 PM
Nisus, would you mind expanding on that technique please? I'm looking for a way to get AO to work with flat planes that have images of leaves on them with alpha around the leaf. At present the 'invisible' alpha parts of the leaf also pickup AO shading when I use AO in the material override and I wondered if there is a global technique for forcing AO to respect transparency of objects? Or even a per material basis if it has to be, but global would be better. Thanks.

nisus
05-18-2007, 07:42 PM
Hi Moid,

I'm looking for a way to get AO to work with flat planes that have images of leaves on them with alpha around the leaf.

As far as I'm aware of, this is not possible... I'm looking for the same kind of solution (to use with our Xfrog tree collection)... Keep me informed if you find anything, pls.

rgds,

nisus

moid
05-20-2007, 03:38 PM
Aha, I (kind of) have a solution. After visitng your country over the weekend (great gig in Brussels, Heavenhotel rules!) I had a brainwave! AO can't or won't consider alpha when calculating (not even the lovely A&D shader can do it, sniff) so we need to fake the AO effect!

Put a standard material (or A&D) that is completely white and matt and has an alpha bitmap in the opacity slot onto the leaf objects. Add a skylight to the scene, set it to pure white. Hide everything that does not need to be in this 'fake' AO pass. Turn on FG, set bounces to 0, set FG points to at least 150 I think, preferably more. Render and the skylight and FG will create all the AO shadows for you and it respects the alpha!!!:D Only bad part is I can't figure out how to control the size of the AO or how sharp or blurry it is - it's always soft. However this does seem to work well on leaves, which are translucent usually and let some light through, thus creating weaker and softer AO than a solid structure would.

Just render the fake AO pass and add it in your compositor in multiply mode exactly as you would add a normal AO pass.

Enjoy!

Kameleon
05-22-2007, 03:25 AM
It's possible to do AO with transparency with the A&D Material. I'll try to gather a video tutorial or a text one and I'll put it online.

hot chip
05-22-2007, 11:28 AM
hi,

i have try the p_MegaT Shader Version 3.1 from Pavel. This have in the ambient occlusions function a parameter for opacity, but it is donīt work on my computer. Have anywhere a solution?

@Pavel: What is wrong?

mfg
hot chip

moid
05-22-2007, 02:21 PM
It's possible to do AO with transparency with the A&D Material. I'll try to gather a video tutorial or a text one and I'll put it online.

Yes please, that would be very helpful because I've tried to make the A&D shader do this but have failed so far. Even a few screen grabs will do! Thanks:D

Creator
06-25-2007, 10:39 PM
Yah a tutorial on this would be most helpful

Puppet
06-26-2007, 01:20 AM
i have try the p_MegaT Shader Version 3.1 from Pavel. This have in the ambient occlusions function a parameter for opacity, but it is don´t work on my computer. Have anywhere a solution?

@Pavel: What is wrong?

What the problem? What you mean "it is don´t work"?
Please read carefully installation section in doc.
And you may download 3.1.1 version

hot chip
06-26-2007, 01:56 AM
ah ok i try it again :o

mafelix
08-30-2007, 08:23 AM
Just curious as to what this would be used for. Do you just need a clean alpha ?

Regards,
Mike

One use that comes to mind is when converting a paint effects plants, the leave have an alpha, but the leaves are a solid square shape, when rendering an occ pass you either have to exclude the leaves or put up with having a square occ shapes for leaves in your occ pass.


There is a write up on http://www.pixelcg.com/blog/?cat=3 about how to do it, Ive yet to try and test but sound plausible

Creator
01-13-2008, 11:53 PM
I just downloaded ctrl shaders but is there a function to detect transparency?

ramy
07-05-2008, 05:03 PM
You may want to try this solution:

Ambient Occlusion with Transparencies (http://3dsmaxrendering.blogspot.com/2008/07/ambient-occlusion-with-transparency.html)

http://bp2.blogger.com/_xx8nItOX5Ic/SG--LbJU1tI/AAAAAAAACJc/k5dHb5YiVM8/s320/aoTransparency04.jpg (http://3dsmaxrendering.blogspot.com/2008/07/ambient-occlusion-with-transparency.html)

moid
07-06-2008, 07:11 AM
Thanks Ramy that's exactly what I wanted, brilliant!:D

onedigitalartist
07-08-2008, 08:35 AM
question about this? why would you want AO on a plant? I looked at the tutorial a couple post up and there are area's on that tree that are dark where they wouldn't be that dark. leaves are translucent no? so they would never fully block light like you get with AO? wouldn't GI or FG be a better solution here? Idk what do you guys think (im no expert). lol

moid
07-11-2008, 03:02 PM
You want AO on a plant because plants made from quad poly leaves look very CG without AO. In the real world, leaves occlude the leaves below them, making those areas darker - this happens whether there is direct sunshine or overcast weather conditions. Yes, leaves are translucent, but this means they emit only a small fraction of the light they absorb - you can test this by standing near a backlit tree and making sure some leaves obscure the sun - result they appear to be quite bright green - move your head slightly and you can see the sun, ouch:D
That huge brightness change tells you that leaves are preventing most of the light from hitting your eyes and blinding you. Therefore leaves occlude. The same process can be applied to hair made from polygon sheets, it will now be possible to have this cast AO onto the head surface.

Here's a tree photo that hopefully explains the need for occlusion:

http://www.glaucus.org.uk/Windlesham001.jpg

ramy
07-11-2008, 03:06 PM
great photo example!

fellazb
07-14-2008, 02:17 AM
@Ramy,

Your blog is great! Thank you so much for sharing your solutions you've come up with.