POV-Ray : Newsgroups : povray.advanced-users : Lighted vs unlighted texture Server Time
22 Dec 2024 12:48:30 EST (-0500)
  Lighted vs unlighted texture (Message 1 to 10 of 13)  
Goto Latest 10 Messages Next 3 Messages >>>
From: Bald Eagle
Subject: Lighted vs unlighted texture
Date: 16 May 2017 12:40:00
Message: <web.591b2ade99969e41c437ac910@news.povray.org>
I was talking with Stephen about some scene elements,
and was wondering if there were a way to have directly lighted surfaces of an
object show one texture, and any unlighted / indirectly lighted surfaces have
another.

The obvious way would be to construct the object in 2 parts - split by a plane
the light source is perpendicular to, and assign each half a different texture.
Though I was hoping for something a bit more elegant, easier, and allowing a
smoother transition.


Post a reply to this message

From: clipka
Subject: Re: Lighted vs unlighted texture
Date: 16 May 2017 13:07:24
Message: <591b31cc$1@news.povray.org>
Am 16.05.2017 um 18:37 schrieb Bald Eagle:
> I was talking with Stephen about some scene elements,
> and was wondering if there were a way to have directly lighted surfaces of an
> object show one texture, and any unlighted / indirectly lighted surfaces have
> another.
> 
> The obvious way would be to construct the object in 2 parts - split by a plane
> the light source is perpendicular to, and assign each half a different texture.
> Though I was hoping for something a bit more elegant, easier, and allowing a
> smoother transition.

Depending on what exactly you want to achieve, maybe the slope pattern
is good enough for your purposes.


Post a reply to this message

From: Kenneth
Subject: Re: Lighted vs unlighted texture
Date: 16 May 2017 18:05:00
Message: <web.591b77376a9a8b37883fb31c0@news.povray.org>
Some hypothetical 'thought-questions':

1) What should happen if there are multiple light sources in the scene, coming
from different directions? One light will be filling in some of the shadow areas
produced by another light; in which case, what constitutes a true shadow?

2) Using only ONE light for simplicity's sake, and a spherical object, should
the 'fading light/shadow terminator' line on that shape be a continuous blend of
both textures, as the light 'disappears' into shadow around the side of the
sphere?

Off the top of my head, here are some (incomplete) thoughts about a possible
approach, when using only ONE light source-- and based on a 4-pass render!! The
scene is first rendered only in greyscale (with white pigments on everything.)
THEN the scene is rendered again with the FIRST real texture on all objects.
Then again with the SECOND real texture. At this point, you have three rendered
images.

The greyscale image is then run through POV-Ray again, using eval_pigment() to
get its grayscale values (1.0 for pure white, 0.0 for pure black, and all grey
values in-between.) Those values are somehow(!) used to pick which of the two
REAL-textured images to apply to a NEW re-rendered 2-D copy of the image, on a
pixel-by-pixel basis. Using lots of tiny flat boxes or polygon shapes for this.
(A function of some kind might be handy for doing this.) The 3-D scene is not
actually rendered again. In effect, this last step is just post-processing.
(I've actually done this for other kinds of scenes-- for example, to get a
pre-rendered image to explode into animated fragments.)

Actually, I can already see that this approach as-is would not produce the
correct *darkening* of the textures in the shadow areas. Maybe the eval_pigment
values could be used for that too.

--- Admittedly, this technique isn't much different from taking the three images
into Photoshop and using greyscale alpha masks to blend the images together.---


Post a reply to this message

From: Thomas de Groot
Subject: Re: Lighted vs unlighted texture
Date: 17 May 2017 03:00:11
Message: <591bf4fb$1@news.povray.org>
On 16-5-2017 18:37, Bald Eagle wrote:
> I was talking with Stephen about some scene elements,
> and was wondering if there were a way to have directly lighted surfaces of an
> object show one texture, and any unlighted / indirectly lighted surfaces have
> another.
>
> The obvious way would be to construct the object in 2 parts - split by a plane
> the light source is perpendicular to, and assign each half a different texture.
> Though I was hoping for something a bit more elegant, easier, and allowing a
> smoother transition.
>
>
>
>

Would aoi (angle of incidence) be the answer?

-- 
Thomas


Post a reply to this message

