POV-Ray : Newsgroups : povray.windows : some question about windows cmd : Re: some question about windows cmd Server Time
25 Apr 2024 23:21:50 EDT (-0400)
  Re: some question about windows cmd  
From: 944291641
Date: 2 Apr 2018 08:00:03
Message: <web.5ac1e10247c4fa63806aef8c0@news.povray.org>
Alain <kua### [at] videotronca> wrote:
> Le 18-04-01 à 11:30, Bald Eagle a écrit :
> > "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=41
6151
> >
> >
> > 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.
> >
> >
>
> eval_pigment() return the raw value of the pigment at a specific point.
> It can't take illumination into account.
>
> To tell is some point on some object is lit or not, you need to take
> that onject, bind it with every other objects in your scene, trace from
> the light's location toward the object.
> Now, you need to see if the trace hit your object, or some other
> intervening object. That mean comparing the result returned by the
> trace() with the actual location of your object.
>
> Any transparent object can intercept the trace, so, the fully
> transparent objects need to be removed.
> If you have an object that is transparent in only some of it's part, or
> is partially transparent due to a filtering or transmiting texture,
> then, you need to identify that object and do another trace from just
> past that object onward IF you hit a transparent part.
Thank you for your advice, I will try it as soon as possible.
Thank you again. :)


Post a reply to this message

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