POV-Ray : Newsgroups : povray.newusers : can't i rotate a pigment? Server Time
28 Apr 2024 21:05:21 EDT (-0400)
  can't i rotate a pigment? (Message 11 to 14 of 14)  
<<< Previous 10 Messages Goto Initial 10 Messages
From: Stephen
Subject: Re: can't i rotate a pigment?
Date: 8 May 2015 04:41:05
Message: <554c76a1$1@news.povray.org>
On 08/05/2015 08:54, Thomas de Groot wrote:

> After testing, I can confirm that it is not possible to rotate a slope
> pattern, in contrast to other patterns. Even more puzzling, I can
> confirm that this is true too when applying the pigment and then
> rotating the object: the pigment remains unchanged and does not rotate
> with the object.
>
> I do not know if this is a bug or is intentional. If the latest case,
> the documentation does not mention it while at the same time indicating
> the use of Pigment Modifiers in the example.
>
> I believe we need the voice of an expert now.
>

And I thought that you were the expert. ;-)

My understanding of the slope pattern is that the colour (value) is 
dependant on the normal of the point on the object being tested and the 
direction vector. So the pigment is tied to the object's shape. To 
rotate the patern, rotate the direction vector.

> The slope value at a given point is dependent on the angle between the <Direction>
vector and the normal of the surface at that point. For example:
> - When the surface normal points in the opposite direction of the <Direction> vector
(180 degrees), the slope is 0.0.
> - When the surface normal is perpendicular to the <Direction> vector (90 degrees),
the slope is 0.5.
> - When the surface normal is parallel to the <Direction> vector (0 degrees), the
slope is 1.0.



-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: can't i rotate a pigment?
Date: 8 May 2015 07:21:55
Message: <554c9c53@news.povray.org>
On 8-5-2015 10:41, Stephen wrote:
> On 08/05/2015 08:54, Thomas de Groot wrote:
>
>> After testing, I can confirm that it is not possible to rotate a slope
>> pattern, in contrast to other patterns. Even more puzzling, I can
>> confirm that this is true too when applying the pigment and then
>> rotating the object: the pigment remains unchanged and does not rotate
>> with the object.
>>
>> I do not know if this is a bug or is intentional. If the latest case,
>> the documentation does not mention it while at the same time indicating
>> the use of Pigment Modifiers in the example.
>>
>> I believe we need the voice of an expert now.
>>
>
> And I thought that you were the expert. ;-)

I am sorry to disappoint you ;-)

>
> My understanding of the slope pattern is that the colour (value) is
> dependant on the normal of the point on the object being tested and the
> direction vector. So the pigment is tied to the object's shape. To
> rotate the patern, rotate the direction vector.
>
>> The slope value at a given point is dependent on the angle between the
>> <Direction> vector and the normal of the surface at that point. For
>> example:
>> - When the surface normal points in the opposite direction of the
>> <Direction> vector (180 degrees), the slope is 0.0.
>> - When the surface normal is perpendicular to the <Direction> vector
>> (90 degrees), the slope is 0.5.
>> - When the surface normal is parallel to the <Direction> vector (0
>> degrees), the slope is 1.0.
>

Yes that is my understanding too, up to a point. What mystifies me is 
when an object is patterned with slope and then rotated: why is the 
pattern not following the rotation of the object? That is not correct to 
my understanding.

-- 
Thomas


Post a reply to this message

From: Stephen
Subject: Re: can't i rotate a pigment?
Date: 8 May 2015 10:15:03
Message: <554cc4e7$1@news.povray.org>
On 08/05/2015 12:21, Thomas de Groot wrote:
> I am sorry to disappoint you ;-)
>

You don't.

>>

>
> Yes that is my understanding too, up to a point. What mystifies me is
> when an object is patterned with slope and then rotated: why is the
> pattern not following the rotation of the object? That is not correct to
> my understanding.

It might have helped if I actually rotated the object.
Puzzling.
Try this instead.

     object {
         ...


         rotate N*y
         pigment { Tufte }

         }

It is hard to see on the SuperEllipsoid I was using.

-- 

Regards
     Stephen


Post a reply to this message

From: Thomas de Groot
Subject: Re: can't i rotate a pigment?
Date: 9 May 2015 03:29:32
Message: <554db75c$1@news.povray.org>
In summary, after a night pondering the issue, the slope pattern is 
applied at world-axis level, regardless of any transformation at 
local-axis level of the object. This makes slope different from the 
other patterns. This is consistent with the Docs.

To reduce confusion like we have experienced now, I think that the Docs 
should be adapted accordingly with an additional entry under *Note*, 
explaining why basic transformations of the pattern or the object do not 
work as expected.

As a solution to the initial question, I see two possibilities:

- Baking the texture using the mesh camera. See for an excellent 
explanation: http://www.ignorancia.org/en/index.php?page=mesh-camera

Using a proximity pattern technique as was developed e.g. by Sam Benge 
or Edouard Poor. This is not exactly the same as a slope pattern but can 
come close. Personally, I prefer, and use, Edouard Poor's method. I do 
not have the exact location at hand but look for the code in 
povray.binaries.scene-files, under author Edouard, date 10-9-2009.

-- 
Thomas


Post a reply to this message

<<< Previous 10 Messages Goto Initial 10 Messages

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