From: clipka
Subject: Re: Lighted vs unlighted texture
Date: 17 May 2017 06:15:00
Message: <web.591c22626a9a8b37350257320@news.povray.org>
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 16-5-2017 18:37, Bald Eagle wrote:
> > I was talking with Stephen about some scene elements,
> > and was wondering if there were a way to have directly lighted surfaces of an
> > object show one texture, and any unlighted / indirectly lighted surfaces have
> > another.
> >
> > The obvious way would be to construct the object in 2 parts - split by a plane
> > the light source is perpendicular to, and assign each half a different texture.
> > Though I was hoping for something a bit more elegant, easier, and allowing a
> > smoother transition.
> >
> >
> >
> >
>
> Would aoi (angle of incidence) be the answer?

No; `aoi` depends on the angle between the surface and the camera ray.


Post a reply to this message

From: Thomas de Groot
Subject: Re: Lighted vs unlighted texture
Date: 17 May 2017 07:04:21
Message: <591c2e35$1@news.povray.org>
On 17-5-2017 12:13, clipka wrote:
> Thomas de Groot <tho### [at] degrootorg> wrote:
>> On 16-5-2017 18:37, Bald Eagle wrote:
>>> I was talking with Stephen about some scene elements,
>>> and was wondering if there were a way to have directly lighted surfaces of an
>>> object show one texture, and any unlighted / indirectly lighted surfaces have
>>> another.
>>>
>>> The obvious way would be to construct the object in 2 parts - split by a plane
>>> the light source is perpendicular to, and assign each half a different texture.
>>> Though I was hoping for something a bit more elegant, easier, and allowing a
>>> smoother transition.
>>>
>>>
>>>
>>>
>>
>> Would aoi (angle of incidence) be the answer?
>
> No; `aoi` depends on the angle between the surface and the camera ray.
>
>
Would there be a way to 'tweak' this somehow?  I know that the obvious 
answer is 'no' but I keep wondering...

-- 
Thomas


Post a reply to this message

From: William F Pokorny
Subject: Re: Lighted vs unlighted texture
Date: 17 May 2017 07:50:53
Message: <591c391d$1@news.povray.org>
On 05/16/2017 12:37 PM, Bald Eagle wrote:
> I was talking with Stephen about some scene elements,
> and was wondering if there were a way to have directly lighted surfaces of an
> object show one texture, and any unlighted / indirectly lighted surfaces have
> another.
> 
> The obvious way would be to construct the object in 2 parts - split by a plane
> the light source is perpendicular to, and assign each half a different texture.
> Though I was hoping for something a bit more elegant, easier, and allowing a
> smoother transition.
> 
> 
> 
> 
If the shapes / light involved are not too complex, perhaps using the 
new to 3.7.1 user_defined pigment feature and layered textures where the 
transmission value for the top texture{pigment} is set up to depend upon 
the light to shape surface "aoi" relationship...

Bill P.


Post a reply to this message

From: Bald Eagle
Subject: Re: Lighted vs unlighted texture
Date: 17 May 2017 08:00:00
Message: <web.591c3b1d6a9a8b37c437ac910@news.povray.org>
See animation posted in binaries/animations.

Looks like slope {point_at .....} works pretty well   :)


Post a reply to this message

From: clipka
Subject: Re: Lighted vs unlighted texture
Date: 17 May 2017 09:08:36
Message: <591c4b54$1@news.povray.org>
Am 17.05.2017 um 13:04 schrieb Thomas de Groot:

>>> Would aoi (angle of incidence) be the answer?
>>
>> No; `aoi` depends on the angle between the surface and the camera ray.
>>
>>
> Would there be a way to 'tweak' this somehow?  I know that the obvious
> answer is 'no' but I keep wondering...

You mean, something like the `slope` pattern with the (new in 3.7)
`point_at` syntax? ;)


Post a reply to this message

From: Kenneth
Subject: Re: Lighted vs unlighted texture
Date: 17 May 2017 11:35:01
Message: <web.591c6cb06a9a8b37883fb31c0@news.povray.org>
[somewhat off-topic...]

Sorry to ask a dumb question, but is the 'aoi' pattern the same as a 'proximity'
pattern? Do the two descriptors actually mean the same thing?


Post a reply to this message

Goto Latest 10 Messages Next 3 Messages >>>

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