Macha Posted July 30, 2011 Share Posted July 30, 2011 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? Quote Link to comment Share on other sites More sharing options...
Adam Ferestad Posted July 30, 2011 Share Posted July 30, 2011 So you are trying to get the total opacity, no matter the number of overlapping objects, to never go above a certain value, say, .5? So each object would contribute .1 to the alpha, then after 5 they wouldn't contribute any more? Quote Link to comment Share on other sites More sharing options...
eetu Posted July 30, 2011 Share Posted July 30, 2011 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 Quote Link to comment Share on other sites More sharing options...
zarti Posted July 30, 2011 Share Posted July 30, 2011 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 ) 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 Quote Link to comment Share on other sites More sharing options...
Macha Posted July 31, 2011 Author Share Posted July 31, 2011 That's quite clever Zarti. I like it, thanks. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.