Jump to content

Constant Opacity


Macha

Recommended Posts

I have a bunch of polygons overlapping and stacked behind each other. (think leaves on a tree or something like that)

When I render this with a point alpha value I get a kind of layered opaque effect -as expected.

However, I want the visual effect opacity to be of a constant value (a bit like a constant shader). How can I do that on a per-object basis and with the micropolygon renderer?

Link to comment
Share on other sites

For naive cases you could just render out the alpha buffer with the sampling set to "closest", not "opacity". See attached.

This approach breaks quite easily though, e.g. alpha of any object behind these will have their alpha discarded..

So you would still want the color channels to have the opacity stacking behaviour, according to the point alphas, but do you want them to blend with the other geometry in the render according to their correct opacity or just the "fake" uniform opacity? Or do you just want to have the "fake" alpha for compositing?

ee_alpha.hip

Link to comment
Share on other sites

hi ,

i tried with the rayhit and this is what i got :

pic 1 - the Constant1 node has a value of 0.25 which is sent nonadditively to opacity output

pic 2 - has a Constant node set to color type

pic 3 - has a Lambert node ( switchable with the above constant )

post-5487-131206440025_thumb.pngpost-5487-131206440832_thumb.pngpost-5487-131206441707_thumb.png

strangely in the pic 3 , the farthest primitive appears ( optically at least ) to be nearer . that's because of light's position ..

casting shadows over the geometry and changing light's position gave interesting but a bit strange results .

anyway here is the file ..

constantOpacity.hipnc

.cheers

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...