POV-Ray : Newsgroups : povray.windows : some question about windows cmd : Re: some question about windows cmd Server Time
25 Apr 2024 13:59:06 EDT (-0400)
  Re: some question about windows cmd  
From: 944291641
Date: 2 Apr 2018 08:00:02
Message: <web.5ac1dfda47c4fa63806aef8c0@news.povray.org>
"Bald Eagle" <cre### [at] netscapenet> wrote:
> "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=4161
51
>
>
> 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.
Thanks for your reply!
What I need is to cal the number of lit leaf pixels from the image rendered by
pov-ray. I will try give it different color, thank you very much.


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.