POV-Ray : Newsgroups : povray.beta-test : AOI pattern Server Time
7 Jul 2024 06:46:37 EDT (-0400)
  AOI pattern (Message 1 to 10 of 16)  
Goto Latest 10 Messages Next 6 Messages >>>
From: Christian Froeschlin
Subject: AOI pattern
Date: 14 Apr 2009 16:58:56
Message: <49e4f910$1@news.povray.org>
I recently ported Mael's AOI pattern from MegaPOV to 3.7, see

http://news.povray.org/povray.binaries.images/thread/%3C49d1171e@news.povray.org%3E/

It was rather straightforward and should not cause any trouble,
although it does increase the size of the class "Intersection"
by one 3d vector (ray direction at intersection point).

1. Is there interest to include this in 3.7?

2. If yes, would you like me to provide a diff, or modified
    beta 31 sources (available now), or modified beta 32 source
    files (I would merge them after the windows sources for 32
    become available).

3. If yes, are there licensing issues involved? I suppose
    MegaPOV contributions are intended for ending up in POV-Ray
    when they become popular anyway, but I didn't find anything
    regarding this in the MegaPOV help file.

As an aside, it was noted that the AOI pattern as well as the slope
pattern do not react to transformations in an intuitive manner (the
directional component remains unchanged by the transformation). As
far as I can see, fixing this would require significant changes to
the way patterns are evaluated. But then, of course, I just had a
one day dive in the code before packing for easter holidays ;)


Post a reply to this message

From: Warp
Subject: Re: AOI pattern
Date: 14 Apr 2009 17:17:16
Message: <49e4fd5c@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> As an aside, it was noted that the AOI pattern as well as the slope
> pattern do not react to transformations in an intuitive manner (the
> directional component remains unchanged by the transformation).

  I can understand why it would be desirable for the slope pattern to
be transformed regularly with the texture transformations because the
slope pattern is not view-dependent, but local to the object space.
(For example, if you apply a slope pattern to a heightfield to eg.
make a snow/ground texture, you probably want it to look the same
even if you rotate the heightfield, as if the slope pattern was a
regular texture applied to the heightfield.)

  However, angle-of-incidence is *by definition* a view-dependent pattern.
In other words, it changes depending on where the object is looked from.
That's the very definition of "angle of incidence".

  Thus I would expect for it to work always the same way regardless of
how the object is transformed. In other words, I expect it to solely
depend on the viewing direction (with respect to the normal of the
surface), not the orientation of the object.

  AOI is used, for example, to simulate a scanning eletron microscope,
which produces a peculiar pattern which depends on the angle of incidence
of the viewing rays. If the object is rotated, I would still expect it
to depend in this angle of incidence in the same way, rather than the
"pattern" rotating with the object is if it was a texture attached to it.

-- 
                                                          - Warp


Post a reply to this message

From: Edouard
Subject: Re: AOI pattern
Date: 14 Apr 2009 21:20:00
Message: <web.49e535f61145890973e4b1460@news.povray.org>
Christian Froeschlin <chr### [at] chrfrde> wrote:
> I recently ported Mael's AOI pattern from MegaPOV to 3.7, see
>
> http://news.povray.org/povray.binaries.images/thread/%3C49d1171e@news.povray.org%3E/
>
> It was rather straightforward and should not cause any trouble,
> although it does increase the size of the class "Intersection"
> by one 3d vector (ray direction at intersection point).
>
> 1. Is there interest to include this in 3.7?

I'd absolutely like to see it! Thank-you again for the work.

Cheers,
Edouard.


Post a reply to this message

From: Edouard
Subject: Re: AOI pattern
Date: 14 Apr 2009 21:25:00
Message: <web.49e536e11145890973e4b1460@news.povray.org>
Warp <war### [at] tagpovrayorg> wrote:
> Christian Froeschlin <chr### [at] chrfrde> wrote:
> > As an aside, it was noted that the AOI pattern as well as the slope
> > pattern do not react to transformations in an intuitive manner (the
> > directional component remains unchanged by the transformation).
>
>   I can understand why it would be desirable for the slope pattern to
> be transformed regularly with the texture transformations because the
> slope pattern is not view-dependent, but local to the object space.
> (For example, if you apply a slope pattern to a heightfield to eg.
> make a snow/ground texture, you probably want it to look the same
> even if you rotate the heightfield, as if the slope pattern was a
> regular texture applied to the heightfield.)
>
>   However, angle-of-incidence is *by definition* a view-dependent pattern.
> In other words, it changes depending on where the object is looked from.
> That's the very definition of "angle of incidence".
>
>   Thus I would expect for it to work always the same way regardless of
> how the object is transformed. In other words, I expect it to solely
> depend on the viewing direction (with respect to the normal of the
> surface), not the orientation of the object.

I agree with you in principle.

On the other hand, people often find innovative uses for features in other
situations than the primary intended one. It's a shame to reduce creative
possibilities for that kind of experimentation.

