|
|
"944291641" <944### [at] qqcom> wrote:
> Recently I have encounter another question , could you give me a hand?
>
> I build a scene which contains some trees, and I want calculate the area of the
> sunlit leaf and the shaded leaf. For that I am a Pov-Ray beginner, I don't know
> if there is any functions that can achieve this goal.
Do you need to calculate that for ALL the leaves in a scene, or just one?
You could probably render a single leaf, with a fairly artificial setup that
gives a certain color of final rendered pixel for lit, a certain color for
unlit, and a distinct background color (I'd go with transparent).
Then you could scan and count the pixels of the different colors.
Sorta like this:
http://news.povray.org/povray.binaries.images/thread/%3Cweb.58cfc0cf857600e8c437ac910%40news.povray.org%3E/?mtop=416151
POV-Ray has internal processes that count ray-object intersections, and there is
also trace () and eval_pigment ().
Perhaps there's a way to determine how much total leaf area there is, how much
is directly lit, and then subtract lit from total.
Post a reply to this message
|
|