On the other other hand, if it's hard to make it more general, I'm completely
happy for it to act as it does now - it's utility is obvious from the usage the
feature has received in Megapov. Better in for 95% of use-cases, than out for
100%.

Cheers,
Edouard.


Post a reply to this message

From: stbenge
Subject: Re: AOI pattern
Date: 14 Apr 2009 22:58:04
Message: <49e54d3c@news.povray.org>
Christian Froeschlin wrote:
> 1. Is there interest to include this in 3.7?

You can guess my answer ;)

It would be cool if you could change a certain value for the pattern. 
Something like "reference = some vector" to change where the pattern 
"points" to, if that's possible.

But that is wishful thinking. MegaPOV's AOI implementation, included 
into 3.7, would be very good. Very good indeed :)

Sam


Post a reply to this message

From: Carlo C 
Subject: Re: AOI pattern
Date: 15 Apr 2009 03:30:01
Message: <web.49e58c1511458909cbb6f0d40@news.povray.org>
"Edouard" <pov### [at] edouardinfo> wrote:
> Christian Froeschlin <chr### [at] chrfrde> wrote:
> > I recently ported Mael's AOI pattern from MegaPOV to 3.7, see
> >
> >
http://news.povray.org/povray.binaries.images/thread/%3C49d1171e@news.povray.org%3E/
> >
> > It was rather straightforward and should not cause any trouble,
> > although it does increase the size of the class "Intersection"
> > by one 3d vector (ray direction at intersection point).
> >
> > 1. Is there interest to include this in 3.7?
>
> I'd absolutely like to see it! Thank-you again for the work.
>
> Cheers,
> Edouard.

Yes.
*Clipka, where are you?* :-)

--
Carlo


Post a reply to this message

From: Christian Froeschlin
Subject: Re: AOI pattern
Date: 15 Apr 2009 06:58:17
Message: <49e5bdc9$1@news.povray.org>
stbenge wrote:

> It would be cool if you could change a certain value for the pattern. 
> Something like "reference = some vector" to change where the pattern 
> "points" to, if that's possible

But the aoi pattern supports this already??? From
the MegaPOV reference: "pigment { aoi [ POINT ] ...}".
Of course, if you specify the point it is not really
an "angle of incidence" for the incoming ray, so the
direction remains fixed even for reflected rays.


Post a reply to this message

From: Christian Froeschlin
Subject: Re: AOI pattern
Date: 15 Apr 2009 07:40:59
Message: <49e5c7cb$1@news.povray.org>
Warp wrote:

> However, angle-of-incidence is *by definition* a view-dependent pattern.
> In other words, it changes depending on where the object is looked from.
> That's the very definition of "angle of incidence".

Yes, for the version without a fixed point I'd expect that too,
but you can also specify a reference point which is then related to
the geometry similar to slope. Anyway it would have to be optional
for compatibility with 3.6 (slope) and MegaPOV (aoi). Maybe reuse
the transform keyword: pigment {aoi <5,5,5> transform ...} to
indicate the pattern should be affected by transformations,
only valid for slope and aoi.

Regarding the implementation, I had another look at it and it may
not be so terrible after all: Both the incident ray direction (aoi)
and the surface normal (slope) are already passed to Evaluate_TPat
via the intersection object (although untransformed), and the
information about the transformation should be contained in the
TPATTERN* if I read it correctly, so only local changes in the
pattern function should be required to warp the vectors.


Post a reply to this message

From: Lukas Winter
Subject: Re: AOI pattern
Date: 15 Apr 2009 12:38:10
Message: <49e60d72$1@news.povray.org>
Am Tue, 14 Apr 2009 17:17:16 -0400 schrieb Warp:
> 
>   However, angle-of-incidence is *by definition* a view-dependent
>   pattern.
> In other words, it changes depending on where the object is looked from.
> That's the very definition of "angle of incidence".
> 
>   Thus I would expect for it to work always the same way regardless of
> how the object is transformed. In other words, I expect it to solely
> depend on the viewing direction (with respect to the normal of the
> surface), not the orientation of the object.

Because of this I would expect angle-of-incidence-depenedent shading to 
reside in a finish block rather than being a pattern.
Just my 2 euro-cents...


Post a reply to this message

From: clipka
Subject: Re: AOI pattern
Date: 15 Apr 2009 16:10:00
Message: <web.49e63e2e11458909255d1edc0@news.povray.org>
"Carlo C." <nomail@nomail> wrote:
> > I'd absolutely like to see it! Thank-you again for the work.
> >
> > Cheers,
> > Edouard.
>
> Yes.
> *Clipka, where are you?* :-)

Here! Wazzup?

Pure surprise that there's a thread I haven't yet posted to? :P

I hope you don't expect me to do *all* the work on POV 3.7 - if the code already
exists, there's basically no reason for *me* to get involved. Just contact Chris
Cason about it - becoming a code contributor is actually quite easy ;) (*hint!*)


Post a reply to this message

Goto Latest 10 Messages Next 6 Messages >>>

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